no message
This commit is contained in:
@@ -7,40 +7,41 @@ import com.sun.org.glassfish.gmbal.Description;
|
||||
import java.util.Vector;
|
||||
public class DVMSettings extends Settings {
|
||||
//todo.хранить флаги и окружение в json чтобы можно было в форме их видеть.
|
||||
public String environments="";
|
||||
public String environments = "";
|
||||
@Description("DEFAULT 0")
|
||||
public int Is_DVM_STAT= 0; //флаг вмест usr par, которые не использовались.
|
||||
// public String usr_par = "";
|
||||
public int Is_DVM_STAT = 0; //флаг вмест usr par, которые не использовались.
|
||||
// public String usr_par = "";
|
||||
//---
|
||||
public int cube = 0; //
|
||||
public int max_proc_count = 4;
|
||||
public int min_dim_proc_count = 1;
|
||||
public int max_dim_proc_count = 4;
|
||||
//
|
||||
public DVMSettings(){}
|
||||
public DVMSettings(DVMSettings src){
|
||||
public DVMSettings() {
|
||||
}
|
||||
public DVMSettings(DVMSettings src) {
|
||||
this.SynchronizeFields(src);
|
||||
}
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
DVMSettings c = (DVMSettings) src;
|
||||
environments=c.environments;
|
||||
environments = c.environments;
|
||||
Is_DVM_STAT = c.Is_DVM_STAT;
|
||||
// usr_par=c.usr_par;
|
||||
// usr_par=c.usr_par;
|
||||
//-
|
||||
cube= c.cube;
|
||||
max_proc_count=c.max_proc_count;
|
||||
min_dim_proc_count=c.min_dim_proc_count;
|
||||
max_dim_proc_count=c.max_dim_proc_count;
|
||||
cube = c.cube;
|
||||
max_proc_count = c.max_proc_count;
|
||||
min_dim_proc_count = c.min_dim_proc_count;
|
||||
max_dim_proc_count = c.max_dim_proc_count;
|
||||
}
|
||||
public String printUsrPar(){
|
||||
return "Is_DVM_STAT="+Is_DVM_STAT;
|
||||
public String printUsrPar() {
|
||||
return "Is_DVM_STAT=" + Is_DVM_STAT;
|
||||
}
|
||||
public Vector<String> getMatrixes(int testDim) {
|
||||
Vector<Vector<Integer>> res_ = new Vector<>();
|
||||
Vector<String> res = new Vector<>();
|
||||
if ((max_proc_count==0) || (min_dim_proc_count == 0 && max_dim_proc_count == 0)) {
|
||||
if ((max_proc_count == 0) || (min_dim_proc_count == 0 && max_dim_proc_count == 0)) {
|
||||
res.add("");
|
||||
} else {
|
||||
if (testDim > 0) {
|
||||
@@ -81,7 +82,7 @@ public class DVMSettings extends Settings {
|
||||
return res;
|
||||
}
|
||||
public String getParamsText() {
|
||||
return "Is_DVM_STAT="+Is_DVM_STAT;
|
||||
return "Is_DVM_STAT=" + Is_DVM_STAT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package _VisualDVM.TestingSystem.DVM.DVMSettings;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMSettings.UI.DVMSettingsFields;
|
||||
public class DVMSettingsDBTable extends iDBTable<DVMSettings> {
|
||||
@@ -117,7 +117,7 @@ public class DVMSettingsDBTable extends iDBTable<DVMSettings> {
|
||||
fields.cbCube.setSelected(Result.cube == 1);
|
||||
//-
|
||||
fields.sMaxProc.setValue(Result.max_proc_count);
|
||||
fields.cbDvmStat.setSelected(Result.Is_DVM_STAT!=0);
|
||||
fields.cbDvmStat.setSelected(Result.Is_DVM_STAT != 0);
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
@@ -128,7 +128,7 @@ public class DVMSettingsDBTable extends iDBTable<DVMSettings> {
|
||||
Result.max_proc_count = (int) fields.sMaxProc.getValue();
|
||||
Result.flags = fields.tfFlags.getText();
|
||||
Result.environments = fields.tfEnvironments.getText();
|
||||
Result.Is_DVM_STAT = fields.cbDvmStat.isSelected()?1:0;
|
||||
Result.Is_DVM_STAT = fields.cbDvmStat.isSelected() ? 1 : 0;
|
||||
}
|
||||
@Override
|
||||
public void SetReadonly() {
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package _VisualDVM.TestingSystem.DVM.DVMSettings.UI;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import Common.Passes.Pass;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
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;
|
||||
@@ -18,38 +17,31 @@ public class DVMSettingsFields implements DialogFields {
|
||||
public JCheckBox cbCube;
|
||||
public JTextField tfFlags;
|
||||
public JTextField tfEnvironments;
|
||||
public JCheckBox cbDvmStat;
|
||||
private JPanel content;
|
||||
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(){
|
||||
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 pass = Global.mainModule.getPass(PassCode.PickCompilerOptions);
|
||||
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerOptions);
|
||||
if (pass.Do(Global.mainModule.getCompiler())) {
|
||||
tfFlags.setText((String)pass.target);
|
||||
tfFlags.setText((String) pass.target);
|
||||
}
|
||||
}
|
||||
});
|
||||
bAddEnvironments.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerEnvironmentsForTesting);
|
||||
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerEnvironmentsForTesting);
|
||||
if (pass.Do(Global.mainModule.getCompiler()))
|
||||
tfEnvironments.setText((String)pass.target);
|
||||
tfEnvironments.setText((String) pass.target);
|
||||
}
|
||||
});
|
||||
bDeleteFlags.addActionListener(new ActionListener() {
|
||||
@@ -65,4 +57,12 @@ public class DVMSettingsFields implements DialogFields {
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public Component getContent() {
|
||||
return content;
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
tfName = new StyledTextField();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user