промежуточный. сворачивание сообщений и левых графов. завтра еще доотлажу.

This commit is contained in:
2024-03-19 02:22:41 +03:00
parent 2a2000147c
commit 05097bc22e
8 changed files with 83 additions and 39 deletions

11
.idea/workspace.xml generated
View File

@@ -7,21 +7,14 @@
</component>
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/ECButtonPosition.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/ExpandCollapseButton.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/icons/SilwerArrowLeft.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/icons/SilwerArrowRight.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" 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/ExpandCollapseButton.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/ExpandCollapseButton.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/UI/Menus_2023/FileMenuBar/FileMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/FileMenuBar/FileMenuBar.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/Common/UI/UI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/UI.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/FileWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/FileWindow.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/FileForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/FileForm.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/FileForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/FileForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/buffer_.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/buffer_.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/buffer_.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/buffer_.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

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

View File

@@ -98,6 +98,8 @@ public class GlobalProperties extends Properties {
public boolean collapseCredentials = false;
@Expose
public boolean collapseFileGraphs = false;
@Expose
public boolean collapseFileMessages = false;
//-
@Override
public File getFile() {

View File

@@ -14,10 +14,10 @@ public class ExpandCollapseButton extends MenuBarButton {
prefix = "Развернуть";
switch (position) {
case Up:
icon_name = "ExpandUp";
icon_name = "ExpandDown";
break;
case Down:
icon_name = "CollapseDown";
icon_name = "CollapseUp";
break;
case Left:
icon_name = "SilwerArrowLeft";
@@ -30,10 +30,10 @@ public class ExpandCollapseButton extends MenuBarButton {
prefix = "Свернуть";
switch (position) {
case Up:
icon_name = "ExpandDown";
icon_name = "CollapseUp";
break;
case Down:
icon_name = "CollapseUp";
icon_name = "ExpandDown";
break;
case Left:
icon_name = "SilwerArrowRight";

View File

@@ -13,6 +13,8 @@ import javax.swing.*;
import java.awt.*;
public class FileMenuBar extends VisualiserMenuBar {
public ExpandCollapseButton LeftECButton;
public ExpandCollapseButton DownECButton;
//--
public JSpinner sToGo;
JLabel LineCountLabel;
public JLabel CurrentSymbolLabel;
@@ -27,6 +29,13 @@ public class FileMenuBar extends VisualiserMenuBar {
});
}
});
add(DownECButton = new ExpandCollapseButton("область сообщений файла", ECButtonPosition.Down) {
{
addActionListener(e -> {
Current.getFile().form.SwitchMessages();
});
}
});
add(new MenuBarButton() {
{
setToolTipText("Поиск(Ctrl+F)");

View File

@@ -62,4 +62,8 @@ public interface FileWindow extends VisualizerForm{
void CollapseGraphs();
void ExpandGraphs();
void SwitchGraphs();
//--
void CollapseMessages();
void ExpandMessages();
void SwitchMessages();
}

View File

@@ -188,8 +188,7 @@
</tabbedpane>
</children>
</grid>
<grid id="a0d95" 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="a0d95" binding="editorBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
@@ -197,13 +196,9 @@
<border type="none"/>
<children>
<splitpane id="9b595" binding="SC12">
<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="145"/>
<dividerLocation value="150"/>
<dividerSize value="3"/>
</properties>
<border type="none"/>

View File

@@ -59,6 +59,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
private JPanel recommendationsPanel;
private JPanel graphsBackground;
private JPanel messagesBackground;
private JPanel editorBackground;
//--------------->
//-
private TreeForm loopsForm; //рудиментарно. следует сделать интерфейс такой же как у таблиц
@@ -100,6 +101,10 @@ public class FileForm implements FileWindow, FormWithSplitters {
UI.fileMenuBar.LeftECButton.Switch(Global.properties.collapseFileGraphs);
if (Global.properties.collapseFileGraphs)
CollapseGraphs();
//-
UI.fileMenuBar.DownECButton.Switch(Global.properties.collapseFileMessages);
if (Global.properties.collapseFileMessages)
CollapseMessages();
}
@Override
public void ShowLanguage() {
@@ -365,20 +370,23 @@ public class FileForm implements FileWindow, FormWithSplitters {
//--
@Override
public void CollapseGraphs() {
UI.Clear(graphsBackground);
SC12.setDividerLocation(0);
SC12.setDividerSize(0);
graphsBackground.revalidate();
graphsBackground.repaint();
UI.Clear(editorBackground);
editorBackground.add(editorPanel);
content.updateUI();
SC1.updateUI();
SC12.updateUI();
}
@Override
public void ExpandGraphs() {
UI.Clear(graphsBackground);
graphsBackground.add(graphsTabs);
SC12.setDividerLocation(200);
SC12.setDividerSize(3);
graphsBackground.revalidate();
graphsBackground.repaint();
UI.Clear(editorBackground);
SC12.setRightComponent(editorPanel);
editorBackground.add(SC12);
//--
SC12.setDividerLocation(Global.db.splitters.get("SC12").position);
//--
content.updateUI();
SC1.updateUI();
SC12.updateUI();
}
@Override
public void SwitchGraphs() {
@@ -386,8 +394,40 @@ public class FileForm implements FileWindow, FormWithSplitters {
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);
//--
content.updateUI();
SC1.updateUI();
SC12.updateUI();
}
@Override
public void ExpandMessages() {
UI.Clear(content);
SC1.setLeftComponent(editorBackground);
content.add(SC1);
SC1.setDividerLocation(Global.db.splitters.get("SC1").position);
//--
content.updateUI();
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);
}
}