no message

This commit is contained in:
2024-10-09 20:35:18 +03:00
parent e5f4ee40aa
commit 63b7f7dfd2
183 changed files with 443 additions and 266 deletions

View File

@@ -0,0 +1,39 @@
package Common.Visual.Trees;
import Common.CurrentAnchestor;
import Common.Utils.CommonUtils;
import Common.Visual.DataControl_OLD;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreePath;
public class DataTree extends StyledTree implements DataControl_OLD {
public DataTree(DefaultMutableTreeNode root_in) {
super(root_in);
}
public void ChangeCurrentObject(DefaultMutableTreeNode node) {
if (getCurrent() != null)
CurrentAnchestor.set(getCurrent(), node.getUserObject());
}
@Override
public void ShowCurrentObject() throws Exception {
}
@Override
public void ShowNoCurrentObject() throws Exception {
}
@Override
public void SelectionAction(TreePath path) {
ChangeCurrentObject((DefaultMutableTreeNode) path.getLastPathComponent());
try {
ShowCurrentObject();
} catch (Exception ex) {
CommonUtils.MainLog.PrintException(ex);
}
}
public void SelectNodeByCriteria(Object criteria) {
EventsOff();
TreePath res = ShowNodeByCriteria(criteria);
setSelectionPath(res);
ChangeCurrentObject((DefaultMutableTreeNode) res.getLastPathComponent());
EventsOn();
}
}