редизайн вкладки с машинами, и отображения текущих объектов
v++
This commit is contained in:
@@ -48,11 +48,13 @@ public class CompilersForm extends DataSetControlForm<Compiler> {
|
||||
protected void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().mainMenuBar.ShowCompiler(dataSource.getUI().getCurrent());
|
||||
}
|
||||
@Override
|
||||
protected void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().mainMenuBar.ShowNoCompiler();
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
|
||||
@@ -33,13 +33,15 @@ public class MachinesForm extends DataSetControlForm<Machine> {
|
||||
protected void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getCredentialsMenuBar().ShowMachine();
|
||||
Global.mainModule.getUI().mainMenuBar.ShowMachine(dataSource.getUI().getCurrent());
|
||||
// Global.mainModule.getUI().getCredentialsMenuBar().ShowMachine();
|
||||
}
|
||||
@Override
|
||||
protected void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getCredentialsMenuBar().ShowNoMachine();
|
||||
Global.mainModule.getUI().mainMenuBar.ShowNoMachine();
|
||||
// Global.mainModule.getUI().getCredentialsMenuBar().ShowNoMachine();
|
||||
}
|
||||
@Override
|
||||
public PassCode_ getDeletePassCode() {
|
||||
|
||||
@@ -41,12 +41,14 @@ public class UsersForm extends DataSetControlForm<User> {
|
||||
@Override
|
||||
protected void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
Global.mainModule.getUI().getCredentialsMenuBar().ShowUser();
|
||||
Global.mainModule.getUI().mainMenuBar.ShowUser(dataSource.getUI().getCurrent());
|
||||
//Global.mainModule.getUI().getCredentialsMenuBar().ShowUser();
|
||||
}
|
||||
@Override
|
||||
protected void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
Global.mainModule.getUI().getCredentialsMenuBar().ShowNoUser();
|
||||
Global.mainModule.getUI().mainMenuBar.ShowNoUser();
|
||||
// Global.mainModule.getUI().getCredentialsMenuBar().ShowNoUser();
|
||||
}
|
||||
@Override
|
||||
public PassCode_ getDeletePassCode() {
|
||||
|
||||
@@ -28,12 +28,6 @@ public class UpdateProperty extends Pass<Object> {
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
switch (name) {
|
||||
case "collapseCredentials":
|
||||
if ((boolean) newValue)
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().CollapseCredentials();
|
||||
else
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ExpandCredentials();
|
||||
break;
|
||||
case "collapseProjectTrees":
|
||||
if (Global.mainModule.HasProject()) {
|
||||
if ((boolean) newValue)
|
||||
|
||||
@@ -61,7 +61,7 @@ public class Visualiser extends Component {
|
||||
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
version = 1129;
|
||||
version = 1130;
|
||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||
date_text = df.format(getClassBuildTime());
|
||||
|
||||
6
src/_VisualDVM/Visual/Interface/CredentialsWindow.java
Normal file
6
src/_VisualDVM/Visual/Interface/CredentialsWindow.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package _VisualDVM.Visual.Interface;
|
||||
import javax.swing.*;
|
||||
public interface CredentialsWindow {
|
||||
JPanel getContent();
|
||||
void ShowAll();
|
||||
}
|
||||
@@ -33,6 +33,4 @@ public interface TestingWindow extends VisualizerForm {
|
||||
void CompareSapforPackages(SapforPackage master, SapforPackage slave);
|
||||
//-
|
||||
void ShowDVMPackage(DVMPackage master);
|
||||
void CollapseCredentials();
|
||||
void ExpandCredentials();
|
||||
}
|
||||
|
||||
@@ -6,12 +6,13 @@ import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.Common.TestingMenuBar;
|
||||
import _VisualDVM.Visual.Interface.DebugWindow;
|
||||
import _VisualDVM.Visual.Interface.VersionsWindow;
|
||||
import _VisualDVM.Visual.Menus.CredentialsBar.CredentialsMenuBar;
|
||||
import _VisualDVM.Visual.Menus.MainMenuBar.MainMenuBar;
|
||||
import _VisualDVM.Visual.Windows.MainWindow;
|
||||
import _VisualDVM.Visual.Menus.VersionsMenuBar.VersionsMenuBar;
|
||||
import _VisualDVM.Visual.Syntax.LightSPFEditorTheme;
|
||||
import _VisualDVM.Visual.Windows.*;
|
||||
public class MainUI extends UIModule_ {
|
||||
public MainMenuBar mainMenuBar = null;
|
||||
public MainWindow mainWindow = null;
|
||||
public SearchReplaceForm searchReplaceWindow = null;
|
||||
public ProfilesForm profilesWindow = null;
|
||||
@@ -21,7 +22,6 @@ public class MainUI extends UIModule_ {
|
||||
ComponentsWindow componentsWindow = null;
|
||||
//-
|
||||
TestingMenuBar testingMenuBar = null;
|
||||
CredentialsMenuBar credentialsMenuBar = null;
|
||||
VersionsMenuBar versionsMenuBar = null;
|
||||
//-
|
||||
//-
|
||||
@@ -39,11 +39,6 @@ public class MainUI extends UIModule_ {
|
||||
versionsMenuBar = new VersionsMenuBar();
|
||||
return versionsMenuBar;
|
||||
}
|
||||
public CredentialsMenuBar getCredentialsMenuBar() {
|
||||
if (credentialsMenuBar == null)
|
||||
credentialsMenuBar = new CredentialsMenuBar();
|
||||
return credentialsMenuBar;
|
||||
}
|
||||
public MainWindow getMainWindow() {
|
||||
if (mainWindow == null)
|
||||
mainWindow = new MainForm();
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
package _VisualDVM.Visual.Menus.CredentialsBar;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.Menus.VisualiserMenuBar;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
public class CredentialsMenuBar extends VisualiserMenuBar {
|
||||
public MenuBarButton MachineButton;
|
||||
public MenuBarButton UserButton;
|
||||
MenuBarButton bExpand;
|
||||
public CredentialsMenuBar() {
|
||||
this.add(bExpand = new MenuBarButton() {
|
||||
{
|
||||
setIcon("/Common/icons/SiverArrowDown.png");
|
||||
setToolTipText("Развернуть");
|
||||
addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("collapseCredentials", false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 0);
|
||||
add(MachineButton = new MenuBarButton() {
|
||||
{
|
||||
setIcon("/icons/Machine.png");
|
||||
setFont(VisualiserFonts.TreeBold);
|
||||
setToolTipText("Текущая машина");
|
||||
}
|
||||
});
|
||||
//--
|
||||
add(UserButton = new MenuBarButton() {
|
||||
{
|
||||
setIcon("/icons/User.png");
|
||||
setFont(VisualiserFonts.TreeBold);
|
||||
setToolTipText("Текущий пользователь");
|
||||
}
|
||||
});
|
||||
}
|
||||
public void ShowMachine() {
|
||||
MachineButton.setText(
|
||||
MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent().getURL());
|
||||
}
|
||||
public void ShowUser() {
|
||||
UserButton.setText(
|
||||
MainModule_.instance.getDb().getTable(User.class).getUI().getCurrent().login);
|
||||
}
|
||||
public void ShowNoMachine() {
|
||||
MachineButton.setText("?");
|
||||
}
|
||||
public void ShowNoUser() {
|
||||
UserButton.setText("?");
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,28 @@
|
||||
package _VisualDVM.Visual.Menus.MainMenuBar;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.Menus.VisualiserMenuBar;
|
||||
import Common.Visual.UI;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Repository.Component.PerformanceAnalyzer.PerformanceAnalyzer;
|
||||
import _VisualDVM.Visual.Menus.MainMenuBar.VisualiserSettingsMenu.VisualiserSettingsMenu;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
public class MainMenuBar extends VisualiserMenuBar {
|
||||
JMenu analyses;
|
||||
JMenu transformations;
|
||||
MenuBarButton componentsButton;
|
||||
public MenuBarButton MachineButton;
|
||||
public MenuBarButton UserButton;
|
||||
public MenuBarButton CompilerButton;
|
||||
public MainMenuBar() {
|
||||
addMenus(new LastOpenedProjectsMenu());
|
||||
addPasses(PassCode.OpenCurrentProject, PassCode.CreateEmptyProject);
|
||||
@@ -64,8 +73,40 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
}
|
||||
});
|
||||
*/
|
||||
add(new JSeparator());
|
||||
add(MachineButton = new MenuBarButton() {
|
||||
{
|
||||
setIcon("/icons/Machine.png");
|
||||
setFont(VisualiserFonts.TreeBold);
|
||||
setToolTipText("Текущая машина");
|
||||
}
|
||||
});
|
||||
//--
|
||||
add(UserButton = new MenuBarButton() {
|
||||
{
|
||||
setIcon("/icons/User.png");
|
||||
setFont(VisualiserFonts.TreeBold);
|
||||
setToolTipText("Текущий пользователь");
|
||||
}
|
||||
});
|
||||
add(CompilerButton = new MenuBarButton() {
|
||||
{
|
||||
setIcon("/icons/type.png");
|
||||
setFont(VisualiserFonts.TreeBold);
|
||||
setToolTipText("Текущий компилятор");
|
||||
}
|
||||
});
|
||||
MachineButton.addActionListener(credentialsListener);
|
||||
UserButton.addActionListener(credentialsListener);
|
||||
CompilerButton.addActionListener(credentialsListener);
|
||||
ShowProject(false);
|
||||
}
|
||||
ActionListener credentialsListener= new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Global.mainModule.getUI().getMainWindow().FocusCredentials();
|
||||
}
|
||||
};
|
||||
public void ShowUpdatesIcon() {
|
||||
componentsButton.setIcon(Global.components.getButtonIconPath());
|
||||
}
|
||||
@@ -83,4 +124,22 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
pass.setControlsEnabled(flag);
|
||||
}
|
||||
}
|
||||
public void ShowMachine(Machine machine) {
|
||||
MachineButton.setText(machine.getURL());
|
||||
}
|
||||
public void ShowUser(User user) {
|
||||
UserButton.setText(user.login);
|
||||
}
|
||||
public void ShowCompiler(Compiler compiler) {
|
||||
CompilerButton.setText(compiler.description);
|
||||
}
|
||||
public void ShowNoMachine() {
|
||||
MachineButton.setText("?");
|
||||
}
|
||||
public void ShowNoUser() {
|
||||
UserButton.setText("?");
|
||||
}
|
||||
public void ShowNoCompiler() {
|
||||
CompilerButton.setText("?");
|
||||
}
|
||||
}
|
||||
|
||||
112
src/_VisualDVM/Visual/Windows/CredentialsForm.form
Normal file
112
src/_VisualDVM/Visual/Windows/CredentialsForm.form
Normal file
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.CredentialsForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="903" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="54e68" binding="SC18">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="400"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="2c30f" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="450" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f01f7" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<minimumSize width="250" height="200"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="b8d86" binding="compilersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="9d9eb" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="450" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="23b2d" binding="SC19">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="197"/>
|
||||
<dividerSize value="3"/>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="300" height="100"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="4f90f" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="0"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="4d47e" binding="machinesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="e4708" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="250" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="fc727" binding="usersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
28
src/_VisualDVM/Visual/Windows/CredentialsForm.java
Normal file
28
src/_VisualDVM/Visual/Windows/CredentialsForm.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Visual.FormWithSplitters;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Interface.CredentialsWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
public class CredentialsForm implements CredentialsWindow,FormWithSplitters {
|
||||
private JPanel content;
|
||||
private JPanel compilersPanel;
|
||||
private JPanel machinesPanel;
|
||||
private JPanel usersPanel;
|
||||
public JSplitPane SC18;
|
||||
public JSplitPane SC19;
|
||||
public CredentialsForm(){
|
||||
LoadSplitters();
|
||||
Global.mainModule.getDb().machines.mountUI(machinesPanel);
|
||||
Global.mainModule.getDb().users.mountUI(usersPanel);
|
||||
Global.mainModule.getDb().compilers.mountUI(compilersPanel);
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
@Override
|
||||
public void ShowAll() {
|
||||
Global.mainModule.getDb().machines.ShowUI();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Visual.Interface.CallbackWindow;
|
||||
import _VisualDVM.Visual.Interface.ProjectWindow;
|
||||
import _VisualDVM.Visual.Interface.TestingWindow;
|
||||
import _VisualDVM.Visual.Interface.TestsWindow;
|
||||
import _VisualDVM.Visual.Interface.*;
|
||||
public interface MainWindow {
|
||||
void Show();
|
||||
void ShowProject();
|
||||
void ShowNoProject();
|
||||
ProjectWindow getProjectWindow();
|
||||
CallbackWindow getCallbackWindow();
|
||||
CredentialsWindow getCredentialsWindow();
|
||||
TestsWindow getTestsWindow();
|
||||
TestingWindow getTestingWindow();
|
||||
//-
|
||||
void ShowUpdatesIcon();
|
||||
void FocusProject();
|
||||
void FocusCallback();
|
||||
void FocusCredentials();
|
||||
void FocusTests();
|
||||
void FocusTesting();
|
||||
void SwitchTestingTabs(boolean flag);
|
||||
|
||||
@@ -29,148 +29,54 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="5df89" binding="SC71">
|
||||
<splitpane id="4d392" binding="SC72">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="150"/>
|
||||
<dividerLocation value="200"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f073a" binding="credentialsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="c7617" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="a68b8" binding="SC18">
|
||||
<grid id="e59d5" binding="dvmSettingsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="400"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="5800e" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="450" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="2e68e" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<minimumSize width="250" height="200"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="7b7a8" binding="compilersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="db8ae" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="450" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="4a378" binding="SC19">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="197"/>
|
||||
<dividerSize value="3"/>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="300" height="100"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="20373" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="0"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="d8430" binding="machinesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="eeb47" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="250" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="15f9a" binding="usersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="34404" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="8765b" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="aeb24" binding="SC72">
|
||||
<splitpane id="7eb1f" binding="SC85">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="200"/>
|
||||
<dividerLocation value="120"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="6722c" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="15276" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="17cb3" binding="dvmSettingsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="56ba1" binding="configurationsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -178,54 +84,19 @@
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="726a0" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="7f31b" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="c7883" binding="SC85">
|
||||
<grid id="5905b" binding="dvmPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="120"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="42875" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="4739d" binding="configurationsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="28479" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="ff2c1" binding="dvmPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
|
||||
@@ -34,14 +34,12 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
public JSplitPane SC64;
|
||||
public JSplitPane SC70;
|
||||
public JSplitPane SC63;
|
||||
public JSplitPane SC71;
|
||||
public JSplitPane SC72;
|
||||
public JSplitPane SC74;
|
||||
public JSplitPane SC18;
|
||||
public JSplitPane SC19;
|
||||
public JSplitPane SC80;
|
||||
public JSplitPane SC83;
|
||||
public JSplitPane SC72;
|
||||
public JSplitPane SC85;
|
||||
|
||||
private JPanel content;
|
||||
//---
|
||||
private JTabbedPane testingTabs;
|
||||
@@ -108,8 +106,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
);
|
||||
//--->>>
|
||||
RefreshTabsNames();
|
||||
if (Global.properties.collapseCredentials)
|
||||
CollapseCredentials();
|
||||
//-
|
||||
SC50.setLeftComponent(dvmTestingRunMaster.getContent());
|
||||
SC50.setRightComponent(dvmTestingRunSlave.getContent());
|
||||
@@ -123,10 +119,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
SC65.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, sc65Listener);
|
||||
SC66.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, sc66Listener);
|
||||
//-
|
||||
Global.mainModule.getDb().machines.mountUI(machinesPanel);
|
||||
Global.mainModule.getDb().users.mountUI(usersPanel);
|
||||
Global.mainModule.getDb().compilers.mountUI(compilersPanel);
|
||||
//-
|
||||
Global.testingServer.db.dvmConfigurations.mountUI(configurationsPanel);
|
||||
Global.testingServer.db.dvmPackages.mountUI(dvmPackagesPanel);
|
||||
Global.testingServer.db.dvmRunTasks.mountUI(dvmRunTasksPanel);
|
||||
@@ -137,8 +129,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
Global.testingServer.db.sapforSettingsCommands.mountUI(sapforSettingsCommandsPanel);
|
||||
Global.testingServer.db.dvmSettings.mountUI(dvmSettingsPanel);
|
||||
//--
|
||||
if (Global.properties.collapseCredentials)
|
||||
CollapseCredentials();
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
@@ -147,7 +137,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
//-
|
||||
@Override
|
||||
public void ShowAll() {
|
||||
Global.mainModule.getDb().machines.ShowUI();
|
||||
Global.testingServer.db.dvmConfigurations.ShowUI();
|
||||
Global.testingServer.db.dvmPackages.ShowUI();
|
||||
Global.testingServer.db.sapforPackages.ShowUI();
|
||||
@@ -268,24 +257,4 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
sapforPackageTreeMaster.DoComparePass();
|
||||
testingTabs.setSelectedIndex(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void CollapseCredentials() {
|
||||
Global.mainModule.getDb().splitters.get("SC71").position = SC71.getDividerLocation();
|
||||
UI.Clear(credentialsPanel);
|
||||
credentialsPanel.add(Global.mainModule.getUI().getCredentialsMenuBar());
|
||||
SC71.setDividerLocation(30);
|
||||
SC71.setDividerSize(0);
|
||||
credentialsPanel.revalidate();
|
||||
credentialsPanel.repaint();
|
||||
}
|
||||
@Override
|
||||
public void ExpandCredentials() {
|
||||
UI.Clear(credentialsPanel);
|
||||
credentialsPanel.add(SC18);
|
||||
SC71.setDividerLocation(200);
|
||||
SC71.setDividerSize(3);
|
||||
credentialsPanel.revalidate();
|
||||
credentialsPanel.repaint();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user