рефакторинг интерфейса таблиц. все же, вывел их в полноценные классы,с указанием типа объектов к ним относящихся
This commit is contained in:
@@ -8,6 +8,7 @@ import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.UI.ServerSapforsForm;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Comparator;
|
||||
@@ -30,44 +31,7 @@ public class ServerSapforsDBTable extends iDBTable<ServerSapfor> {
|
||||
|
||||
@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(4).setRendererClass(RendererDate.class);
|
||||
columns.get(5).setRendererClass(RendererStatusEnum.class);
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentServerSapfor();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowNoServerSapfor();
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.CompileServerSapfor,
|
||||
PassCode.ShowSapforCompilationOut,
|
||||
PassCode.ShowSapforCompilationErr,
|
||||
PassCode.DeleteServerSapfor);
|
||||
}
|
||||
};
|
||||
return new ServerSapforsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Comparator<ServerSapfor> getComparator() {
|
||||
@@ -77,7 +41,6 @@ public class ServerSapforsDBTable extends iDBTable<ServerSapfor> {
|
||||
return o2.id - o1.id;
|
||||
}
|
||||
};
|
||||
// return Comparator.comparingInt(o -> o.).reversed();
|
||||
}
|
||||
@Override
|
||||
public PassCode_ getDeletePassCode() {
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererDate;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
|
||||
|
||||
import javax.swing.*;
|
||||
public class ServerSapforsForm extends DataSetControlForm<ServerSapfor> {
|
||||
public ServerSapforsForm(DataSet<?, ServerSapfor> 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(4).setRendererClass(RendererDate.class);
|
||||
columns.get(5).setRendererClass(RendererStatusEnum.class);
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentServerSapfor();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowNoServerSapfor();
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
PassCode.CompileServerSapfor,
|
||||
PassCode.ShowSapforCompilationOut,
|
||||
PassCode.ShowSapforCompilationErr,
|
||||
PassCode.DeleteServerSapfor);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user