2024-10-09 22:21:57 +03:00
|
|
|
package _VisualDVM.TestingSystem.DVM.DVMSettings.UI;
|
2024-10-09 20:35:18 +03:00
|
|
|
import Common.Visual.TextField.StyledTextField;
|
2024-10-08 22:33:49 +03:00
|
|
|
import Common.Visual.Windows.Dialog.DialogFields;
|
2024-10-14 12:14:01 +03:00
|
|
|
import _VisualDVM.Passes.PassCode;
|
2024-10-10 23:57:36 +03:00
|
|
|
import Common.Passes.Pass;
|
2024-10-13 22:08:13 +03:00
|
|
|
import _VisualDVM.Global;
|
2024-10-01 17:33:08 +03:00
|
|
|
|
|
|
|
|
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) {
|
2024-10-13 23:55:03 +03:00
|
|
|
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerOptions);
|
2024-10-13 22:08:13 +03:00
|
|
|
if (pass.Do(Global.mainModule.getCompiler())) {
|
2024-10-01 17:33:08 +03:00
|
|
|
tfFlags.setText((String)pass.target);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
bAddEnvironments.addActionListener(new ActionListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
2024-10-13 23:55:03 +03:00
|
|
|
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerEnvironmentsForTesting);
|
2024-10-13 22:08:13 +03:00
|
|
|
if (pass.Do(Global.mainModule.getCompiler()))
|
2024-10-01 17:33:08 +03:00
|
|
|
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("");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|