постепенное выведение старой концепции текущих объектов, касаемо табличных лучше держать их в интерфейсе таблиц, чтобы не писать описание объекта дважды и не мучиться с типом. некоторые фиксы
This commit is contained in:
@@ -9,13 +9,4 @@ public class ErrorsDBTable extends MessagesDBTable<MessageError> {
|
||||
public ErrorsDBTable() {
|
||||
super(MessageError.class);
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new MessagesControlForm(this, mountPanel) {
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Errors;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,10 @@ public class MessagesControlForm extends DataSetControlForm<Message> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"группа",
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package _VisualDVM.ProjectData.Messages;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
|
||||
import javax.swing.*;
|
||||
//https://stackoverflow.com/questions/2026965/can-i-add-a-button-to-a-jtable-column-header
|
||||
//https://stackoverflow.com/questions/7137786/how-can-i-put-a-control-in-the-jtableheader-of-a-jtable/29963916#29963916
|
||||
//https://stackoverflow.com/questions/7137786/how-can-i-put-a-control-in-the-jtableheader-of-a-jtable ->>
|
||||
@@ -7,4 +10,9 @@ public class MessagesDBTable<M extends Message> extends iDBTable<M> {
|
||||
public MessagesDBTable(Class<M> d_in) {
|
||||
super(d_in);
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new MessagesControlForm(this, mountPanel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,13 +9,4 @@ public class NotesDBTable extends MessagesDBTable<MessageNote> {
|
||||
public NotesDBTable() {
|
||||
super(MessageNote.class);
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new MessagesControlForm(this, mountPanel) {
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Notes;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ public class RecommendationsForm extends DataSetControlForm<MessageRecommendatio
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Recommendations;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
|
||||
@@ -10,13 +10,4 @@ public class WarningsDBTable extends MessagesDBTable<MessageWarning> {
|
||||
public WarningsDBTable() {
|
||||
super(MessageWarning.class);
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new MessagesControlForm(this, mountPanel) {
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Warnings;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user