package GlobalData.Module; import Common_old.Current; import Common.Database.Tables.iDBTable; import Common.Visual.DataSetControlForm; import Common_old.UI.Windows.Dialog.DBObjectDialog; import Common_old.UI.Windows.Dialog.DialogFields; import GlobalData.Module.UI.ModuleAnchestorForm; public class ModulesDBTable extends iDBTable { public ModulesDBTable() { super(Module.class); } @Override public String getSingleDescription() { return "языковой модуль"; } @Override public String getPluralDescription() { return "языковые модули"; } @Override public DBObjectDialog getDialog() { return new ModuleAnchestorForm<>(); } @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 Object getFieldAt(Module object, int columnIndex) { switch (columnIndex) { case 2: return object.language.getDescription(); case 3: return object.getCompilerDescription(); case 4: return object.command; case 5: return object.flags; default: return null; } } @Override public String[] getUIColumnNames() { return new String[]{ "Язык", "Компилятор", "Команда", "Флаги" }; } @Override public Current CurrentName() { return Current.Module; } }