Files
VisualSapfor/src/Common/Visual/Trees/SelectableTree.java
2024-10-17 20:31:06 +03:00

19 lines
535 B
Java

package Common.Visual.Trees;
import Common.MainModule_;
import Common.Visual.Selectable;
import javax.swing.tree.DefaultMutableTreeNode;
public class SelectableTree extends DataTree {
public SelectableTree(DefaultMutableTreeNode root_in) {
super(root_in);
}
@Override
public void LeftMouseAction1() {
Object element = MainModule_.instance.get(currentName());
if ((element instanceof Selectable)) {
((Selectable) element).SwitchSelection();
updateUI();
}
}
}