Рефакторинг конструкторов объектов тестирования.
This commit is contained in:
13
src/TestingSystem/DVM/DVMSettings/UI/DVMSettingsBar.java
Normal file
13
src/TestingSystem/DVM/DVMSettings/UI/DVMSettingsBar.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package TestingSystem.DVM.DVMSettings.UI;
|
||||
import Common.UI.Menus_2023.DataMenuBar;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
public class DVMSettingsBar extends DataMenuBar {
|
||||
public DVMSettingsBar() {
|
||||
super("параметры тестированя",
|
||||
|
||||
PassCode_2021.PublishDVMSettings,
|
||||
PassCode_2021.EditDVMSettings,
|
||||
PassCode_2021.DeleteDVMSettings
|
||||
);
|
||||
}
|
||||
}
|
||||
227
src/TestingSystem/DVM/DVMSettings/UI/DVMSettingsFields.form
Normal file
227
src/TestingSystem/DVM/DVMSettings/UI/DVMSettingsFields.form
Normal file
@@ -0,0 +1,227 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="TestingSystem.DVM.DVMSettings.UI.DVMSettingsFields">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="777" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="e9baf" layout-manager="GridLayoutManager" row-count="9" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="8f4d9" 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="2176d">
|
||||
<constraints>
|
||||
<grid row="8" 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="c61a7" class="javax.swing.JTextField" binding="tfName" custom-create="true">
|
||||
<constraints>
|
||||
<grid row="0" column="3" 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="a1d86" class="javax.swing.JSpinner" binding="sMinDimProc">
|
||||
<constraints>
|
||||
<grid row="5" column="3" 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="deae5" 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="61ffc" 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="380de" class="javax.swing.JSpinner" binding="sMaxDimProc">
|
||||
<constraints>
|
||||
<grid row="6" column="3" 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="9b010" class="javax.swing.JCheckBox" binding="cbCube">
|
||||
<constraints>
|
||||
<grid row="7" column="0" row-span="1" col-span="4" 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="bd5c7" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="4" 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="ad38a" class="javax.swing.JSpinner" binding="sMaxProc">
|
||||
<constraints>
|
||||
<grid row="4" column="3" 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="4d47b" 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="45943" 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="decc3" class="javax.swing.JTextField" binding="tfFlags">
|
||||
<constraints>
|
||||
<grid row="1" column="3" 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="400" height="30"/>
|
||||
<preferred-size width="400" height="30"/>
|
||||
<maximum-size width="400" height="30"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<editable value="false"/>
|
||||
<font size="10"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f6927" class="javax.swing.JTextField" binding="tfEnvironments">
|
||||
<constraints>
|
||||
<grid row="2" column="3" 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="400" height="30"/>
|
||||
<preferred-size width="400" height="30"/>
|
||||
<maximum-size width="400" height="30"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<editable value="false"/>
|
||||
<font size="10"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="265bb" class="javax.swing.JButton" binding="bAddFlags">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</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="77de1" class="javax.swing.JButton" binding="bAddEnvironments">
|
||||
<constraints>
|
||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</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="7682" class="javax.swing.JButton" binding="bDeleteFlags">
|
||||
<constraints>
|
||||
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</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>
|
||||
<component id="6c384" class="javax.swing.JButton" binding="bDeleteEnvironment">
|
||||
<constraints>
|
||||
<grid row="2" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</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>
|
||||
<component id="3f04c" class="javax.swing.JCheckBox" binding="cbDvmStat">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" 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="Is_DVM_STAT"/>
|
||||
<toolTipText value="сбор статистики DVM после запуска"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
68
src/TestingSystem/DVM/DVMSettings/UI/DVMSettingsFields.java
Normal file
68
src/TestingSystem/DVM/DVMSettings/UI/DVMSettingsFields.java
Normal file
@@ -0,0 +1,68 @@
|
||||
package TestingSystem.DVM.DVMSettings.UI;
|
||||
import Common.Current;
|
||||
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 DVMSettingsFields implements DialogFields {
|
||||
private JPanel content;
|
||||
public JTextField tfName;
|
||||
public JSpinner sMinDimProc;
|
||||
public JSpinner sMaxDimProc;
|
||||
public JSpinner sMaxProc;
|
||||
public JCheckBox cbCube;
|
||||
public JTextField tfFlags;
|
||||
public JTextField tfEnvironments;
|
||||
private JButton bAddFlags;
|
||||
private JButton bAddEnvironments;
|
||||
private JButton bDeleteFlags;
|
||||
private JButton bDeleteEnvironment;
|
||||
public JCheckBox cbDvmStat;
|
||||
@Override
|
||||
public Component getContent() {
|
||||
return content;
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
tfName = new StyledTextField();
|
||||
}
|
||||
public DVMSettingsFields(){
|
||||
sMinDimProc.setModel(new SpinnerNumberModel(1, 0, 128, 1));
|
||||
sMaxDimProc.setModel(new SpinnerNumberModel(1, 0, 128, 1));
|
||||
sMaxProc.setModel(new SpinnerNumberModel(0, 0, 128, 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())) {
|
||||
tfFlags.setText((String)pass.target);
|
||||
}
|
||||
}
|
||||
});
|
||||
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()))
|
||||
tfEnvironments.setText((String)pass.target);
|
||||
}
|
||||
});
|
||||
bDeleteFlags.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
tfFlags.setText("");
|
||||
}
|
||||
});
|
||||
bDeleteEnvironment.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
tfEnvironments.setText("");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user