47 lines
1.6 KiB
Java
47 lines
1.6 KiB
Java
package _VisualDVM.GlobalData.CompilerEnvironment;
|
|
import Common.Database.Tables.DataSet;
|
|
import Common.Visual.DataSetControlForm;
|
|
import Common.Visual.Tables.RendererMultiline;
|
|
import _VisualDVM.GlobalData.CompilerEnvironment.UI.CompilerEnvironmentValueEditor;
|
|
import _VisualDVM.GlobalData.CompilerEnvironment.UI.CompilerEnvironmentValueRenderer;
|
|
|
|
import javax.swing.*;
|
|
public class CompilerEnvironmentsSet extends DataSet<String, CompilerEnvironment> {
|
|
public CompilerEnvironmentsSet() {
|
|
super(String.class, CompilerEnvironment.class);
|
|
}
|
|
@Override
|
|
public String[] getUIColumnNames() {
|
|
return new String[]{
|
|
"Значение", "Описание"
|
|
};
|
|
}
|
|
@Override
|
|
public Object getFieldAt(CompilerEnvironment object, int columnIndex) {
|
|
switch (columnIndex) {
|
|
case 2:
|
|
return object.value;
|
|
case 3:
|
|
return object.description;
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
@Override
|
|
protected DataSetControlForm createUI(JPanel mountPanel) {
|
|
return new DataSetControlForm(this, mountPanel) {
|
|
@Override
|
|
public boolean hasCheckBox() {
|
|
return true;
|
|
}
|
|
@Override
|
|
protected void AdditionalInitColumns() {
|
|
columns.get(2).setRendererClass(CompilerEnvironmentValueRenderer.class);
|
|
columns.get(2).setEditorClass(CompilerEnvironmentValueEditor.class);
|
|
//-
|
|
columns.get(3).setRendererClass(RendererMultiline.class);
|
|
}
|
|
};
|
|
}
|
|
}
|