no message

This commit is contained in:
2024-09-16 15:41:43 +03:00
parent 7ea64c49d1
commit d4d8d255fb
27 changed files with 72 additions and 481 deletions

View File

@@ -0,0 +1,402 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="TestingSystem.DVM.DVMConfiguration.UI.ConfigurationFields">
<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"/>
<constraints>
<xy x="20" y="20" width="877" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="78a2d" binding="SC1">
<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>
<properties>
<dividerLocation value="500"/>
<dividerSize value="3"/>
</properties>
<border type="none"/>
<children>
<grid id="ee2fd" layout-manager="GridLayoutManager" row-count="8" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<splitpane position="left"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="259d7" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="название"/>
</properties>
</component>
<vspacer id="264c1">
<constraints>
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="6795f" class="javax.swing.JTextField" binding="tfName" custom-create="true">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="200" height="30"/>
<preferred-size width="238" height="30"/>
<maximum-size width="200" height="30"/>
</grid>
</constraints>
<properties/>
</component>
<component id="9219f" class="javax.swing.JSpinner" binding="sMinDimProc">
<constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/>
<preferred-size width="100" height="30"/>
<maximum-size width="100" height="30"/>
</grid>
</constraints>
<properties/>
</component>
<component id="5686a" class="javax.swing.JLabel">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="мин. число процессоров по измерению"/>
</properties>
</component>
<component id="79cbe" class="javax.swing.JLabel">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="макс. число процессоров по измерению"/>
</properties>
</component>
<component id="33803" class="javax.swing.JSpinner" binding="sMaxDimProc">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/>
<preferred-size width="100" height="30"/>
<maximum-size width="100" height="30"/>
</grid>
</constraints>
<properties/>
</component>
<component id="9b066" class="javax.swing.JLabel">
<constraints>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="макс. время компиляции, сек"/>
</properties>
</component>
<component id="d706b" class="javax.swing.JSpinner" binding="sCompilationMaxtime">
<constraints>
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/>
<preferred-size width="238" height="30"/>
<maximum-size width="100" height="30"/>
</grid>
</constraints>
<properties/>
</component>
<component id="a3108" class="javax.swing.JLabel">
<constraints>
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="макс. время выполнения, сек"/>
</properties>
</component>
<component id="22d31" class="javax.swing.JSpinner" binding="sRunMaxtime">
<constraints>
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/>
<preferred-size width="100" height="30"/>
<maximum-size width="100" height="30"/>
</grid>
</constraints>
<properties/>
</component>
<component id="cda3" class="javax.swing.JCheckBox" binding="cbCube">
<constraints>
<grid row="4" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<horizontalAlignment value="0"/>
<icon value="icons/NotPick.png"/>
<selectedIcon value="icons/Pick.png"/>
<text value="кубические решётки"/>
<toolTipText value="матрица с одинаковым размером измерений"/>
</properties>
</component>
<component id="a79b8" class="javax.swing.JLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="макс. число процессоров"/>
</properties>
</component>
<component id="a6c17" class="javax.swing.JSpinner" binding="sMaxProc">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/>
<preferred-size width="100" height="30"/>
<maximum-size width="100" height="30"/>
</grid>
</constraints>
<properties/>
</component>
</children>
</grid>
<grid id="f79b4" 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"/>
<constraints>
<splitpane position="right"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="bd8be" binding="SC2">
<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>
<properties>
<dividerLocation value="180"/>
<dividerSize value="3"/>
<orientation value="0"/>
</properties>
<border type="none"/>
<children>
<grid id="a9834" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<toolbar id="4f6a1" binding="flagsTools">
<constraints border-constraint="North"/>
<properties>
<floatable value="false"/>
</properties>
<border type="none"/>
<children>
<component id="566f4" class="javax.swing.JLabel">
<constraints/>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<foreground color="-16777216"/>
<text value="флаги"/>
</properties>
</component>
<component id="79287" class="javax.swing.JButton" binding="bAddFlags">
<constraints/>
<properties>
<borderPainted value="false"/>
<icon value="icons/Menu/Regions.png"/>
<maximumSize width="30" height="30"/>
<minimumSize width="30" height="30"/>
<preferredSize width="30" height="30"/>
<text value=""/>
<toolTipText value="Добавить флаги"/>
</properties>
</component>
<component id="1cb75" class="javax.swing.JButton" binding="bDeleteFlags">
<constraints/>
<properties>
<borderPainted value="false"/>
<icon value="icons/Delete.png"/>
<maximumSize width="30" height="30"/>
<minimumSize width="30" height="30"/>
<preferredSize width="30" height="30"/>
<text value=""/>
<toolTipText value="Удалить флаги"/>
</properties>
</component>
</children>
</toolbar>
<scrollpane id="99ead">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children>
<component id="c0373" class="javax.swing.JList" binding="flagsList" custom-create="true">
<constraints/>
<properties/>
</component>
</children>
</scrollpane>
</children>
</grid>
<grid id="b9287" 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"/>
<constraints>
<splitpane position="right"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<splitpane id="53277" 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>
<properties>
<dividerLocation value="85"/>
<dividerSize value="3"/>
<orientation value="0"/>
</properties>
<border type="none"/>
<children>
<grid id="3d5c8" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<toolbar id="612de" binding="parTools">
<constraints border-constraint="North"/>
<properties>
<floatable value="false"/>
</properties>
<border type="none"/>
<children>
<component id="4a428" class="javax.swing.JLabel">
<constraints/>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<foreground color="-16777216"/>
<text value="usr par"/>
</properties>
</component>
<component id="1d160" class="javax.swing.JButton" binding="bAddPar">
<constraints/>
<properties>
<borderPainted value="false"/>
<icon value="icons/RedAdd.png"/>
<maximumSize width="30" height="30"/>
<minimumSize width="30" height="30"/>
<preferredSize width="30" height="30"/>
<text value=""/>
<toolTipText value="Добавить параметр DVM системы"/>
</properties>
</component>
<component id="61ba8" class="javax.swing.JButton" binding="bDeletePar">
<constraints/>
<properties>
<borderPainted value="false"/>
<icon value="icons/Delete.png"/>
<maximumSize width="30" height="30"/>
<minimumSize width="30" height="30"/>
<preferredSize width="30" height="30"/>
<text value=""/>
<toolTipText value="Удалить параметр DVM системы"/>
</properties>
</component>
</children>
</toolbar>
<scrollpane id="d0f3b">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children>
<component id="7cdd5" class="javax.swing.JList" binding="parList" custom-create="true">
<constraints/>
<properties/>
</component>
</children>
</scrollpane>
</children>
</grid>
<grid id="4c856" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<toolbar id="81953" binding="environmentsTools">
<constraints border-constraint="North"/>
<properties>
<floatable value="false"/>
</properties>
<border type="none"/>
<children>
<component id="cec3c" class="javax.swing.JLabel">
<constraints/>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<foreground color="-16777216"/>
<text value="окружение"/>
</properties>
</component>
<component id="1e835" class="javax.swing.JButton" binding="bAddEnvironments">
<constraints/>
<properties>
<borderPainted value="false"/>
<icon value="icons/Menu/Regions.png"/>
<maximumSize width="30" height="30"/>
<minimumSize width="30" height="30"/>
<preferredSize width="30" height="30"/>
<text value=""/>
<toolTipText value="Добавить набор переменных окружения"/>
</properties>
</component>
<component id="b9e9d" class="javax.swing.JButton" binding="bDeleteEnvironment">
<constraints/>
<properties>
<borderPainted value="false"/>
<icon value="icons/Delete.png"/>
<maximumSize width="30" height="30"/>
<minimumSize width="30" height="30"/>
<preferredSize width="30" height="30"/>
<text value=""/>
<toolTipText value="Удалить переменную окружения"/>
</properties>
</component>
</children>
</toolbar>
<scrollpane id="f94f5">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children>
<component id="951ed" class="javax.swing.JList" binding="environmentsList" custom-create="true">
<constraints/>
<properties/>
</component>
</children>
</scrollpane>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>
</form>

