2024-10-20 17:27:58 +03:00
|
|
|
|
package _VisualDVM.GlobalData.RunConfiguration.UI;
|
|
|
|
|
|
import Common.Database.Tables.DataSet;
|
2024-10-20 20:51:23 +03:00
|
|
|
|
import Common.MainModule_;
|
2024-10-20 17:27:58 +03:00
|
|
|
|
import Common.Visual.DataSetControlForm;
|
|
|
|
|
|
import Common.Visual.Menus.DataMenuBar;
|
2024-10-20 20:51:23 +03:00
|
|
|
|
import _VisualDVM.Current;
|
2024-10-20 17:27:58 +03:00
|
|
|
|
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
|
2024-10-20 21:59:39 +03:00
|
|
|
|
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
|
2024-10-20 17:27:58 +03:00
|
|
|
|
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);
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
2024-10-20 20:51:23 +03:00
|
|
|
|
@Override
|
|
|
|
|
|
public boolean isObjectVisible(RunConfiguration object) {
|
2024-10-20 21:59:39 +03:00
|
|
|
|
return super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
2024-10-20 20:51:23 +03:00
|
|
|
|
}
|
2024-10-20 17:27:58 +03:00
|
|
|
|
}
|