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

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

View File

@@ -20,9 +20,9 @@ public class GlobalProperties extends Properties {
@Expose
public Current.Mode Mode = Current.Mode.Normal;
@Expose
public String ServerAddress="alex-freenas.ddns.net";
public String ServerAddress = "alex-freenas.ddns.net";
@Expose
public String ServerUserName ="testuser";
public String ServerUserName = "testuser";
@Expose
public int ServerUserSHHPort = 23;
@Expose
@@ -84,7 +84,7 @@ public class GlobalProperties extends Properties {
@Expose
public String PerformanceAnalyzerPath = "";
@Expose
public int ComponentsBackUpsCount=10;
public int ComponentsBackUpsCount = 10;
//- тестирование.
@Expose
public int TestingKernels = 4; //число ядер для тестирования
@@ -95,12 +95,14 @@ public class GlobalProperties extends Properties {
@Expose
public boolean EmailOnTestingProgress = false; //включено ли оповещение по email о результатах тестирования.
@Expose
public boolean collapseCredentials=false;
public boolean collapseCredentials = false;
@Expose
public boolean collapseFileGraphs = false;
@Expose
public boolean collapseFileMessages = false;
//-
@Override
public File getFile() {
return Paths.get(System.getProperty("user.dir"),"properties").toFile();
return Paths.get(System.getProperty("user.dir"), "properties").toFile();
}
}

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