2024-10-14 16:16:41 +03:00
|
|
|
package _VisualDVM.Visual;
|
|
|
|
|
import Common.Visual.UIModule_;
|
2024-10-15 02:32:52 +03:00
|
|
|
import _VisualDVM.Global;
|
|
|
|
|
import _VisualDVM.GlobalData.RemoteFile.UI.RemoteFileChooser;
|
2024-11-19 11:21:12 +03:00
|
|
|
import _VisualDVM.Passes.PassCode;
|
2024-10-14 21:55:58 +03:00
|
|
|
import _VisualDVM.TestingSystem.Common.TestingMenuBar;
|
2024-10-15 02:32:52 +03:00
|
|
|
import _VisualDVM.Visual.Interface.DebugWindow;
|
|
|
|
|
import _VisualDVM.Visual.Interface.VersionsWindow;
|
2024-12-02 23:11:40 +03:00
|
|
|
import _VisualDVM.Visual.Menus.MainMenuBar.MainMenuBar;
|
2024-10-14 21:55:58 +03:00
|
|
|
import _VisualDVM.Visual.Menus.VersionsMenuBar.VersionsMenuBar;
|
2024-10-14 18:41:02 +03:00
|
|
|
import _VisualDVM.Visual.Syntax.LightSPFEditorTheme;
|
2024-10-15 02:32:52 +03:00
|
|
|
import _VisualDVM.Visual.Windows.*;
|
2024-10-14 16:16:41 +03:00
|
|
|
public class MainUI extends UIModule_ {
|
2024-12-02 23:11:40 +03:00
|
|
|
public MainMenuBar mainMenuBar = null;
|
2024-10-15 02:32:52 +03:00
|
|
|
public MainWindow mainWindow = null;
|
|
|
|
|
public SearchReplaceForm searchReplaceWindow = null;
|
|
|
|
|
public ProfilesForm profilesWindow = null;
|
|
|
|
|
public VersionsWindow versionsWindow = null;
|
|
|
|
|
public DebugWindow debugWindow = null;
|
|
|
|
|
public RemoteFileChooser remoteFileChooser = null;
|
2024-10-20 17:27:58 +03:00
|
|
|
ComponentsWindow componentsWindow = null;
|
2024-10-15 02:32:52 +03:00
|
|
|
//-
|
2024-10-14 21:55:58 +03:00
|
|
|
TestingMenuBar testingMenuBar = null;
|
|
|
|
|
VersionsMenuBar versionsMenuBar = null;
|
2024-10-15 02:32:52 +03:00
|
|
|
//-
|
2024-10-15 13:35:33 +03:00
|
|
|
//-
|
|
|
|
|
public MainUI() {
|
|
|
|
|
setTheme(new LightSPFEditorTheme());
|
|
|
|
|
}
|
|
|
|
|
//-
|
2024-10-15 02:32:52 +03:00
|
|
|
public TestingMenuBar getTestingMenuBar() {
|
|
|
|
|
if (testingMenuBar == null)
|
2024-10-14 21:55:58 +03:00
|
|
|
testingMenuBar = new TestingMenuBar();
|
|
|
|
|
return testingMenuBar;
|
|
|
|
|
}
|
2024-10-15 02:32:52 +03:00
|
|
|
public VersionsMenuBar getVersionsMenuBar() {
|
|
|
|
|
if (versionsMenuBar == null)
|
2024-10-14 21:55:58 +03:00
|
|
|
versionsMenuBar = new VersionsMenuBar();
|
|
|
|
|
return versionsMenuBar;
|
|
|
|
|
}
|
2024-10-15 02:32:52 +03:00
|
|
|
public MainWindow getMainWindow() {
|
|
|
|
|
if (mainWindow == null)
|
|
|
|
|
mainWindow = new MainForm();
|
|
|
|
|
return mainWindow;
|
|
|
|
|
}
|
|
|
|
|
public boolean hasMainWindow() {
|
|
|
|
|
return mainWindow != null;
|
|
|
|
|
}
|
2024-10-20 17:27:58 +03:00
|
|
|
public ComponentsWindow getComponentsWindow() {
|
2024-10-15 02:32:52 +03:00
|
|
|
if (componentsWindow == null)
|
2024-10-20 17:27:58 +03:00
|
|
|
componentsWindow = new ComponentsWindow();
|
2024-11-19 11:21:12 +03:00
|
|
|
//-
|
|
|
|
|
Global.mainModule.getPass(PassCode.PublishComponent).setControlsVisible(
|
|
|
|
|
(Global.mainModule.getAccount() != null) ? Global.mainModule.getAccount().isAdmin() : false);
|
|
|
|
|
//--
|
2024-10-15 02:32:52 +03:00
|
|
|
return componentsWindow;
|
|
|
|
|
}
|
|
|
|
|
//--
|
|
|
|
|
//возможно перекинуть на тестирование. потом.
|
|
|
|
|
public DebugWindow getDebugWindow() {
|
|
|
|
|
if (debugWindow == null)
|
|
|
|
|
debugWindow = new DebugForm();
|
|
|
|
|
return debugWindow;
|
|
|
|
|
}
|
|
|
|
|
public void HideSearchForm() {
|
2025-01-11 17:43:27 +03:00
|
|
|
if (getSearchReplaceWindow().isVisible())
|
|
|
|
|
getSearchReplaceWindow().setVisible(false);
|
2024-10-15 02:32:52 +03:00
|
|
|
}
|
|
|
|
|
public VersionsWindow getVersionsWindow() {
|
|
|
|
|
return versionsWindow;
|
|
|
|
|
}
|
|
|
|
|
public SearchReplaceForm getSearchReplaceWindow() {
|
|
|
|
|
if (searchReplaceWindow == null)
|
|
|
|
|
searchReplaceWindow = new SearchReplaceForm();
|
|
|
|
|
return searchReplaceWindow;
|
|
|
|
|
}
|
|
|
|
|
public void ShowSearchForm(boolean replace) {
|
|
|
|
|
searchReplaceWindow.setMode(replace);
|
|
|
|
|
searchReplaceWindow.ShowMode();
|
|
|
|
|
ShowSearchForm();
|
|
|
|
|
}
|
|
|
|
|
public void ShowSearchForm() {
|
|
|
|
|
if (searchReplaceWindow.isVisible())
|
|
|
|
|
searchReplaceWindow.Refresh();
|
|
|
|
|
else
|
|
|
|
|
searchReplaceWindow.Show();
|
|
|
|
|
}
|
|
|
|
|
public RemoteFileChooser getRemoteFileChooser() {
|
|
|
|
|
if (remoteFileChooser == null)
|
|
|
|
|
remoteFileChooser = new RemoteFileChooser();
|
|
|
|
|
return remoteFileChooser;
|
|
|
|
|
}
|
|
|
|
|
public void CreateVersionsWindow() {
|
|
|
|
|
versionsWindow = new VersionsForm(Global.mainModule.getRoot());
|
|
|
|
|
}
|
|
|
|
|
public ProfilesForm getProfilesWindow() {
|
|
|
|
|
if (profilesWindow == null)
|
|
|
|
|
profilesWindow = new ProfilesForm();
|
|
|
|
|
return profilesWindow;
|
|
|
|
|
}
|
2024-10-14 16:16:41 +03:00
|
|
|
}
|