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

20 lines
562 B
Java

package Common_old.UI.Trees;
import Common.CurrentAnchestor;
import Common_old.Current;
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 = CurrentAnchestor.get(getCurrent());
if ((element instanceof Selectable)) {
((Selectable) element).SwitchSelection();
updateUI();
}
}
}