no message
This commit is contained in:
@@ -28,7 +28,13 @@ public class DataSet<K, D extends DBObject> extends DataSetAnchestor {
|
||||
public Class<D> d; //класс объектов.
|
||||
public LinkedHashMap<K, D> Data = new LinkedHashMap<>(); //наполнение
|
||||
//-
|
||||
public DataSetControlForm ui_;
|
||||
protected DataSetControlForm ui= null;
|
||||
public DataSetControlForm getUI() {
|
||||
return ui;
|
||||
}
|
||||
public void setUI(DataSetControlForm ui_in) {
|
||||
this.ui = ui_in;
|
||||
}
|
||||
//-
|
||||
public LinkedHashMap<Integer, ColumnFilter> columnsFilters = new LinkedHashMap<>(); //текстовые фильтры столбцов
|
||||
protected FilterInterface f_ui; // отображение количества объектов
|
||||
@@ -51,14 +57,14 @@ public class DataSet<K, D extends DBObject> extends DataSetAnchestor {
|
||||
public void mountUI(JPanel mountPanel_in) {
|
||||
UI.Clear(mountPanel_in);
|
||||
//-->
|
||||
ui_ = createUI(mountPanel_in);
|
||||
setUI(createUI(mountPanel_in));
|
||||
//-->
|
||||
if (hasMenuBar()) {
|
||||
try {
|
||||
DataMenuBar bar = null;
|
||||
if (!MainModule_.instance.getUI().menuBars.containsKey(getClass())) {
|
||||
bar = createMenuBar();
|
||||
if (ui_.hasCheckBox())
|
||||
if (getUI().hasCheckBox())
|
||||
bar.createSelectionButtons(this);
|
||||
MainModule_.instance.getUI().menuBars.put(getClass(), bar);
|
||||
} else {
|
||||
@@ -81,30 +87,30 @@ public class DataSet<K, D extends DBObject> extends DataSetAnchestor {
|
||||
}
|
||||
}
|
||||
public DataSetControlForm getUi() {
|
||||
return ui_;
|
||||
return getUI();
|
||||
}
|
||||
public void setFilterUI(FilterInterface ui_in) {
|
||||
f_ui = ui_in;
|
||||
}
|
||||
public void ClearUI() {
|
||||
if ((ui_ != null) && ui_.isShown()) {
|
||||
ui_.ClearSelection();
|
||||
ui_.Clear();
|
||||
if ((getUI() != null) && getUI().isShown()) {
|
||||
getUI().ClearSelection();
|
||||
getUI().Clear();
|
||||
if (f_ui != null)
|
||||
f_ui.ShowNoMatches();
|
||||
}
|
||||
}
|
||||
public void RefreshUI() {
|
||||
if (ui_ != null) ui_.Refresh();
|
||||
if (getUI() != null) getUI().Refresh();
|
||||
}
|
||||
public int getRowCountUI() {
|
||||
return ui_.getRowCount();
|
||||
return getUI().getRowCount();
|
||||
}
|
||||
public void SetCurrentObjectUI(Object pk) {
|
||||
if (ui_ != null) {
|
||||
if (getUI() != null) {
|
||||
//todo возможно проверить, что текущий объект уже соответствует ключу, и если да, то ничего делать.
|
||||
ui_.ClearSelection(); //сброс текущего объекта и всего что с ним связано.
|
||||
ui_.Select(pk);
|
||||
getUI().ClearSelection(); //сброс текущего объекта и всего что с ним связано.
|
||||
getUI().Select(pk);
|
||||
}
|
||||
}
|
||||
public String[] getUIColumnNames() {
|
||||
@@ -114,7 +120,7 @@ public class DataSet<K, D extends DBObject> extends DataSetAnchestor {
|
||||
return null;
|
||||
}
|
||||
public boolean hasUI() {
|
||||
return ui_ != null;
|
||||
return getUI() != null;
|
||||
}
|
||||
public void SelectAll(boolean flag) {
|
||||
for (D object : Data.values()) {
|
||||
@@ -231,8 +237,8 @@ public class DataSet<K, D extends DBObject> extends DataSetAnchestor {
|
||||
for (DataSetFilter<D> filter : filters)
|
||||
filter.Drop();
|
||||
//--
|
||||
if (ui_ != null) {
|
||||
ui_.Show();
|
||||
if (getUI() != null) {
|
||||
getUI().Show();
|
||||
if (f_ui != null)
|
||||
f_ui.ShowMatchesCount(getRowCountUI());
|
||||
}
|
||||
@@ -244,8 +250,8 @@ public class DataSet<K, D extends DBObject> extends DataSetAnchestor {
|
||||
for (DataSetFilter<D> filter : filters)
|
||||
filter.Drop();
|
||||
//--
|
||||
if (ui_ != null) {
|
||||
ui_.Show(key);
|
||||
if (getUI() != null) {
|
||||
getUI().Show(key);
|
||||
if (f_ui != null)
|
||||
f_ui.ShowMatchesCount(getRowCountUI());
|
||||
}
|
||||
@@ -320,7 +326,7 @@ public class DataSet<K, D extends DBObject> extends DataSetAnchestor {
|
||||
if (hasUI()) {
|
||||
Object lastPk = selections.get(getClass());
|
||||
if ((CurrentName() != null) && (lastPk != null)) {
|
||||
ui_.Select(lastPk);
|
||||
getUI().Select(lastPk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class ColumnFilter {
|
||||
setBorder(null);
|
||||
addActionListener(e -> {
|
||||
popup.setVisible(false);
|
||||
dataSet.ui_.getControl().getTableHeader().repaint();
|
||||
dataSet.getUI().getControl().getTableHeader().repaint();
|
||||
});
|
||||
getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
|
||||
@@ -34,6 +34,6 @@ public class AddSubscriber extends ComponentsRepositoryPass<Subscriber> {
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
super.showDone();
|
||||
server.db.subscribers.ui_.Show(target.getPK());
|
||||
server.db.subscribers.getUI().Show(target.getPK());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class UpdateSelectedComponents extends Pass<Vector<Component>> {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
for (Component component : target) {
|
||||
Global.Components.ui_.Select(component.getPK());
|
||||
Global.Components.getUI().Select(component.getPK());
|
||||
Global.mainModule.getPass(PassCode.UpdateComponent).Do();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,6 @@ public class DeleteServerObject<S extends RepositoryServer, D extends DBObject>
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
getDb().getTable(d).ui_.Show();
|
||||
getDb().getTable(d).getUI().Show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,6 @@ public class EditServerObject<S extends RepositoryServer, D extends DBObject> ex
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
VisualCaches.RefreshCache(target);
|
||||
getDb().getTable(d).ui_.Show(target.getPK());
|
||||
getDb().getTable(d).getUI().Show(target.getPK());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,6 @@ public class PublishServerObject<S extends RepositoryServer, D extends DBObject>
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
super.showDone();
|
||||
getDb().getTable(d).ui_.Show(pk);
|
||||
getDb().getTable(d).getUI().Show(pk);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,8 +337,8 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
}
|
||||
@Override
|
||||
public void ShowFirstError() {
|
||||
if (file.father.db.errors.ui_.getRowCount() > 0)
|
||||
file.father.db.errors.ui_.getControl().SelectRow(0);
|
||||
if (file.father.db.errors.getUI().getRowCount() > 0)
|
||||
file.father.db.errors.getUI().getControl().SelectRow(0);
|
||||
}
|
||||
@Override
|
||||
public void ShowCompilationOutput() {
|
||||
|
||||
Reference in New Issue
Block a user