рефакторинг хранения окон
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.GlobalData.Account;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.TextLog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Repository.BugReport.BugReport;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
@@ -17,8 +18,8 @@ public class Account extends DBObject {
|
||||
if (role.equals(AccountRole.Undefined)) {
|
||||
if (Log != null) {
|
||||
Log.Writeln("Пользователь не зарегистрирован");
|
||||
if (UI.HasMainWindow())
|
||||
UI.getMainWindow().FocusCallback();
|
||||
if (Global.mainModule.getUI().hasMainWindow())
|
||||
Global.mainModule.getUI().getMainWindow().FocusCallback();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -126,12 +126,12 @@ public class CompilersDBTable extends iDBTable<Compiler> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -88,13 +88,13 @@ public class MachinesDBTable extends iDBTable<Machine> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getCredentialsMenuBar().ShowMachine();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getCredentialsMenuBar().ShowNoMachine();
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.GlobalData.RemoteFile.UI;
|
||||
import Common.Visual.Trees.TreeForm;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -19,13 +20,13 @@ public class RemoteFileChooserFields implements DialogFields {
|
||||
bBack.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
UI.getRemoteFileChooser().goUp();
|
||||
Global.mainModule.getUI().getRemoteFileChooser().goUp();
|
||||
}
|
||||
});
|
||||
bHome.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
UI.getRemoteFileChooser().goHome();
|
||||
Global.mainModule.getUI().getRemoteFileChooser().goHome();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
public class RemoteFilesTree extends DataTree {
|
||||
public RemoteFilesTree() {
|
||||
super(UI.getRemoteFileChooser().root);
|
||||
super(Global.mainModule.getUI().getRemoteFileChooser().root);
|
||||
}
|
||||
@Override
|
||||
public TreeRenderers getRenderer() {
|
||||
@@ -18,12 +18,12 @@ public class RemoteFilesTree extends DataTree {
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() {
|
||||
UI.getRemoteFileChooser().ShowCurrentRemoteFile();
|
||||
Global.mainModule.getUI().getRemoteFileChooser().ShowCurrentRemoteFile();
|
||||
}
|
||||
@Override
|
||||
public void LeftMouseAction2() {
|
||||
if (Global.mainModule.HasRemoteFile() && Global.mainModule.getRemoteFile().isDirectory()) {
|
||||
UI.getRemoteFileChooser().Refresh(Global.mainModule.getRemoteFile().full_name);
|
||||
Global.mainModule.getUI().getRemoteFileChooser().Refresh(Global.mainModule.getRemoteFile().full_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,12 +49,12 @@ public class CompilationTasksDBTable extends iDBTable<CompilationTask> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getDebugWindow().DropRunTasksComparison();
|
||||
Global.mainModule.getUI().getDebugWindow().DropRunTasksComparison();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getDebugWindow().DropRunTasksComparison();
|
||||
Global.mainModule.getUI().getDebugWindow().DropRunTasksComparison();
|
||||
}
|
||||
@Override
|
||||
public void CreateControl() {
|
||||
|
||||
@@ -36,12 +36,12 @@ public class RunTasksDBTable extends iDBTable<RunTask> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getDebugWindow().ShowCurrentRunTask();
|
||||
Global.mainModule.getUI().getDebugWindow().ShowCurrentRunTask();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getDebugWindow().ShowNoCurrentRunTask();
|
||||
Global.mainModule.getUI().getDebugWindow().ShowNoCurrentRunTask();
|
||||
}
|
||||
@Override
|
||||
public void CreateControl() {
|
||||
|
||||
Reference in New Issue
Block a user