View File

@@ -0,0 +1,106 @@
package TestingSystem.DVM.DVMConfiguration.UI;
import Common.Current;
import Common.UI.VisualiserStringList;
import Common.UI.TextField.StyledTextField;
import Common.UI.Windows.Dialog.DialogFields;
import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.Pass_2021;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ConfigurationFields implements DialogFields {
public JTextField tfName;
public JSpinner sMinDimProc;
public JSpinner sMaxDimProc;
public JSpinner sCompilationMaxtime;
public JSpinner sRunMaxtime;
public JCheckBox cbCube;
public JSpinner sMaxProc;
public JList<String> flagsList;
public JList<String> environmentsList;
public JList<String> parList;
//-
private JPanel content;
private JSplitPane SC1;
private JSplitPane SC2;
private JToolBar flagsTools;
public JButton bAddFlags;
public JButton bDeleteFlags;
private JSplitPane SC3;
private JToolBar parTools;
public JButton bAddPar;
public JButton bDeletePar;
private JToolBar environmentsTools;
public JButton bAddEnvironments;
public JButton bDeleteEnvironment;
@Override
public Component getContent() {
return content;
}
private void createUIComponents() {
// TODO: place custom component creation code here
tfName = new StyledTextField();
//-
flagsList = new VisualiserStringList();
environmentsList = new VisualiserStringList();
parList = new VisualiserStringList();
}
public ConfigurationFields(){
sMinDimProc.setModel(new SpinnerNumberModel(1, 0, 128, 1));
sMaxDimProc.setModel(new SpinnerNumberModel(1, 0, 128, 1));
sMaxProc.setModel(new SpinnerNumberModel(0, 0, 128, 1));
sCompilationMaxtime.setModel(new SpinnerNumberModel(40,
5, 3600, 1
));
sRunMaxtime.setModel(new SpinnerNumberModel(40,
5, 3600, 1
));
bAddFlags.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Pass_2021 pass = Pass_2021.passes.get(PassCode_2021.PickCompilerOptions);
if (pass.Do(Current.getCompiler()))
((VisualiserStringList) flagsList).addElement((String) pass.target);
}
});
bDeleteFlags.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
((VisualiserStringList) flagsList).removeElement(flagsList.getSelectedValue());
}
});
bAddEnvironments.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Pass_2021 pass = Pass_2021.passes.get(PassCode_2021.PickCompilerEnvironmentsForTesting);
if (pass.Do(Current.getCompiler()))
((VisualiserStringList) environmentsList).addElement((String) pass.target);
}
});
bDeleteEnvironment.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
((VisualiserStringList) environmentsList).removeElement(environmentsList.getSelectedValue());
}
});
bDeletePar.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
((VisualiserStringList) parList).removeElement(parList.getSelectedValue());
}
});
bAddPar.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Pass_2021 pass = Pass_2021.passes.get(PassCode_2021.AddDVMParameterForTesting);
if (pass.Do()) {
((VisualiserStringList) parList).addElement((String) pass.target);
}
}
});
}
}