2023-11-02 23:42:53 +03:00
|
|
|
package SapforTestingSystem.SapforTasksPackage.UI;
|
2023-10-30 22:37:03 +03:00
|
|
|
import Common.Current;
|
2023-10-27 02:07:13 +03:00
|
|
|
import Common.UI.Trees.DataTree;
|
2023-11-01 23:14:49 +03:00
|
|
|
import Common.UI.UI;
|
2023-10-31 01:02:11 +03:00
|
|
|
import SapforTestingSystem.Json.SapforVersion_json;
|
2023-10-27 02:07:13 +03:00
|
|
|
|
|
|
|
|
import javax.swing.tree.DefaultMutableTreeNode;
|
|
|
|
|
import javax.swing.tree.TreePath;
|
|
|
|
|
public class SapforTasksPackageTree extends DataTree {
|
2023-10-30 22:37:03 +03:00
|
|
|
Current current;
|
|
|
|
|
public SapforTasksPackageTree(DefaultMutableTreeNode root_in, Current current_in) {
|
2023-10-27 02:07:13 +03:00
|
|
|
super(root_in);
|
2023-10-30 22:37:03 +03:00
|
|
|
current = current_in;
|
2023-10-27 02:07:13 +03:00
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected int getStartLine() {
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public void LeftMouseAction2() {
|
2023-10-30 22:37:03 +03:00
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public Current getCurrent() {
|
|
|
|
|
return current;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public void SelectionAction(TreePath e) {
|
|
|
|
|
DefaultMutableTreeNode node = (DefaultMutableTreeNode) e.getLastPathComponent();
|
|
|
|
|
Object o = node.getUserObject();
|
2023-10-31 01:02:11 +03:00
|
|
|
if (o instanceof SapforVersion_json) {
|
2023-10-31 01:51:08 +03:00
|
|
|
SapforVersion_json version = (SapforVersion_json) o;
|
|
|
|
|
Current.set(current, version);
|
2023-11-01 23:14:49 +03:00
|
|
|
if (current.equals(Current.SapforEtalonVersion))
|
|
|
|
|
UI.getMainWindow().getTestingWindow().ShowCurrentSapforPackageVersionEtalon();
|
|
|
|
|
else
|
|
|
|
|
UI.getMainWindow().getTestingWindow().ShowCurrentSapforPackageVersion();
|
2023-10-30 22:37:03 +03:00
|
|
|
}
|
2023-10-27 02:07:13 +03:00
|
|
|
}
|
|
|
|
|
}
|