From 4e611e4333d820bda2eb072126a7a72139102492 Mon Sep 17 00:00:00 2001 From: 02090095 Date: Fri, 15 Mar 2024 16:26:01 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B8=D0=BD=D1=85=D1=80=D0=BE=D0=BD=20?= =?UTF-8?q?=D0=BF=D0=B0=D0=BD=D0=B5=D0=BB=D0=B5=D0=B9=20=D1=81=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=D0=B0=D0=BF=D1=84?= =?UTF-8?q?=D0=BE=D1=80,=20++?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 11 -------- src/Repository/Component/Visualiser.java | 2 +- src/Visual_DVM_2021/UI/Main/TestingForm.form | 4 +-- src/Visual_DVM_2021/UI/Main/TestingForm.java | 28 ++++++++++++++++++++ 4 files changed, 31 insertions(+), 14 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index decdc7a8..8c9e55b6 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -7,19 +7,8 @@ - - - - - - - - - - - diff --git a/src/Repository/Component/Visualiser.java b/src/Repository/Component/Visualiser.java index df360886..7174803b 100644 --- a/src/Repository/Component/Visualiser.java +++ b/src/Repository/Component/Visualiser.java @@ -62,7 +62,7 @@ public class Visualiser extends Component { //http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html @Override public void GetVersionInfo() { - version = 1079; + version = 1080; String pattern = "MMM dd yyyy HH:mm:ss"; DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH); date_text = df.format(getClassBuildTime()); diff --git a/src/Visual_DVM_2021/UI/Main/TestingForm.form b/src/Visual_DVM_2021/UI/Main/TestingForm.form index c15218e9..dd263e96 100644 --- a/src/Visual_DVM_2021/UI/Main/TestingForm.form +++ b/src/Visual_DVM_2021/UI/Main/TestingForm.form @@ -425,7 +425,7 @@ - + @@ -446,7 +446,7 @@ - + diff --git a/src/Visual_DVM_2021/UI/Main/TestingForm.java b/src/Visual_DVM_2021/UI/Main/TestingForm.java index 39c11a42..61403eec 100644 --- a/src/Visual_DVM_2021/UI/Main/TestingForm.java +++ b/src/Visual_DVM_2021/UI/Main/TestingForm.java @@ -15,6 +15,8 @@ import Visual_DVM_2021.UI.Interface.TestingWindow; import javax.swing.*; import java.awt.*; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; public class TestingForm implements FormWithSplitters, TestingWindow { private JPanel content; @Override @@ -71,6 +73,29 @@ public class TestingForm implements FormWithSplitters, TestingWindow { //-- private final SapforVersionsComparisonForm sapforVersionMaster; //сравнение версий тестов SAPFOR. private final SapforVersionsComparisonForm sapforVersionSlave; + private boolean events_on=true; + private final PropertyChangeListener sc65Listener = new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + if (events_on) { + events_on=false; + SC66.setDividerLocation(SC65.getDividerLocation()); + System.out.println("Left"); + events_on=true; + } + } + }; + private final PropertyChangeListener sc66Listener = new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + if (events_on) { + events_on=false; + SC65.setDividerLocation(SC66.getDividerLocation()); + System.out.println("Right"); + events_on=true; + } + } + }; //-- public TestingForm() { content.add(UI.testingBar, BorderLayout.NORTH); @@ -96,6 +121,9 @@ public class TestingForm implements FormWithSplitters, TestingWindow { //- SC65.setRightComponent(sapforVersionMaster.getContent()); SC66.setRightComponent(sapforVersionSlave.getContent()); + //-- + SC65.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, sc65Listener); + SC66.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, sc66Listener); //- Global.db.machines.mountUI(machinesPanel); Global.db.users.mountUI(usersPanel);