рефакторинг интерфейса таблиц. все же, вывел их в полноценные классы,с указанием типа объектов к ним относящихся
This commit is contained in:
@@ -4,6 +4,7 @@ import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Tables.RendererMultiline;
|
||||
import _VisualDVM.GlobalData.CompilerEnvironment.UI.CompilerEnvironmentValueEditor;
|
||||
import _VisualDVM.GlobalData.CompilerEnvironment.UI.CompilerEnvironmentValueRenderer;
|
||||
import _VisualDVM.GlobalData.CompilerEnvironment.UI.CompilerEnvironmentsForm;
|
||||
|
||||
import javax.swing.*;
|
||||
public class CompilerEnvironmentsSet extends DataSet<String, CompilerEnvironment> {
|
||||
@@ -12,24 +13,6 @@ public class CompilerEnvironmentsSet extends DataSet<String, CompilerEnvironment
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DataSetControlForm(this, mountPanel) {
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Значение", "Описание"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
columns.get(2).setRendererClass(CompilerEnvironmentValueRenderer.class);
|
||||
columns.get(2).setEditorClass(CompilerEnvironmentValueEditor.class);
|
||||
//-
|
||||
columns.get(3).setRendererClass(RendererMultiline.class);
|
||||
}
|
||||
};
|
||||
return new CompilerEnvironmentsForm(this, mountPanel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package _VisualDVM.GlobalData.CompilerEnvironment.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Tables.RendererMultiline;
|
||||
import _VisualDVM.GlobalData.CompilerEnvironment.CompilerEnvironment;
|
||||
|
||||
import javax.swing.*;
|
||||
public class CompilerEnvironmentsForm extends DataSetControlForm<CompilerEnvironment> {
|
||||
public CompilerEnvironmentsForm(DataSet<?, CompilerEnvironment> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Значение", "Описание"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
columns.get(2).setRendererClass(CompilerEnvironmentValueRenderer.class);
|
||||
columns.get(2).setEditorClass(CompilerEnvironmentValueEditor.class);
|
||||
columns.get(3).setRendererClass(RendererMultiline.class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user