промежуточный. сворачивание деревьев проекта по тестовой кнопке. думаю положить сворачивание в настройки компактности.

This commit is contained in:
2024-03-20 19:12:43 +03:00
parent eaeaee869b
commit a39b8c3a13
7 changed files with 52 additions and 11 deletions

4
.idea/workspace.xml generated
View File

@@ -7,6 +7,10 @@
</component>
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/GlobalProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/GlobalProperties.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/UI/Menus_2023/MainMenuBar/MainMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/MainMenuBar/MainMenuBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/ProjectWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/ProjectWindow.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ProjectForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ProjectForm.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ProjectForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ProjectForm.java" afterDir="false" />
</list>

View File

@@ -35,6 +35,7 @@
"CheckTestingIntervalSeconds": 10,
"EmailOnTestingProgress": false,
"collapseCredentials": false,
"collapseFileGraphs": false,
"collapseFileMessages": false
"collapseFileGraphs": true,
"collapseFileMessages": true,
"collapseProjectTrees": true
}

View File

@@ -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() {

View File

@@ -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);
}

View File

@@ -77,4 +77,8 @@ public interface ProjectWindow {
//-
void RefreshTabsNames();
void FocusVersions();
//--
void CollapseProjectTrees();
void ExpandProjectTrees();
void SwitchProjectTrees();
}

View File

@@ -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>

View File

@@ -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);
}
}