2024-10-01 17:33:08 +03:00
|
|
|
package TestingSystem.DVM.DVMSettings.UI;
|
2024-10-07 00:58:29 +03:00
|
|
|
import Common_old.Current;
|
|
|
|
|
import Common_old.UI.TextField.StyledTextField;
|
|
|
|
|
import Common_old.UI.Windows.Dialog.DialogFields;
|
2024-10-01 17:33:08 +03:00
|
|
|
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("");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|