no message
This commit is contained in:
@@ -20,6 +20,7 @@ import java.awt.event.KeyEvent;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -111,11 +112,30 @@ public class DataSetControlForm extends ControlForm<DataTable> {
|
||||
protected void AdditionalInitColumns() {
|
||||
//уточнение инфы по столбцам.
|
||||
}
|
||||
Vector<Object> getVisibleKeys() {
|
||||
Comparator comparator = dataSource.getComparator();
|
||||
Vector<Object> res = new Vector<>();
|
||||
if (comparator == null) {
|
||||
for (Object key : dataSource.Data.keySet())
|
||||
if (dataSource.get(key).isVisible())
|
||||
res.add(key);
|
||||
} else {
|
||||
Vector<Object> raw = new Vector<>();
|
||||
for (Object object : dataSource.Data.values()) {
|
||||
if (((DBObject)object).isVisible())
|
||||
raw.add(object);
|
||||
}
|
||||
raw.sort(comparator);
|
||||
for (Object object : raw)
|
||||
res.add(((DBObject)object).getPK());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void createControl() {
|
||||
CreateColumnsInfo();
|
||||
GridAnchestor table_data_model = new GridAnchestor(getHeaders(), dataSource.getVisibleKeys()) {
|
||||
GridAnchestor table_data_model = new GridAnchestor(getHeaders(), getVisibleKeys()) {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||
@@ -345,6 +365,7 @@ public class DataSetControlForm extends ControlForm<DataTable> {
|
||||
public int getRowCount() {
|
||||
return control.getRowCount();
|
||||
}
|
||||
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
if (dataSource instanceof DBTable) {
|
||||
DBTable table = (DBTable) dataSource;
|
||||
|
||||
Reference in New Issue
Block a user