промежуточный. сворачивание деревьев проекта по тестовой кнопке. думаю положить сворачивание в настройки компактности.
This commit is contained in:
@@ -100,6 +100,8 @@ public class GlobalProperties extends Properties {
|
||||
public boolean collapseFileGraphs = false;
|
||||
@Expose
|
||||
public boolean collapseFileMessages = false;
|
||||
@Expose
|
||||
public boolean collapseProjectTrees = false;
|
||||
//-
|
||||
@Override
|
||||
public File getFile() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package Common.UI.Menus_2023.MainMenuBar;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.UI.Menus_2023.ECButtonPosition;
|
||||
import Common.UI.Menus_2023.ExpandCollapseButton;
|
||||
import Common.UI.Menus_2023.MenuBarButton;
|
||||
import Common.UI.Menus_2023.VisualiserMenuBar;
|
||||
import Common.UI.UI;
|
||||
@@ -14,6 +16,7 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
JMenu analyses;
|
||||
JMenu transformations;
|
||||
MenuBarButton components;
|
||||
public ExpandCollapseButton RightECButton;
|
||||
public MainMenuBar() {
|
||||
addMenus(new LastOpenedProjectsMenu());
|
||||
addPasses(PassCode_2021.OpenCurrentProject, PassCode_2021.CreateEmptyProject);
|
||||
@@ -65,6 +68,13 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
}
|
||||
});
|
||||
*/
|
||||
add(RightECButton = new ExpandCollapseButton("область деревьев проекта", ECButtonPosition.Up) {
|
||||
{
|
||||
addActionListener(e -> {
|
||||
UI.getMainWindow().getProjectWindow().SwitchProjectTrees();
|
||||
});
|
||||
}
|
||||
});
|
||||
//---
|
||||
ShowProject(false);
|
||||
}
|
||||
|
||||
@@ -77,4 +77,8 @@ public interface ProjectWindow {
|
||||
//-
|
||||
void RefreshTabsNames();
|
||||
void FocusVersions();
|
||||
//--
|
||||
void CollapseProjectTrees();
|
||||
void ExpandProjectTrees();
|
||||
void SwitchProjectTrees();
|
||||
}
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="7bb8d" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<grid id="7bb8d" binding="projectBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Файл: -" icon="icons/Generate.png">
|
||||
<tooltip value="Код"/>
|
||||
@@ -41,11 +40,7 @@
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="68abc" binding="SC3">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="650"/>
|
||||
<dividerSize value="3"/>
|
||||
@@ -65,7 +60,7 @@
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="45a5e" binding="projectBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="45a5e" binding="projectTreesBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
|
||||
@@ -43,6 +43,7 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
private JPanel analysisFormPanel;
|
||||
private final JScrollPane FastAccessScroll;
|
||||
private JPanel projectViewPanel;
|
||||
private JPanel projectTreesBackground;
|
||||
private JPanel projectBackground;
|
||||
ProjectMenuBar menuBar;
|
||||
//-
|
||||
@@ -61,7 +62,7 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
public ProjectForm() {
|
||||
LoadSplitters();
|
||||
//-
|
||||
projectBackground.add(menuBar = new ProjectMenuBar(), BorderLayout.NORTH);
|
||||
projectTreesBackground.add(menuBar = new ProjectMenuBar(), BorderLayout.NORTH);
|
||||
arraysFormPanel.add((arraysForm = new ArraysForm()).getContent());
|
||||
functionsFormPanel.add((functionsForm = new FunctionsForm()).getContent());
|
||||
analysisFormPanel.add((analysisForm = new AnalysisForm()).getContent());
|
||||
@@ -288,4 +289,28 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
public void FocusVersions() {
|
||||
projectTabs.setSelectedIndex(5);
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
public void CollapseProjectTrees() {
|
||||
UI.Clear(projectBackground);
|
||||
projectBackground.add(fileBackground);
|
||||
projectBackground.updateUI();
|
||||
}
|
||||
@Override
|
||||
public void ExpandProjectTrees() {
|
||||
SC3.setLeftComponent(fileBackground);
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user