70 lines
2.2 KiB
Java
70 lines
2.2 KiB
Java
package _VisualDVM.GlobalData.RunConfiguration.UI;
|
||
import Common.Database.Tables.DataSet;
|
||
import Common.MainModule_;
|
||
import Common.Visual.DataSetControlForm;
|
||
import Common.Visual.Menus.DataMenuBar;
|
||
import _VisualDVM.Current;
|
||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||
import _VisualDVM.Passes.PassCode;
|
||
|
||
import javax.swing.*;
|
||
public class RunConfigurationsForm extends DataSetControlForm<RunConfiguration> {
|
||
public RunConfigurationsForm(DataSet<?, RunConfiguration> dataSource_in, JPanel mountPanel_in) {
|
||
super(dataSource_in, mountPanel_in);
|
||
}
|
||
@Override
|
||
public String[] getUIColumnNames() {
|
||
return new String[]{
|
||
"Команда",
|
||
"Опции",
|
||
"Разм.",
|
||
"Куб",
|
||
"Min",
|
||
"Max",
|
||
"Аргументы"
|
||
};
|
||
}
|
||
@Override
|
||
public Object getFieldAt(RunConfiguration object, int columnIndex) {
|
||
switch (columnIndex) {
|
||
case 1:
|
||
return object.LauncherCall;
|
||
case 2:
|
||
return object.LauncherOptions;
|
||
case 3:
|
||
return object.dim;
|
||
case 4:
|
||
return object.printCube();
|
||
case 5:
|
||
return object.minMatrix;
|
||
case 6:
|
||
return object.maxMatrix;
|
||
case 7:
|
||
return object.args;
|
||
default:
|
||
return null;
|
||
}
|
||
}
|
||
@Override
|
||
protected void AdditionalInitColumns() {
|
||
columns.get(0).setVisible(false);
|
||
}
|
||
@Override
|
||
public DataMenuBar createMenuBar() {
|
||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||
PassCode.Run,
|
||
PassCode.AddRunConfiguration,
|
||
PassCode.EditRunConfiguration,
|
||
PassCode.DeleteRunConfiguration) {
|
||
{
|
||
add(new JSeparator());
|
||
addPasses(PassCode.EditProjectRunMaxtime);
|
||
}
|
||
};
|
||
}
|
||
@Override
|
||
public boolean isObjectVisible(RunConfiguration object) {
|
||
return super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||
}
|
||
}
|