рефакторинг

This commit is contained in:
2023-09-29 21:46:08 +03:00
parent 12898b07bb
commit 760707e6fb
41 changed files with 510 additions and 486 deletions

View File

@@ -1,4 +1,5 @@
package Common.UI;
import Common.Constants.Constants;
import Common.Current;
import Common.Database.DBObject;
import Common.Database.DBTable;
@@ -9,7 +10,6 @@ import Common.UI.Menus.TableMenu;
import Common.UI.Tables.ColumnInfo;
import Common.UI.Tables.DataTable;
import Common.UI.Tables.Grid.GridAnchestor;
import Common.Utils.Utils;
import GlobalData.Grid.Grid;
import javax.swing.*;
@@ -209,7 +209,7 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
}
};
if (CurrentName() != Current.Undefined) {
current_row_i = Utils.Nan;
current_row_i = Constants.Nan;
ListSelectionModel selModel = control.getSelectionModel();
selModel.addListSelectionListener(e -> {
int row = control.getSelectedRow();
@@ -227,7 +227,7 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
}
}
} else {
current_row_i = Utils.Nan;
current_row_i = Constants.Nan;
// System.out.println("no current row_i="+current_row_i);
getDataSource().dropCurrent();
if (events_on) {

View File

@@ -1,10 +1,11 @@
package Common.UI.Menus;
import Common.Constants.Constants;
import Common.Utils.Utils;
import javax.swing.*;
public class TableMenu extends StyledPopupMenu {
int row = Utils.Nan;
int column = Utils.Nan;
int row = Constants.Nan;
int column = Constants.Nan;
Object target = null;
//-
JTable owner = null;

View File

@@ -1,13 +1,13 @@
package Common.UI.Tables;
import Common.Utils.Utils;
import Common.Constants.Constants;
public class ColumnInfo {
private String Name = "?";
private boolean visible = true;
private boolean editable = false;
private TableRenderers renderer = TableRenderers.RendererDefault;
private TableEditors editor = TableEditors.EditorDefault;
private int maxWidth = Utils.Nan;
private int minWidth = Utils.Nan;
private int maxWidth = Constants.Nan;
private int minWidth = Constants.Nan;
//private int lastWidth = Utils.Nan;
// public void setLastWidth(int width_in) {
// lastWidth = width_in;
@@ -72,7 +72,7 @@ public class ColumnInfo {
this.maxWidth = maxWidth_in;
}
public boolean hasMaxWidth() {
return maxWidth != Utils.Nan;
return maxWidth != Constants.Nan;
}
//-
public int getMinWidth() {
@@ -82,7 +82,7 @@ public class ColumnInfo {
this.minWidth = minWidth_in;
}
public boolean hasMinWidth() {
return minWidth != Utils.Nan;
return minWidth != Constants.Nan;
}
/*