Сделал сворачивание через меню настроек.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.GlobalProperties;
|
||||
import Common.UI.UI;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
@@ -25,4 +27,38 @@ public class UpdateProperty extends Pass_2021<Object> {
|
||||
field.set(Global.properties, newValue);
|
||||
Global.properties.Update();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
switch (name) {
|
||||
case "collapseCredentials":
|
||||
if ((boolean) newValue)
|
||||
UI.getMainWindow().getTestingWindow().CollapseCredentials();
|
||||
else
|
||||
UI.getMainWindow().getTestingWindow().ExpandCredentials();
|
||||
break;
|
||||
case "collapseProjectTrees":
|
||||
if (Current.HasProject()) {
|
||||
if ((boolean) newValue)
|
||||
UI.getMainWindow().getProjectWindow().CollapseProjectTrees();
|
||||
else UI.getMainWindow().getProjectWindow().ExpandProjectTrees();
|
||||
}
|
||||
break;
|
||||
case "collapseFileGraphs":
|
||||
if (Current.HasFile()) {
|
||||
if ((boolean) newValue)
|
||||
Current.getFile().form.CollapseGraphs();
|
||||
else
|
||||
Current.getFile().form.ExpandGraphs();
|
||||
}
|
||||
break;
|
||||
case "collapseFileMessages":
|
||||
if (Current.HasFile()) {
|
||||
if ((boolean) newValue)
|
||||
Current.getFile().form.CollapseMessages();
|
||||
else
|
||||
Current.getFile().form.ExpandMessages();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,9 +61,7 @@ public interface FileWindow extends VisualizerForm{
|
||||
//--
|
||||
void CollapseGraphs();
|
||||
void ExpandGraphs();
|
||||
void SwitchGraphs();
|
||||
//--
|
||||
void CollapseMessages();
|
||||
void ExpandMessages();
|
||||
void SwitchMessages();
|
||||
}
|
||||
|
||||
@@ -80,5 +80,4 @@ public interface ProjectWindow {
|
||||
//--
|
||||
void CollapseProjectTrees();
|
||||
void ExpandProjectTrees();
|
||||
void SwitchProjectTrees();
|
||||
}
|
||||
|
||||
@@ -34,5 +34,4 @@ public interface TestingWindow extends VisualizerForm {
|
||||
void ShowDVMPackage(DVMPackage master);
|
||||
void CollapseCredentials();
|
||||
void ExpandCredentials();
|
||||
void SwitchCredentials(boolean flag);
|
||||
}
|
||||
|
||||
@@ -98,11 +98,9 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
ShowProperties();
|
||||
Pass_2021.passes.get(PassCode_2021.Save).setControlsEnabled(false);
|
||||
//-
|
||||
UI.fileMenuBar.LeftECButton.Switch(Global.properties.collapseFileGraphs);
|
||||
if (Global.properties.collapseFileGraphs)
|
||||
CollapseGraphs();
|
||||
//-
|
||||
UI.fileMenuBar.DownECButton.Switch(Global.properties.collapseFileMessages);
|
||||
if (Global.properties.collapseFileMessages)
|
||||
CollapseMessages();
|
||||
}
|
||||
@@ -389,17 +387,6 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
SC12.updateUI();
|
||||
}
|
||||
@Override
|
||||
public void SwitchGraphs() {
|
||||
if (Global.properties.collapseFileGraphs)
|
||||
ExpandGraphs();
|
||||
else
|
||||
CollapseGraphs();
|
||||
//---------------
|
||||
Global.properties.collapseFileGraphs =!Global.properties.collapseFileGraphs;
|
||||
Global.properties.Update();
|
||||
UI.fileMenuBar.LeftECButton.Switch(Global.properties.collapseFileGraphs);
|
||||
}
|
||||
@Override
|
||||
public void CollapseMessages() {
|
||||
UI.Clear(content);
|
||||
content.add(editorBackground);
|
||||
@@ -419,15 +406,4 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
SC1.updateUI();
|
||||
SC12.updateUI();
|
||||
}
|
||||
@Override
|
||||
public void SwitchMessages() {
|
||||
if (Global.properties.collapseFileMessages)
|
||||
ExpandMessages();
|
||||
else
|
||||
CollapseMessages();
|
||||
//---------------
|
||||
Global.properties.collapseFileMessages =!Global.properties.collapseFileMessages;
|
||||
Global.properties.Update();
|
||||
UI.fileMenuBar.DownECButton.Switch(Global.properties.collapseFileMessages);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,9 +85,9 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
SwitchScreen(Global.db.settings.get(SettingName.SmallScreen).toBoolean());
|
||||
RefreshTabsNames();
|
||||
//--
|
||||
UI.mainMenuBar.RightECButton.Switch(Global.properties.collapseProjectTrees);
|
||||
if (Global.properties.collapseProjectTrees)
|
||||
CollapseProjectTrees();
|
||||
//--
|
||||
}
|
||||
@Override
|
||||
public void SaveSplitters() {
|
||||
@@ -306,15 +306,4 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
projectBackground.add(SC3);
|
||||
projectBackground.updateUI();
|
||||
}
|
||||
@Override
|
||||
public void SwitchProjectTrees() {
|
||||
if (Global.properties.collapseProjectTrees)
|
||||
ExpandProjectTrees();
|
||||
else
|
||||
CollapseProjectTrees();
|
||||
//---------------
|
||||
Global.properties.collapseProjectTrees =!Global.properties.collapseProjectTrees;
|
||||
Global.properties.Update();
|
||||
UI.mainMenuBar.RightECButton.Switch(Global.properties.collapseProjectTrees);
|
||||
}
|
||||
}
|
||||
@@ -135,6 +135,9 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
Global.testingServer.db.sapforConfigurationCommands.mountUI(sapforConfigurationCommandsPanel);
|
||||
Global.testingServer.db.serverSapfors.mountUI(serverSapforsPanel);
|
||||
Global.testingServer.db.sapforPackages.mountUI(sapforPackagesPanel);
|
||||
//--
|
||||
if (Global.properties.collapseCredentials)
|
||||
CollapseCredentials();
|
||||
}
|
||||
//-
|
||||
@Override
|
||||
@@ -305,7 +308,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
credentialsPanel.add(UI.credentialsBar);
|
||||
SC71.setDividerLocation(30);
|
||||
SC71.setDividerSize(0);
|
||||
//SC71.setEnabled(false);
|
||||
credentialsPanel.revalidate();
|
||||
credentialsPanel.repaint();
|
||||
}
|
||||
@@ -314,19 +316,8 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
UI.Clear(credentialsPanel);
|
||||
credentialsPanel.add(SC18);
|
||||
SC71.setDividerLocation(200);
|
||||
//SC71.setEnabled(true);
|
||||
SC71.setDividerSize(3);
|
||||
credentialsPanel.revalidate();
|
||||
credentialsPanel.repaint();
|
||||
}
|
||||
@Override
|
||||
public void SwitchCredentials(boolean flag) {
|
||||
if (flag) {
|
||||
ExpandCredentials();
|
||||
} else {
|
||||
CollapseCredentials();
|
||||
}
|
||||
Global.properties.collapseCredentials = !flag;
|
||||
Global.properties.Update();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user