no message
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand;
|
||||
import Common.CommonConstants;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
public class SapforSettingsCommand extends riDBObject {
|
||||
@Description("DEFAULT -1")
|
||||
public int sapforsettings_id = CommonConstants.Nan;
|
||||
public PassCode_2021 passCode = PassCode_2021.SPF_RemoveDvmDirectives;
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Current.HasSapforSettings() && (Current.getSapforSettings().id == sapforsettings_id);
|
||||
}
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
SapforSettingsCommand c = (SapforSettingsCommand) src;
|
||||
sapforsettings_id = c.sapforsettings_id;
|
||||
passCode = c.passCode;
|
||||
}
|
||||
public SapforSettingsCommand() {
|
||||
}
|
||||
public SapforSettingsCommand(SapforSettingsCommand sapforSettingsCommand) {
|
||||
this.SynchronizeFields(sapforSettingsCommand);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
public class SapforSettingsCommandsBar extends DataMenuBar {
|
||||
public SapforSettingsCommandsBar() {
|
||||
super("команды",
|
||||
PassCode_2021.PublishSapforSettingsCommand,
|
||||
PassCode_2021.EditSapforSettingsCommand,
|
||||
PassCode_2021.DeleteSapforSettingsCommand
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.SapforSettings;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.UI.SapforSettingsCommandFields;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
|
||||
import java.util.Vector;
|
||||
public class SapforSettingsCommandsDBTable extends iDBTable<SapforSettingsCommand> {
|
||||
public SapforSettingsCommandsDBTable() {
|
||||
super(SapforSettingsCommand.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "команда";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "команды";
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Проход"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforSettingsCommand object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return object.passCode.getDescription();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforSettingsCommand;
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI() {
|
||||
return new DataSetControlForm(this) {
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
//columns.get(0).setVisible(false);
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<SapforSettingsCommand, SapforSettingsCommandFields> getDialog() {
|
||||
return new DBObjectDialog<SapforSettingsCommand, SapforSettingsCommandFields>(SapforSettingsCommandFields.class) {
|
||||
@Override
|
||||
public int getDefaultHeight() {
|
||||
return 250;
|
||||
}
|
||||
@Override
|
||||
public void fillFields() {
|
||||
CommonUI.TrySelect(fields.cbPassCode, Result.passCode);
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.passCode = (PassCode_2021) fields.cbPassCode.getSelectedItem();
|
||||
Result.sapforsettings_id = Current.getSapforSettings().id;
|
||||
}
|
||||
};
|
||||
}
|
||||
//--
|
||||
public Vector<PassCode_2021> getCodes(SapforSettings sapforSettings) {
|
||||
Vector<PassCode_2021> res = new Vector<>();
|
||||
for (SapforSettingsCommand command : Data.values()) {
|
||||
if (command.sapforsettings_id == sapforSettings.id)
|
||||
res.add(command.passCode);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user