продолжение рефакторинга. создал предка для класса current
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
package Common_old.UI.ComboBox;
|
||||
import Common_old.UI.Menus.TextComboBoxMenu;
|
||||
|
||||
import javax.swing.*;
|
||||
public class StyledTextComboBox extends JComboBox<String> {
|
||||
public StyledTextComboBox() {
|
||||
setComponentPopupMenu(new TextComboBoxMenu(this));
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package Common_old.UI;
|
||||
import Common.Utils.CommonUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
//класс, представляющий собой прокручиваемую панель, на которой лежит нечто.
|
||||
public class ControlForm<C extends Component> {
|
||||
public C control = null;
|
||||
protected Class<C> control_class;
|
||||
protected JPanel content; //задник.
|
||||
public JScrollPane scroll = null;
|
||||
public ControlForm(Class<C> class_in) {
|
||||
control_class = class_in;
|
||||
setContent(new JPanel(new BorderLayout()));
|
||||
}
|
||||
//нужно будет вывестии сделать нормальные формы для деревьев а не ручное создание.
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
public void setContent(JPanel content_in) {
|
||||
|
||||
content = content_in;
|
||||
}
|
||||
//-
|
||||
public void Show() {
|
||||
Clear();
|
||||
CreateControl();
|
||||
//------------------------
|
||||
scroll = new JScrollPane(control);
|
||||
scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
|
||||
scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||
}
|
||||
public void CreateControl() {
|
||||
try {
|
||||
control = control_class.newInstance();
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public boolean isShown() {
|
||||
return control != null;
|
||||
}
|
||||
public void Clear() {
|
||||
control = null; //очищено.
|
||||
}
|
||||
public void Refresh() {
|
||||
if (control != null)
|
||||
refresh();
|
||||
}
|
||||
//-
|
||||
protected void refresh() {
|
||||
} //перерисовать контрол.
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package Common_old.UI;
|
||||
import Common_old.Current;
|
||||
|
||||
import java.awt.*;
|
||||
public class ControlWithCurrentForm<C extends Component> extends ControlForm<C> {
|
||||
public ControlWithCurrentForm(Class<C> class_in) {
|
||||
super(class_in);
|
||||
}
|
||||
//-
|
||||
public Current CurrentName() {
|
||||
return Current.Undefined;
|
||||
}
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
}
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
}
|
||||
public void MouseAction2() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package Common_old.UI;
|
||||
import Common.Database.Objects.DBObject;
|
||||
public interface DataControl {
|
||||
DBObject getRowObject(int rowIndex); //получить объект, сответствующий данной строке.
|
||||
void SelectRowByPK(Object pk);
|
||||
//выделить строку где лежит объект с данным первичным ключом.
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package Common_old.UI;
|
||||
import Common_old.Current;
|
||||
public interface DataControl_OLD {
|
||||
//todo скорее всего устареет.
|
||||
default Current getCurrent() {
|
||||
return Current.Undefined;
|
||||
}
|
||||
//-?
|
||||
default void ShowCurrentObject() throws Exception {
|
||||
}
|
||||
default void ShowNoCurrentObject() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -1,327 +0,0 @@
|
||||
package Common_old.UI;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Tables.DBTable;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Database.Tables.FKBehaviour;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Menus.TableMenu;
|
||||
import Common_old.UI.Tables.ColumnInfo;
|
||||
import Common_old.UI.Tables.DataTable;
|
||||
import Common_old.UI.Tables.Grid.GridAnchestor;
|
||||
import GlobalData.Grid.Grid;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.TableColumn;
|
||||
import java.awt.*;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.Arrays;
|
||||
import java.util.Vector;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import static Common_old.UI.Tables.TableEditors.EditorSelect;
|
||||
import static Common_old.UI.Tables.TableRenderers.RendererSelect;
|
||||
public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
|
||||
protected JPanel dataPanel;
|
||||
protected DataSet dataSource;
|
||||
public JPanel getDataPanel() {
|
||||
return dataPanel;
|
||||
}
|
||||
protected int current_row_i;
|
||||
protected boolean events_on = true;
|
||||
protected String colNamesAndSizes = "";
|
||||
protected Vector<ColumnInfo> columns = new Vector<>();
|
||||
public DataSetControlForm(DataSet dataSource_in) {
|
||||
this(dataSource_in, DataTable.class);
|
||||
}
|
||||
public DataSetControlForm(DataSet dataSource_in, Class tableClass) {
|
||||
super(tableClass);
|
||||
dataSource = dataSource_in;
|
||||
//---
|
||||
dataPanel = new JPanel(new BorderLayout());
|
||||
content.add(dataPanel, BorderLayout.CENTER);
|
||||
}
|
||||
@Override
|
||||
public void Show() {
|
||||
super.Show();
|
||||
dataPanel.add(scroll);
|
||||
dataPanel.updateUI();
|
||||
}
|
||||
@Override
|
||||
public void Clear() {
|
||||
super.Clear();
|
||||
CommonUI.Clear(dataPanel);
|
||||
}
|
||||
public DataSet getDataSource() {
|
||||
return dataSource;
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return getDataSource().CurrentName();
|
||||
}
|
||||
public void SaveColumns() {
|
||||
if (Global.db != null) {
|
||||
try {
|
||||
if ((CurrentName() != Current.Undefined)) {
|
||||
Vector<String> widths = IntStream.range(0, columns.size()).mapToObj(i -> String.valueOf(control.getColumnModel().getColumn(i).getWidth())).collect(Collectors.toCollection(Vector::new));
|
||||
String packed = String.join("|", widths);
|
||||
Grid grid;
|
||||
if (Global.db.grids.containsKey(CurrentName())) {
|
||||
grid = Global.db.grids.get(CurrentName());
|
||||
} else {
|
||||
grid = new Grid(CurrentName());
|
||||
Global.db.Insert(grid);
|
||||
}
|
||||
grid.sizes = packed;
|
||||
Global.db.Update(grid);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
public boolean hasCheckBox() {
|
||||
return false;
|
||||
}
|
||||
private Vector<String> getHeaders() {
|
||||
return columns.stream().map(ColumnInfo::getName).collect(Collectors.toCollection(Vector::new));
|
||||
}
|
||||
protected void CreateColumnsInfo() {
|
||||
columns.clear();
|
||||
columns.add(new ColumnInfo(getDataSource().getPKName()));
|
||||
if (hasCheckBox()) {
|
||||
columns.add(new ColumnInfo("", RendererSelect, EditorSelect));
|
||||
columns.get(1).setMinWidth(25);
|
||||
columns.get(1).setMaxWidth(25);
|
||||
}
|
||||
Arrays.stream(getDataSource().getUIColumnNames()).forEach(name -> columns.add(new ColumnInfo(name)));
|
||||
AdditionalInitColumns();
|
||||
}
|
||||
protected void AdditionalInitColumns() {
|
||||
//уточнение инфы по столбцам.
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void CreateControl() {
|
||||
CreateColumnsInfo();
|
||||
GridAnchestor table_data_model = new GridAnchestor(getHeaders(), dataSource.getVisibleKeys()) {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||
Object key = data.get(rowIndex);
|
||||
if (columnIndex == 0)
|
||||
return key;
|
||||
DBObject object = getDataSource().get((key));
|
||||
if ((columnIndex == 1) && hasCheckBox())
|
||||
return object.isSelected();
|
||||
return getDataSource().getFieldAt(object, columnIndex);
|
||||
}
|
||||
@Override
|
||||
public boolean isCellEditable(int row, int col) {
|
||||
return columns.get(col).isEditable();
|
||||
}
|
||||
//------------------------------------------------------------------------------------
|
||||
@Override
|
||||
public void setValueAt(Object value, int row, int col) {
|
||||
fireTableCellUpdated(row, col);
|
||||
}
|
||||
};
|
||||
control = new DataTable(table_data_model) {
|
||||
@Override
|
||||
public TableMenu CreateMenu() {
|
||||
return new TableMenu(this);
|
||||
}
|
||||
//строго говоря эта штука нужна только для рендереров и едиторов клеток.
|
||||
@Override
|
||||
public DBObject getRowObject(int rowIndex) {
|
||||
//вот так делать НЕЛЬЗЯ. модель только для внутреннего пользования
|
||||
// Object key = table_data_model.data.get(rowIndex);
|
||||
//из таблицы можно пользоваться только getValueAt
|
||||
//иначе сортировка не будет работать.
|
||||
Object key = getValueAt(rowIndex, 0);
|
||||
return getDataSource().get(key);
|
||||
}
|
||||
//-----------------------------NEW-------------------------------------
|
||||
@Override
|
||||
public void CorrectColumnsSizes() {
|
||||
if ((Global.db != null) && CurrentName() != Current.Undefined && Global.db.grids.containsKey(CurrentName())) {
|
||||
//Undefined может оказаться в таблице, например если енум устарел. Поэтому надо проверять.
|
||||
if (!getColumnsProfile().equalsIgnoreCase(colNamesAndSizes)) {
|
||||
Grid grid = Global.db.grids.get(CurrentName());
|
||||
String[] data = grid.sizes.split("\\|");
|
||||
for (int i = 0; i < columns.size(); ++i) {
|
||||
if (i <= (data.length - 1)) {
|
||||
int width = Integer.parseInt(data[i]);
|
||||
getColumnModel().getColumn(i).setPreferredWidth(width);
|
||||
getColumnModel().getColumn(i).setWidth(width);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
super.CorrectColumnsSizes(); //обычный авторазмер.
|
||||
}
|
||||
public String getColumnsProfile() {
|
||||
String res = "";
|
||||
for (int i = 0; i < getColumnModel().getColumnCount(); i++) {
|
||||
if (i > 0) res += ",";
|
||||
TableColumn column = getColumnModel().getColumn(i);
|
||||
res += column.getHeaderValue();
|
||||
res += ":";
|
||||
res += column.getWidth();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@Override
|
||||
public void Init() {
|
||||
for (int i = 0; i < columns.size(); i++) {
|
||||
ColumnInfo columnInfo = columns.get(i);
|
||||
if (columnInfo.isVisible()) {
|
||||
if (columnInfo.hasRenderer())
|
||||
getColumnModel().getColumn(i).setCellRenderer(UI.TableRenderers.get(columnInfo.getRenderer()));
|
||||
if (columnInfo.hasEditor())
|
||||
getColumnModel().getColumn(i).setCellEditor(UI.TableEditors.get(columnInfo.getEditor()));
|
||||
if (columnInfo.hasMaxWidth())
|
||||
getColumnModel().getColumn((i)).setMaxWidth(columnInfo.getMaxWidth());
|
||||
if (columnInfo.hasMinWidth())
|
||||
getColumnModel().getColumn((i)).setMinWidth(columnInfo.getMinWidth());
|
||||
} else {
|
||||
getColumnModel().getColumn(i).setMinWidth(0);
|
||||
getColumnModel().getColumn(i).setMaxWidth(0);
|
||||
}
|
||||
}
|
||||
//обновление в БД при ручном изменении размера столбиков.--------->>
|
||||
getTableHeader().addMouseListener(new MouseAdapter() {
|
||||
public void mouseReleased(MouseEvent arg0) {
|
||||
String new_colNamesAndSizes = getColumnsProfile();
|
||||
// check if changed, if yes, persist...
|
||||
if (!colNamesAndSizes.equals(new_colNamesAndSizes)) {
|
||||
colNamesAndSizes = new_colNamesAndSizes;
|
||||
SaveColumns();
|
||||
}
|
||||
}
|
||||
});
|
||||
//------------------------->>
|
||||
}
|
||||
};
|
||||
if (CurrentName() != Current.Undefined) {
|
||||
current_row_i = CommonConstants.Nan;
|
||||
ListSelectionModel selModel = control.getSelectionModel();
|
||||
selModel.addListSelectionListener(e -> {
|
||||
int row = control.getSelectedRow();
|
||||
if ((row >= 0)) {
|
||||
if (row != current_row_i) {
|
||||
current_row_i = row;
|
||||
getDataSource().setCurrent(control.getRowObject(row));
|
||||
if (events_on) {
|
||||
try {
|
||||
ShowCurrentObject();
|
||||
} catch (Exception ex) {
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
current_row_i = CommonConstants.Nan;
|
||||
getDataSource().dropCurrent();
|
||||
if (events_on) {
|
||||
try {
|
||||
ShowNoCurrentObject();
|
||||
} catch (Exception ex) {
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//двойной клик мыши.------------------------------------------------------
|
||||
control.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if ((e.getClickCount() == 2) && (dataSource.getCurrent() != null)) {
|
||||
try {
|
||||
MouseAction2();
|
||||
} catch (Exception ex) {
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//----------------------------------------------------------------------------
|
||||
//при переотображении таблицы скидываем текущий объект!!
|
||||
getDataSource().dropCurrent();
|
||||
try {
|
||||
ShowNoCurrentObject();
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
//---
|
||||
/*
|
||||
if (hasCheckBox()) {
|
||||
TableColumn column = control.getColumnModel().getColumn(1)
|
||||
column.setHeaderRenderer(new TableCellRenderer() {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
return null;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
*/
|
||||
}
|
||||
@Override
|
||||
protected void refresh() {
|
||||
control.CorrectSizes();
|
||||
}
|
||||
public void Show(Object pk) {
|
||||
Show();
|
||||
Select(pk);
|
||||
}
|
||||
public void Select(Object pk) {
|
||||
if (isShown())
|
||||
control.SelectRowByPK(pk);
|
||||
}
|
||||
public void ClearSelection() {
|
||||
if (isShown())
|
||||
control.clearSelection(); //строка сбросится сама. благодаря сбросу события выбора
|
||||
}
|
||||
public int getRowCount() {
|
||||
return control.getRowCount();
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
if (dataSource instanceof DBTable) {
|
||||
DBTable table = (DBTable) dataSource;
|
||||
for (Class dep : table.getFKDependencies().keySet()) {
|
||||
FKBehaviour behaviour = table.getFKDependencies().get(dep);
|
||||
switch (behaviour.ui) {
|
||||
case ACTIVE:
|
||||
table.getDb().tables.get(dep).ShowUI();
|
||||
break;
|
||||
case PASSIVE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
if (dataSource instanceof DBTable) {
|
||||
DBTable table = (DBTable) dataSource;
|
||||
for (Class dep : table.getFKDependencies().keySet()) {
|
||||
FKBehaviour behaviour = table.getFKDependencies().get(dep);
|
||||
switch (behaviour.ui) {
|
||||
case ACTIVE:
|
||||
table.getDb().tables.get(dep).ClearUI();
|
||||
break;
|
||||
case PASSIVE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common_old.UI.Menus;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Menus_2023.StableMenuItem;
|
||||
@@ -41,7 +42,7 @@ public abstract class SelectionTreeMenu extends GraphMenu<DataTree> {
|
||||
m_select_for_current.addActionListener(new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Object o = Current.get(tree.getCurrent());
|
||||
Object o = CurrentAnchestor.get(tree.getCurrent());
|
||||
if (o instanceof Selectable) {
|
||||
((Selectable) o).SelectAllChildren(true);
|
||||
}
|
||||
@@ -54,7 +55,7 @@ public abstract class SelectionTreeMenu extends GraphMenu<DataTree> {
|
||||
m_unselect_for_current.addActionListener(new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Object o = Current.get(tree.getCurrent());
|
||||
Object o = CurrentAnchestor.get(tree.getCurrent());
|
||||
if (o instanceof Selectable) {
|
||||
((Selectable) o).SelectAllChildren(false);
|
||||
}
|
||||
@@ -68,7 +69,7 @@ public abstract class SelectionTreeMenu extends GraphMenu<DataTree> {
|
||||
public abstract void SelectAll(boolean select);
|
||||
@Override
|
||||
public void CheckElementsVisibility() {
|
||||
Object current = Current.get(tree.getCurrent());
|
||||
Object current = CurrentAnchestor.get(tree.getCurrent());
|
||||
if ((current != null) && (current.getClass().equals(getTargetClass()))) {
|
||||
String name = ((Selectable) current).getSelectionText();
|
||||
m_select_for_current.setText("Выбрать всё для " +
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common_old.UI.Menus_2023.ProjectMenuBar;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Menus_2023.VisualiserMenu;
|
||||
@@ -19,7 +20,7 @@ public class ProjectViewMenu extends VisualiserMenu {
|
||||
setIcon(CommonUtils.getIcon(view.getIcon()));
|
||||
setFont(Current.getTheme().Fonts.get(VisualiserFonts.TreeItalic));
|
||||
addActionListener(e -> {
|
||||
Current.set(Current.ProjectView, view);
|
||||
CurrentAnchestor.set(Current.ProjectView, view);
|
||||
UI.getMainWindow().getProjectWindow().ShowProjectView();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Common_old.UI.Tables;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common_old.UI.DataControl;
|
||||
import Common.Visual.DataControl;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.CellEditorListener;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Common_old.UI.Tables;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common_old.UI.DataControl;
|
||||
import Common.Visual.DataControl;
|
||||
|
||||
import javax.swing.*;
|
||||
public abstract class DBObjectRenderer extends RendererCell<DBObject> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Common_old.UI.Tables;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common_old.UI.DataControl;
|
||||
import Common.Visual.DataControl;
|
||||
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
public abstract class DataTable extends StyledTable implements DataControl {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package Common_old.UI.Trees;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.DataControl_OLD;
|
||||
import Common.Visual.DataControl_OLD;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.TreePath;
|
||||
@@ -10,8 +11,8 @@ public class DataTree extends StyledTree implements DataControl_OLD {
|
||||
super(root_in);
|
||||
}
|
||||
public void ChangeCurrentObject(DefaultMutableTreeNode node) {
|
||||
if (getCurrent() != Current.Undefined)
|
||||
Current.set(getCurrent(), node.getUserObject());
|
||||
if (getCurrent() != null)
|
||||
CurrentAnchestor.set(getCurrent(), node.getUserObject());
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common_old.UI.Trees;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common_old.Current;
|
||||
import Common.Visual.Selectable;
|
||||
|
||||
@@ -9,7 +10,7 @@ public class SelectableTree extends DataTree {
|
||||
}
|
||||
@Override
|
||||
public void LeftMouseAction1() {
|
||||
Object element = Current.get(getCurrent());
|
||||
Object element = CurrentAnchestor.get(getCurrent());
|
||||
if ((element instanceof Selectable)) {
|
||||
((Selectable) element).SwitchSelection();
|
||||
updateUI();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Common_old.UI.Trees;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.UI.ControlForm;
|
||||
import Common.Visual.ControlForm;
|
||||
|
||||
import java.awt.*;
|
||||
public class TreeForm<C extends StyledTree> extends ControlForm<C> {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common_old.UI;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Menus_2023.CredentialsBar.CredentialsBar;
|
||||
@@ -240,9 +241,8 @@ public class UI {
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Темы(всегда создавать первыми)">
|
||||
themes.put(VisualiserThemeName.Light, new LightVisualiserTheme());
|
||||
themes.put(VisualiserThemeName.Dark, new DarkVisualiserTheme());
|
||||
//по умолчанию поставить светлую тему. потому что до загрузки бд работаем с таблицей компонент.
|
||||
Current.set(Current.Theme, themes.get(VisualiserThemeName.Light));
|
||||
CurrentAnchestor.set(Current.Theme, themes.get(VisualiserThemeName.Light));
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Объекты отрисовки и редактирования деревьев и таблиц">
|
||||
TableRenderers.put(RendererDate, new DateRenderer_());
|
||||
|
||||
Reference in New Issue
Block a user