Files
VisualSapfor/src/Common_old/UI/Trees/SelectableTree.java

20 lines
562 B
Java
Raw Normal View History

package Common_old.UI.Trees;
import Common.CurrentAnchestor;
import Common_old.Current;
2024-10-07 17:46:38 +03:00
import Common.Visual.Selectable;
2023-09-17 22:13:42 +03:00
import javax.swing.tree.DefaultMutableTreeNode;
public class SelectableTree extends DataTree {
public SelectableTree(DefaultMutableTreeNode root_in) {
super(root_in);
}
@Override
public void LeftMouseAction1() {
Object element = CurrentAnchestor.get(getCurrent());
2023-09-17 22:13:42 +03:00
if ((element instanceof Selectable)) {
((Selectable) element).SwitchSelection();
updateUI();
}
}
}