Single click to expand and collapse categories in the component tree

This commit is contained in:
bancika
2021-01-17 09:44:06 +01:00
parent 1aabe42573
commit 61202675b8
2 changed files with 6 additions and 1 deletions
@@ -3494,6 +3494,10 @@
<changeType>NEW_FEATURE</changeType> <changeType>NEW_FEATURE</changeType>
<description>When editing component colors, honor the specified 'alpha' value specified on each color individually in addition to the component-level alpha property</description> <description>When editing component colors, honor the specified 'alpha' value specified on each color individually in addition to the component-level alpha property</description>
</org.diylc.appframework.update.Change> </org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Single click to expand and collapse categories in the component tree</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change> <org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType> <changeType>IMPROVEMENT</changeType>
<description>Improved code robustness</description> <description>Improved code robustness</description>
@@ -196,6 +196,7 @@ public class TreePanel extends JPanel {
tree.setCellRenderer(new ComponentCellRenderer()); tree.setCellRenderer(new ComponentCellRenderer());
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
tree.setRowHeight(0); tree.setRowHeight(0);
tree.setToggleClickCount(1);
ToolTipManager.sharedInstance().registerComponent(tree); ToolTipManager.sharedInstance().registerComponent(tree);
tree.addTreeSelectionListener(new TreeSelectionListener() { tree.addTreeSelectionListener(new TreeSelectionListener() {