рефакторинг хранения окон
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Menus.FileMenuBar;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.Menus.VisualiserMenuBar;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.Files.UI.Editor.SPFEditor;
|
||||
import _VisualDVM.Visual.UI;
|
||||
@@ -19,7 +20,7 @@ public class FileMenuBar extends VisualiserMenuBar {
|
||||
{
|
||||
setToolTipText("Поиск(Ctrl+F)");
|
||||
setIcon("/icons/LastOpened.png");
|
||||
addActionListener(e -> UI.ShowSearchForm());
|
||||
addActionListener(e -> Global.mainModule.getUI().ShowSearchForm());
|
||||
}
|
||||
});
|
||||
addPasses(PassCode.Save);
|
||||
|
||||
@@ -22,7 +22,7 @@ public class FileSettingsMenu extends VisualiserMenu {
|
||||
if (Global.mainModule.getFile().UpdateLanguage(languageName)) {
|
||||
Global.mainModule.getSapfor().ResetAllAnalyses();
|
||||
Global.mainModule.getFile().form.ShowLanguage();
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(Global.mainModule.getFile().node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(Global.mainModule.getFile().node);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -44,7 +44,7 @@ public class FileSettingsMenu extends VisualiserMenu {
|
||||
public void action(FileType fileType) {
|
||||
if (Global.mainModule.getFile().UpdateType(fileType)) {
|
||||
Global.mainModule.getSapfor().ResetAllAnalyses();
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(Global.mainModule.getFile().node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(Global.mainModule.getFile().node);
|
||||
Global.mainModule.getFile().form.ShowType();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
} else {
|
||||
Global.mainModule.getPass(PassCode.GetComponentsActualVersions).Do();
|
||||
Global.RefreshUpdatesStatus();
|
||||
UI.ShowComponentsWindow();
|
||||
Global.mainModule.getUI().getComponentsWindow().ShowDialog("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ProjectFilesMenu extends GraphMenu {
|
||||
{
|
||||
addActionListener(e -> {
|
||||
if (Global.mainModule.HasProject()) {
|
||||
UI.getVersionsWindow().getVersionsForm().getTree().SelectNode(Global.mainModule.getProject().node);
|
||||
Global.mainModule.getUI().getVersionsWindow().getVersionsForm().getTree().SelectNode(Global.mainModule.getProject().node);
|
||||
Global.mainModule.getPass(PassCode.DeleteVersion).Do();
|
||||
}
|
||||
});
|
||||
@@ -62,7 +62,7 @@ public class ProjectFilesMenu extends GraphMenu {
|
||||
Global.files_multiselection = !Global.files_multiselection;
|
||||
m_multiselection.setIcon(Utils_.getIcon(Global.files_multiselection ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
Global.mainModule.getProject().SelectAllFiles(false);
|
||||
UI.getMainWindow().getProjectWindow().RefreshProjectFiles();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().RefreshProjectFiles();
|
||||
//-
|
||||
});
|
||||
add(m_multiselection);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Menus.ProjectMenuBar;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.Menus.VisualiserMenuBar;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -18,7 +19,7 @@ public class ProjectMenuBar extends VisualiserMenuBar {
|
||||
setToolTipText("Профили");
|
||||
setIcon("/icons/Profiles.png");
|
||||
addActionListener(e -> {
|
||||
UI.ShowProfilesWindow();
|
||||
Global.mainModule.getUI().getProfilesWindow().ShowDialog("");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@ public class ProjectViewMenu extends VisualiserMenu {
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.TreeItalic));
|
||||
addActionListener(e -> {
|
||||
Global.mainModule.set(Current.ProjectView, view);
|
||||
UI.getMainWindow().getProjectWindow().ShowProjectView();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowProjectView();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ public class VersionsMenu extends GraphMenu<DataTree> {
|
||||
Global.versions_multiselection = !Global.versions_multiselection;
|
||||
m_multiselection.setIcon(Utils_.getIcon(Global.versions_multiselection ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
Global.mainModule.getRoot().SelectAllVersions(false);
|
||||
UI.getVersionsWindow().getVersionsForm().getTree().updateUI();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVersionsForm().getTree().updateUI();
|
||||
});
|
||||
add(m_multiselection);
|
||||
addSeparator();
|
||||
|
||||
Reference in New Issue
Block a user