mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
improved tree
This commit is contained in:
@@ -196,18 +196,21 @@ public class TreePanel extends JPanel {
|
|||||||
Object obj = categoryNode.getUserObject();
|
Object obj = categoryNode.getUserObject();
|
||||||
if (obj != null && obj.getClass().equals(Payload.class)) {
|
if (obj != null && obj.getClass().equals(Payload.class)) {
|
||||||
Payload payload = (Payload) obj;
|
Payload payload = (Payload) obj;
|
||||||
boolean visible = visibleCount > 0;
|
boolean categoryVisible = visibleCount > 0;
|
||||||
if (visible != payload.isVisible()) {
|
if (categoryVisible != payload.isVisible()) {
|
||||||
payload.setVisible(visible);
|
payload.setVisible(categoryVisible);
|
||||||
model.nodeStructureChanged(rootNode);
|
model.nodeStructureChanged(rootNode);
|
||||||
}
|
}
|
||||||
if (visible && text.trim().length() > 0) {
|
if (categoryVisible && text.trim().length() > 0) {
|
||||||
tree.expandPath(new TreePath(categoryNode.getPath()));
|
tree.expandPath(new TreePath(categoryNode.getPath()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getTree().invalidate();
|
for (int i = 0; i < model.getChildCount(rootNode); i++) {
|
||||||
|
DefaultMutableTreeNode categoryNode = (DefaultMutableTreeNode) model.getChild(rootNode, i);
|
||||||
|
tree.expandPath(new TreePath(categoryNode.getPath()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1454,6 +1454,10 @@
|
|||||||
<releaseDate>2016-12-23 20:00:00.000 CET</releaseDate>
|
<releaseDate>2016-12-23 20:00:00.000 CET</releaseDate>
|
||||||
<name></name>
|
<name></name>
|
||||||
<changes>
|
<changes>
|
||||||
|
<org.diylc.appframework.update.Change>
|
||||||
|
<changeType>NEW_FEATURE</changeType>
|
||||||
|
<description>Searchable toolbox tree instead of the old toolbar (can be changed from "Config" menu)</description>
|
||||||
|
</org.diylc.appframework.update.Change>
|
||||||
<org.diylc.appframework.update.Change>
|
<org.diylc.appframework.update.Change>
|
||||||
<changeType>NEW_FEATURE</changeType>
|
<changeType>NEW_FEATURE</changeType>
|
||||||
<description>P-90 pickup in both "dog ear" and "soap bar" variations added</description>
|
<description>P-90 pickup in both "dog ear" and "soap bar" variations added</description>
|
||||||
|
|||||||
Reference in New Issue
Block a user