редизайн вкладки с машинами, и отображения текущих объектов
v++
This commit is contained in:
@@ -8,10 +8,7 @@ import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
import _VisualDVM.Visual.Interface.CallbackWindow;
|
||||
import _VisualDVM.Visual.Interface.ProjectWindow;
|
||||
import _VisualDVM.Visual.Interface.TestingWindow;
|
||||
import _VisualDVM.Visual.Interface.TestsWindow;
|
||||
import _VisualDVM.Visual.Interface.*;
|
||||
import _VisualDVM.Visual.Menus.MainMenuBar.MainMenuBar;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -20,10 +17,10 @@ import java.util.Vector;
|
||||
public class MainForm extends Form implements MainWindow {
|
||||
private final WelcomeForm welcomeForm = new WelcomeForm(); //заглушка когда проекта нет.
|
||||
int global_index = 0;
|
||||
MainMenuBar mainMenuBar;
|
||||
//-----------------
|
||||
private ProjectForm projectForm;
|
||||
private CallbackForm callbackForm;
|
||||
private CredentialsForm credentialsForm;
|
||||
private TestsForm testsForm;
|
||||
//---
|
||||
private TestingForm testingForm;
|
||||
@@ -32,9 +29,10 @@ public class MainForm extends Form implements MainWindow {
|
||||
private JTabbedPane globalTabs;
|
||||
private JPanel mainPanel;
|
||||
public MainForm() {
|
||||
mainPanel.add(mainMenuBar = new MainMenuBar(), BorderLayout.NORTH);
|
||||
mainPanel.add(Global.mainModule.getUI().mainMenuBar = new MainMenuBar(), BorderLayout.NORTH);
|
||||
InstallWelcomePanel();
|
||||
InstallCallbackPanel();
|
||||
InstallCredentialsPanel();
|
||||
InstallTestsPanel();
|
||||
InstallTestingPanel();
|
||||
ShowUpdatesIcon();
|
||||
@@ -66,6 +64,7 @@ public class MainForm extends Form implements MainWindow {
|
||||
if (Global.mainModule.getUI().getVersionsWindow() != null)
|
||||
((FormWithSplitters) Global.mainModule.getUI().getVersionsWindow()).SaveSplitters();
|
||||
SaveCallbackPanel();
|
||||
SaveCredentialsPanel();
|
||||
SaveTestsPanel();
|
||||
SaveTestingPanel();
|
||||
//--
|
||||
@@ -113,11 +112,23 @@ public class MainForm extends Form implements MainWindow {
|
||||
callbackForm = null;
|
||||
}
|
||||
}
|
||||
private void SaveCredentialsPanel() {
|
||||
if (credentialsForm != null) {
|
||||
credentialsForm.SaveSplitters();
|
||||
credentialsForm = null;
|
||||
}
|
||||
}
|
||||
private void InstallCredentialsPanel() {
|
||||
globalTabs.insertTab("Машины",
|
||||
Utils_.getIcon("/icons/Session.png"),
|
||||
(credentialsForm = new CredentialsForm()).getContent(),
|
||||
"Машины, пользователи и компиляторы", 2);
|
||||
}
|
||||
private void InstallTestsPanel() {
|
||||
globalTabs.insertTab("Тесты",
|
||||
Utils_.getIcon("/Common/icons/Library.png"),
|
||||
(testsForm = new TestsForm()).getContent(),
|
||||
"Библиотека тестов на сервере", 2);
|
||||
"Библиотека тестов на сервере", 3);
|
||||
}
|
||||
private void SaveTestsPanel() {
|
||||
if (testsForm != null) {
|
||||
@@ -128,30 +139,10 @@ public class MainForm extends Form implements MainWindow {
|
||||
private void InstallTestingPanel() {
|
||||
testingForm = new TestingForm();
|
||||
globalTabs.insertTab("Тестирование",
|
||||
Utils_.getIcon("/icons/Session.png"),
|
||||
Utils_.getIcon("/icons/Testing.png"),
|
||||
testingForm.getContent(),
|
||||
"Система тестирования", 3);
|
||||
"Система тестирования", 4);
|
||||
}
|
||||
/*
|
||||
public void ShowCurrentCompiler() {
|
||||
String res = "";
|
||||
if (Current.HasMachine()) {
|
||||
res += "@" + Current.getMachine().getURL();
|
||||
if (Current.HasUser()) {
|
||||
res = Current.getUser().login + res;
|
||||
} else res = "?" + res;
|
||||
|
||||
if (Current.HasCompiler() && Current.getCompiler().type.equals(CompilerType.dvm)) {
|
||||
res += "DVM система: " + Current.getCompiler().description;
|
||||
} else {
|
||||
res += "DVM система: ?";
|
||||
}
|
||||
} else {
|
||||
res += "?@?";
|
||||
}
|
||||
globalTabs.setTitleAt(2, res);
|
||||
}
|
||||
*/
|
||||
@Override
|
||||
public void ShowCheckedTestsCount() {
|
||||
int res = 0;
|
||||
@@ -173,7 +164,7 @@ public class MainForm extends Form implements MainWindow {
|
||||
res += selected_tests.size();
|
||||
}
|
||||
//--
|
||||
globalTabs.setTitleAt(2, "Тесты: " + res);
|
||||
globalTabs.setTitleAt(3, "Тесты: " + res);
|
||||
}
|
||||
private void SaveTestingPanel() {
|
||||
if (testingForm != null) {
|
||||
@@ -201,7 +192,7 @@ public class MainForm extends Form implements MainWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowUpdatesIcon() {
|
||||
mainMenuBar.ShowUpdatesIcon();
|
||||
Global.mainModule.getUI().mainMenuBar.ShowUpdatesIcon();
|
||||
}
|
||||
@Override
|
||||
public void FocusProject() {
|
||||
@@ -212,17 +203,21 @@ public class MainForm extends Form implements MainWindow {
|
||||
globalTabs.setSelectedIndex(1);
|
||||
}
|
||||
@Override
|
||||
public void FocusTests() {
|
||||
public void FocusCredentials() {
|
||||
globalTabs.setSelectedIndex(2);
|
||||
}
|
||||
@Override
|
||||
public void FocusTesting() {
|
||||
public void FocusTests() {
|
||||
globalTabs.setSelectedIndex(3);
|
||||
}
|
||||
@Override
|
||||
public void FocusTesting() {
|
||||
globalTabs.setSelectedIndex(4);
|
||||
}
|
||||
@Override
|
||||
public void SwitchTestingTabs(boolean flag) {
|
||||
globalTabs.setEnabledAt(2, flag);
|
||||
globalTabs.setEnabledAt(3, flag);
|
||||
globalTabs.setEnabledAt(4, flag);
|
||||
// globalTabs.setEnabledAt(4, flag);
|
||||
}
|
||||
@Override
|
||||
@@ -235,12 +230,17 @@ public class MainForm extends Form implements MainWindow {
|
||||
// иначе ссылка на главное окно в методах пустая.
|
||||
getCallbackWindow().ShowAll();
|
||||
getTestsWindow().ShowAll();
|
||||
getCredentialsWindow().ShowAll();
|
||||
if (getTestingWindow() != null)
|
||||
getTestingWindow().ShowAll();
|
||||
MainModule_.instance.getUI().windowsStack.push(this);
|
||||
super.Show();
|
||||
}
|
||||
@Override
|
||||
public CredentialsWindow getCredentialsWindow() {
|
||||
return credentialsForm;
|
||||
}
|
||||
@Override
|
||||
public void ShowProject() {
|
||||
//-
|
||||
saveGlobalTab();
|
||||
@@ -248,7 +248,7 @@ public class MainForm extends Form implements MainWindow {
|
||||
InstallProjectPanel();
|
||||
restoreGlobalTab();
|
||||
Global.mainModule.getUI().getDebugWindow().DropCompilationTasksComparison();
|
||||
mainMenuBar.ShowProject(true);
|
||||
Global.mainModule.getUI().mainMenuBar.ShowProject(true);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoProject() {
|
||||
@@ -257,6 +257,6 @@ public class MainForm extends Form implements MainWindow {
|
||||
RemoveProjectPanel();
|
||||
InstallWelcomePanel();
|
||||
restoreGlobalTab();
|
||||
mainMenuBar.ShowProject(false);
|
||||
Global.mainModule.getUI().mainMenuBar.ShowProject(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user