промежуточный. перенос вкладок

This commit is contained in:
2024-03-13 19:19:32 +03:00
parent f52a062e86
commit 0238cc1b3e
20 changed files with 268 additions and 435 deletions

View File

@@ -5,6 +5,7 @@ import Common.UI.TextField.StyledTextField;
import Common.UI.UI;
import GlobalData.Compiler.CompilerType;
import TestingSystem.Common.TestingServer;
import TestingSystem.DVM.DVMPackage.DVMPackage;
import TestingSystem.DVM.DVMTasks.DVMRunTask;
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import Visual_DVM_2021.UI.Interface.FormWithSplitters;
@@ -27,6 +28,9 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
public JSplitPane SC59;
public JSplitPane SC71;
public JSplitPane SC72;
public JSplitPane SC74;
public JSplitPane SC18;
public JSplitPane SC19;
//---
private JTabbedPane testingTabs;
private JPanel dvmPackagesTab;
@@ -48,6 +52,9 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
private JPanel sapforScenariosPanel;
private JPanel serverSapforsPanel;
private JPanel sapforPackagesPanel;
private JPanel compilersPanel;
private JPanel machinesPanel;
private JPanel usersPanel;
private JPanel testsRunTasksBackground;
private JCheckBox filterFinished;
private JButton bTest;
@@ -84,6 +91,10 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
SC65.setRightComponent(sapforVersionMaster.getContent());
SC66.setRightComponent(sapforVersionSlave.getContent());
//-
Global.db.machines.mountUI(machinesPanel);
Global.db.users.mountUI(usersPanel);
Global.db.compilers.mountUI(compilersPanel);
//-
Global.testingServer.db.configurations.mountUI(configurationsPanel);
Global.testingServer.db.dvmPackages.mountUI(dvmPackagesPanel);
Global.testingServer.db.dvmRunTasks.mountUI(dvmRunTasksPanel);
@@ -95,6 +106,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
//-
@Override
public void ShowAll() {
Global.db.machines.ShowUI();
Global.testingServer.db.configurations.ShowUI();
Global.testingServer.db.dvmPackages.ShowUI();
Global.testingServer.db.sapforPackages.ShowUI();
@@ -193,12 +205,15 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
sapforPackageTreeMaster.ApplyObject(master);
testingTabs.setSelectedIndex(3);
}
public void ShowDVMPackage(DVMPackage master) {
testingTabs.setSelectedIndex(1);
}
@Override
public void CompareDVMRunTasks(DVMRunTask master, DVMRunTask slave) {
dvmTestingRunMaster.ApplyObject(master);
dvmTestingRunSlave.ApplyObject(slave);
dvmTestingRunMaster.DoComparePass(true);
testingTabs.setSelectedIndex(1);
// testingTabs.setSelectedIndex(1);
}
@Override
public void CompareSapforPackages(SapforPackage master, SapforPackage slave) {
@@ -207,4 +222,50 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
sapforPackageTreeMaster.DoComparePass();
testingTabs.setSelectedIndex(3);
}
/*
public void RestoreLastCredentials() {
Credentials credentials = (Credentials) Current.get(Current.Credentials);
if (credentials.machine_id != Constants.Nan) {
if (Global.db.machines.containsKey(credentials.machine_id)) {
Global.db.machines.ShowUI(credentials.machine_id);
if (Global.db.users.containsKey(credentials.user_id)) {
Global.db.users.ShowUI(credentials.user_id);
} else {
credentials.user_id = Constants.Nan;
Global.db.UpdateCredentials();
}
if (Global.db.compilers.containsKey(credentials.compiler_id)) {
Global.db.compilers.ShowUI(credentials.compiler_id);
} else {
credentials.compiler_id = Constants.Nan;
Global.db.UpdateCredentials();
}
//-
if (Global.db.makefiles.containsKey(credentials.makefile_id)) {
Global.db.makefiles.ShowUI(credentials.makefile_id);
} else {
credentials.makefile_id = Constants.Nan;
Global.db.UpdateCredentials();
}
//-
if (Global.db.runConfigurations.containsKey(credentials.runconfiguration_id)) {
Global.db.runConfigurations.ShowUI(credentials.runconfiguration_id);
} else {
credentials.runconfiguration_id = Constants.Nan;
Global.db.UpdateCredentials();
}
} else {
credentials.machine_id = Constants.Nan;
credentials.user_id = Constants.Nan;
credentials.compiler_id = Constants.Nan;
credentials.remotesapfor_id = Constants.Nan;
credentials.makefile_id = Constants.Nan;
credentials.runconfiguration_id = Constants.Nan;
Global.db.UpdateCredentials();
}
}
}
*/
}