2024-10-09 22:21:57 +03:00
|
|
|
|
package _VisualDVM.TestingSystem.DVM.DVMSettings.UI;
|
2025-03-04 02:14:30 +03:00
|
|
|
|
import Common.Database.Objects.DBObject;
|
2024-10-14 15:19:13 +03:00
|
|
|
|
import Common.Passes.Pass;
|
2025-03-04 02:14:30 +03:00
|
|
|
|
import Common.Utils.Utils_;
|
2024-10-09 20:35:18 +03:00
|
|
|
|
import Common.Visual.TextField.StyledTextField;
|
2025-03-04 02:14:30 +03:00
|
|
|
|
import Common.Visual.UI;
|
2024-10-08 22:33:49 +03:00
|
|
|
|
import Common.Visual.Windows.Dialog.DialogFields;
|
2024-10-13 22:08:13 +03:00
|
|
|
|
import _VisualDVM.Global;
|
2025-03-04 02:14:30 +03:00
|
|
|
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsJson;
|
|
|
|
|
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsSetJson;
|
|
|
|
|
|
import _VisualDVM.GlobalData.CompilerOption.OptionsLine;
|
|
|
|
|
|
import _VisualDVM.GlobalData.CompilerOption.OptionsLinesSet;
|
2024-10-14 15:19:13 +03:00
|
|
|
|
import _VisualDVM.Passes.PassCode;
|
2024-10-01 17:33:08 +03:00
|
|
|
|
|
|
|
|
|
|
import javax.swing.*;
|
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
|
public class DVMSettingsFields implements DialogFields {
|
|
|
|
|
|
public JTextField tfName;
|
|
|
|
|
|
public JSpinner sMinDimProc;
|
|
|
|
|
|
public JSpinner sMaxDimProc;
|
|
|
|
|
|
public JSpinner sMaxProc;
|
|
|
|
|
|
public JCheckBox cbCube;
|
|
|
|
|
|
public JTextField tfEnvironments;
|
2024-10-14 15:19:13 +03:00
|
|
|
|
public JCheckBox cbDvmStat;
|
|
|
|
|
|
private JPanel content;
|
2025-02-06 20:44:51 +03:00
|
|
|
|
public JButton bAddFlags;
|
|
|
|
|
|
public JButton bAddEnvironments;
|
|
|
|
|
|
public JButton bDeleteFlags;
|
|
|
|
|
|
public JButton bDeleteEnvironment;
|
2025-03-04 02:14:30 +03:00
|
|
|
|
private JPanel optionsLinesPanel;
|
|
|
|
|
|
private JPanel environmentsLinesPanel;
|
|
|
|
|
|
private JSplitPane SC1;
|
|
|
|
|
|
private JSplitPane SC2;
|
|
|
|
|
|
//
|
|
|
|
|
|
public OptionsLinesSet optionsLines;
|
|
|
|
|
|
//
|
|
|
|
|
|
public void fillOptionsLines(String packed) {
|
|
|
|
|
|
optionsLines = new OptionsLinesSet(); //нужен для отображения таблицы, как дб объекты с ключами
|
|
|
|
|
|
OptionsSetJson optionsSetJson = packed.isEmpty() ? new OptionsSetJson() : Utils_.gson.fromJson(packed, OptionsSetJson.class);
|
|
|
|
|
|
for (OptionsJson optionsJson: optionsSetJson.values) {
|
|
|
|
|
|
OptionsLine optionsLine =new OptionsLine(optionsJson);
|
|
|
|
|
|
optionsLine.id = optionsLines.maxId++;
|
|
|
|
|
|
optionsLines.put(optionsLine.id, optionsLine);
|
|
|
|
|
|
}
|
|
|
|
|
|
//-
|
|
|
|
|
|
optionsLines.mountUI(optionsLinesPanel);
|
|
|
|
|
|
optionsLines.ShowUI();
|
|
|
|
|
|
}
|
2024-10-14 15:19:13 +03:00
|
|
|
|
public DVMSettingsFields() {
|
2024-10-01 17:33:08 +03:00
|
|
|
|
sMinDimProc.setModel(new SpinnerNumberModel(1, 0, 128, 1));
|
|
|
|
|
|
sMaxDimProc.setModel(new SpinnerNumberModel(1, 0, 128, 1));
|
|
|
|
|
|
sMaxProc.setModel(new SpinnerNumberModel(0, 0, 128, 1));
|
2025-03-04 02:14:30 +03:00
|
|
|
|
//-
|
2024-10-01 17:33:08 +03:00
|
|
|
|
}
|
2024-10-14 15:19:13 +03:00
|
|
|
|
@Override
|
|
|
|
|
|
public Component getContent() {
|
|
|
|
|
|
return content;
|
|
|
|
|
|
}
|
|
|
|
|
|
private void createUIComponents() {
|
|
|
|
|
|
// TODO: place custom component creation code here
|
|
|
|
|
|
tfName = new StyledTextField();
|
|
|
|
|
|
}
|
2024-10-01 17:33:08 +03:00
|
|
|
|
}
|