no message
This commit is contained in:
@@ -1,51 +1,8 @@
|
||||
package Common.UI.Menus_2023.TasksPackagesMenuBar;
|
||||
import Common.Current;
|
||||
import Common.UI.Menus_2023.DataMenuBar;
|
||||
import Common.UI.Menus_2023.MenuBarButton;
|
||||
import Common.UI.Themes.VisualiserFonts;
|
||||
import Common.UI.UI;
|
||||
import Common.Utils.Utils;
|
||||
import TestingSystem.TestingServer;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class TasksPackagesMenuBar extends DataMenuBar {
|
||||
JButton autorefreshButton;
|
||||
JSpinner sCheckTime;
|
||||
public TasksPackagesMenuBar() {
|
||||
super("пакеты задач", PassCode_2021.SynchronizeTestsTasks, PassCode_2021.AbortSelectedPackages);
|
||||
add(autorefreshButton = new MenuBarButton() {
|
||||
{
|
||||
setText("проверка раз в");
|
||||
setToolTipText("автоматическое обновление состояния пакета задач");
|
||||
Mark();
|
||||
addActionListener(e -> {
|
||||
TestingServer.checkTasks = !TestingServer.checkTasks;
|
||||
TestingServer.switchTimer(TestingServer.checkTasks);
|
||||
Mark();
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(Utils.getIcon(TestingServer.checkTasks ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
}
|
||||
});
|
||||
add(sCheckTime = new JSpinner());
|
||||
sCheckTime.setPreferredSize(new Dimension(60, 26));
|
||||
sCheckTime.setMaximumSize(new Dimension(60, 26));
|
||||
sCheckTime.setModel(new SpinnerNumberModel(TestingServer.checkIntervalSecond, 10, 3600, 1));
|
||||
UI.MakeSpinnerRapid(sCheckTime, e -> {
|
||||
TestingServer.checkIntervalSecond = (int) sCheckTime.getValue();
|
||||
if (TestingServer.checkTasks) TestingServer.ResetTimer();
|
||||
});
|
||||
add(new JLabel(" сек") {
|
||||
{
|
||||
setFont(Current.getTheme().Fonts.get(VisualiserFonts.TreeItalic));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void ShowAutorefresh() {
|
||||
autorefreshButton.setIcon(Utils.getIcon(TestingServer.checkTasks ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
super("пакеты задач", PassCode_2021.AbortSelectedPackages);
|
||||
}
|
||||
}
|
||||
|
||||
50
src/Common/UI/Menus_2023/TestingBar/TestingBar.java
Normal file
50
src/Common/UI/Menus_2023/TestingBar/TestingBar.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package Common.UI.Menus_2023.TestingBar;
|
||||
import Common.Current;
|
||||
import Common.UI.Menus_2023.MenuBarButton;
|
||||
import Common.UI.Menus_2023.VisualiserMenuBar;
|
||||
import Common.UI.Themes.VisualiserFonts;
|
||||
import Common.UI.UI;
|
||||
import Common.Utils.Utils;
|
||||
import TestingSystem.TestingServer;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class TestingBar extends VisualiserMenuBar {
|
||||
JButton autorefreshButton;
|
||||
JSpinner sCheckTime;
|
||||
public TestingBar() {
|
||||
addPasses(PassCode_2021.SynchronizeTestsTasks);
|
||||
add(autorefreshButton = new MenuBarButton() {
|
||||
{
|
||||
setText("проверка раз в");
|
||||
setToolTipText("автоматическое обновление состояния пакета задач");
|
||||
Mark();
|
||||
addActionListener(e -> {
|
||||
TestingServer.checkTasks = !TestingServer.checkTasks;
|
||||
TestingServer.switchTimer(TestingServer.checkTasks);
|
||||
Mark();
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(Utils.getIcon(TestingServer.checkTasks ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
}
|
||||
});
|
||||
add(sCheckTime = new JSpinner());
|
||||
sCheckTime.setPreferredSize(new Dimension(60, 26));
|
||||
sCheckTime.setMaximumSize(new Dimension(60, 26));
|
||||
sCheckTime.setModel(new SpinnerNumberModel(TestingServer.checkIntervalSecond, 10, 3600, 1));
|
||||
UI.MakeSpinnerRapid(sCheckTime, e -> {
|
||||
TestingServer.checkIntervalSecond = (int) sCheckTime.getValue();
|
||||
if (TestingServer.checkTasks) TestingServer.ResetTimer();
|
||||
});
|
||||
add(new JLabel(" сек") {
|
||||
{
|
||||
setFont(Current.getTheme().Fonts.get(VisualiserFonts.TreeItalic));
|
||||
}
|
||||
});
|
||||
}
|
||||
public void ShowAutorefresh() {
|
||||
autorefreshButton.setIcon(Utils.getIcon(TestingServer.checkTasks ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import Common.UI.Menus_2023.ServerSapforsBar.ServerSapforsBar;
|
||||
import Common.UI.Menus_2023.SubscribersMenuBar.SubscribersMenuBar;
|
||||
import Common.UI.Menus_2023.TasksPackagesMenuBar.TasksPackagesMenuBar;
|
||||
import Common.UI.Menus_2023.TestRunTasksMenuBar.TestRunTasksMenuBar;
|
||||
import Common.UI.Menus_2023.TestingBar.TestingBar;
|
||||
import Common.UI.Menus_2023.TestsMenuBar.TestsMenuBar;
|
||||
import Common.UI.Menus_2023.UsersMenuBar.UsersMenuBar;
|
||||
import Common.UI.Menus_2023.VariantsMenuBar.VariantsMenuBar;
|
||||
@@ -105,6 +106,7 @@ import static Common.UI.Trees.TreeRenderers.*;
|
||||
public class UI {
|
||||
public static MenuElement[] last_menu_path;
|
||||
public static MainMenuBar mainMenuBar = null;
|
||||
public static TestingBar testingBar = null;
|
||||
public static VersionsMenuBar versionsMenuBar = null;
|
||||
public static FastAccessMenuBar fastAccessMenuBar = null;
|
||||
//------------
|
||||
@@ -207,6 +209,7 @@ public class UI {
|
||||
}
|
||||
public static void CreateMenus() {
|
||||
mainMenuBar = new MainMenuBar();
|
||||
testingBar = new TestingBar();
|
||||
versionsMenuBar = new VersionsMenuBar();
|
||||
fastAccessMenuBar = new FastAccessMenuBar();
|
||||
//---------------------------------------------------->>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="Visual_DVM_2021.UI.Main.TestingForm">
|
||||
<grid id="27dc6" binding="content" 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="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="1034" height="666"/>
|
||||
</constraints>
|
||||
@@ -12,9 +11,7 @@
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="2a81a" binding="testingTabs">
|
||||
<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"/>
|
||||
</constraints>
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Global;
|
||||
import Common.UI.Menus_2023.TasksPackagesMenuBar.TasksPackagesMenuBar;
|
||||
import Common.UI.TextField.StyledTextField;
|
||||
import Common.UI.UI;
|
||||
import TestingSystem.Configuration.UI.ConfigurationDBTable;
|
||||
import TestingSystem.TasksPackage.TasksPackageDBTable;
|
||||
import Visual_DVM_2021.UI.Interface.FormWithSplitters;
|
||||
import Visual_DVM_2021.UI.Interface.TestingWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
private JPanel content;
|
||||
@Override
|
||||
@@ -65,6 +64,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
public SapforPackagesComparisonForm sapforTestingSlave;
|
||||
//-
|
||||
public TestingForm() {
|
||||
content.add(UI.testingBar, BorderLayout.NORTH);
|
||||
LoadSplitters();
|
||||
//-
|
||||
dvmTestingRunMaster = new TestRunTasksComparisonForm(dvmTestingRunSlave = new TestRunTasksComparisonForm(null));
|
||||
@@ -130,7 +130,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowAutoActualizeTestsState() {
|
||||
((TasksPackagesMenuBar) UI.menuBars.get(TasksPackageDBTable.class)).ShowAutorefresh();
|
||||
UI.testingBar.ShowAutorefresh();
|
||||
}
|
||||
@Override
|
||||
public void FocusTestingTasks() {
|
||||
|
||||
Reference in New Issue
Block a user