рефакторинг форм таблиц и заполнения информации о столбцах
This commit is contained in:
@@ -2,6 +2,7 @@ package _VisualDVM.GlobalData.SapforProfileSetting.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Tables.ColumnInfo;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
|
||||
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
|
||||
|
||||
@@ -9,34 +10,27 @@ import javax.swing.*;
|
||||
public class SapforProfileSettingsForm extends DataSetControlForm<SapforProfileSetting> {
|
||||
public SapforProfileSettingsForm(DataSet<?, SapforProfileSetting> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
AddColumns(
|
||||
new ColumnInfo<SapforProfileSetting>("имя") {
|
||||
@Override
|
||||
public Object getFieldAt(SapforProfileSetting object) {
|
||||
return object.name.getDescription();
|
||||
}
|
||||
},
|
||||
new ColumnInfo<SapforProfileSetting>("значение") {
|
||||
@Override
|
||||
public Object getFieldAt(SapforProfileSetting object) {
|
||||
return object.value;
|
||||
}
|
||||
}
|
||||
);
|
||||
getColumnInfo(0).setVisible(false);
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"имя",
|
||||
"значение"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforProfileSetting object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
return object.name.getDescription();
|
||||
case 2:
|
||||
return object.value;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
columns.get(0).setVisible(false);
|
||||
}
|
||||
@Override
|
||||
protected boolean hasMenuBar() {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user