Browse Source

Pull request #14551: REPORT-127437 Newui

Merge in DESIGN/design from ~ZONGYU.WANG/design:newui to newui

* commit '8013627bcc22ae4658c3c96faa845a99a4ea5708':
  REPORT-127437 fix:setui 调整
  REPORT-127437 fix:setui 调整
  REPORT-127437 fix:文件夹翻新,边框调整,部分图标替换,提示弹框布局样式等
  REPORT-127437 fix: table UI 调整
newui
Zongyu.Wang-王宗雨 5 months ago
parent
commit
dcbdca39f8
  1. 6
      designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java
  2. 27
      designer-base/src/main/java/com/fine/theme/light/ui/FineTableScrollBarPaneUI.java
  3. 1
      designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java
  4. 7
      designer-base/src/main/java/com/fr/design/constants/UIConstants.java
  5. 61
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
  6. 9
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/FineSearchPane.java
  7. 19
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
  8. 1
      designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java
  9. 14
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java
  10. 19
      designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java
  11. 12
      designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UICheckListPopup.java
  12. 18
      designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java
  13. 23
      designer-base/src/main/java/com/fr/design/gui/icontainer/UITableScrollPane.java
  14. 31
      designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java
  15. 38
      designer-base/src/main/java/com/fr/design/gui/itable/FineUITable.java
  16. 12
      designer-base/src/main/java/com/fr/design/gui/itable/SortableJTable.java
  17. 17
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java
  18. 8
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java
  19. 32
      designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java
  20. 17
      designer-base/src/main/java/com/fr/design/icon/BorderIcon.java
  21. 6
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java
  22. 56
      designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirTreeSearchPane.java
  23. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java
  24. 16
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java
  25. 17
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecycleSettingPane.java
  26. 3
      designer-base/src/main/java/com/fr/design/report/SelectImagePane.java
  27. 13
      designer-base/src/main/java/com/fr/design/style/BorderPane.java
  28. 4
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  29. 32
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  30. 18
      designer-base/src/main/java/com/fr/env/TestConnectionResult.java
  31. 3
      designer-base/src/main/resources/com/fine/theme/icon/border/all.svg
  32. 4
      designer-base/src/main/resources/com/fine/theme/icon/border/bottom.svg
  33. 4
      designer-base/src/main/resources/com/fine/theme/icon/border/bottom_thick.svg
  34. 5
      designer-base/src/main/resources/com/fine/theme/icon/border/double_bottom.svg
  35. 4
      designer-base/src/main/resources/com/fine/theme/icon/border/horizontal.svg
  36. 4
      designer-base/src/main/resources/com/fine/theme/icon/border/in.svg
  37. 4
      designer-base/src/main/resources/com/fine/theme/icon/border/left.svg
  38. 3
      designer-base/src/main/resources/com/fine/theme/icon/border/none.svg
  39. 4
      designer-base/src/main/resources/com/fine/theme/icon/border/out.svg
  40. 4
      designer-base/src/main/resources/com/fine/theme/icon/border/out_thick.svg
  41. 4
      designer-base/src/main/resources/com/fine/theme/icon/border/right.svg
  42. 4
      designer-base/src/main/resources/com/fine/theme/icon/border/top.svg
  43. 5
      designer-base/src/main/resources/com/fine/theme/icon/border/top_bottom.svg
  44. 6
      designer-base/src/main/resources/com/fine/theme/icon/border/top_double_bottom.svg
  45. 5
      designer-base/src/main/resources/com/fine/theme/icon/border/top_thick_bottom.svg
  46. 4
      designer-base/src/main/resources/com/fine/theme/icon/border/vertical.svg
  47. 11
      designer-base/src/main/resources/com/fine/theme/icon/close/platform_close.svg
  48. 4
      designer-base/src/main/resources/com/fine/theme/icon/tip/error.svg
  49. 3
      designer-base/src/main/resources/com/fine/theme/icon/tip/information.svg
  50. 4
      designer-base/src/main/resources/com/fine/theme/icon/tip/new_information.svg
  51. 3
      designer-base/src/main/resources/com/fine/theme/icon/tip/success.svg
  52. 5
      designer-base/src/main/resources/com/fine/theme/icon/tip/warning.svg
  53. 5
      designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_column.svg
  54. 5
      designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_row.svg
  55. 6
      designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_column.svg
  56. 6
      designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_row.svg
  57. 31
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  58. 3
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties
  59. 6
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  60. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  61. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  62. 22
      designer-base/src/test/java/com/fr/design/gui/storybook/components/TableStoryBoard.java
  63. 2
      designer-realize/src/main/java/com/fr/design/actions/cell/UIToolbarBorderButton.java
  64. 3
      designer-realize/src/main/java/com/fr/design/actions/columnrow/DeleteColumnAction.java
  65. 3
      designer-realize/src/main/java/com/fr/design/actions/columnrow/DeleteRowAction.java
  66. 2
      designer-realize/src/main/java/com/fr/design/actions/columnrow/InsertColumnAction.java
  67. 2
      designer-realize/src/main/java/com/fr/design/actions/columnrow/InsertRowAction.java
  68. 17
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java
  69. 15
      designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java
  70. 4
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java

6
designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java

@ -34,13 +34,15 @@ public class FineTableHeaderUI extends FlatTableHeaderUI {
header.setDefaultRenderer(new TableHeaderRenderer());
JTable table = header.getTable();
FineUIStyle.setStyle(table, FineUIStyle.DEFAULT_TABLE);
table.getTableHeader().getTable().setDefaultRenderer(Object.class, new TableRenderer());
if (table != null) {
table.setDefaultRenderer(Object.class, new TableRenderer());
}
}
@Override
public void paint(Graphics g, JComponent c) {
FineUIStyle.setStyle(((JTableHeader) c).getTable(), FineUIStyle.DEFAULT_TABLE);
super.paint(g, c);
}

27
designer-base/src/main/java/com/fine/theme/light/ui/FineTableScrollBarPaneUI.java

@ -1,9 +1,11 @@
package com.fine.theme.light.ui;
import com.formdev.flatlaf.ui.FlatScrollBarUI;
import com.fr.design.gui.iscrollbar.UIVerticalScrollBar;
import javax.swing.JComponent;
import javax.swing.JTable;
import javax.swing.plaf.ComponentUI;
import java.awt.Graphics;
import java.awt.Rectangle;
@ -16,12 +18,20 @@ import java.awt.Rectangle;
*/
public class FineTableScrollBarPaneUI extends FlatScrollBarUI {
private final JTable table;
public FineTableScrollBarPaneUI() {
}
public FineTableScrollBarPaneUI(JTable table) {
this.table = table;
/**
* 创建UI
*
* @param c 组件
* @return ComponentUI
*/
public static ComponentUI createUI(JComponent c) {
return new FineTableScrollBarPaneUI();
}
@Override
protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds) {
super.paintTrack(g, c, trackBounds);
@ -29,10 +39,13 @@ public class FineTableScrollBarPaneUI extends FlatScrollBarUI {
@Override
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) {
// 确保滚动条滑块不会超过表头区域
Rectangle headerRect = table.getTableHeader().getBounds();
int headerHeight = headerRect.height;
thumbBounds.y = Math.max(thumbBounds.y, headerHeight);
if (c instanceof UIVerticalScrollBar) {
// 确保滚动条滑块不会超过表头区域
JTable table = ((UIVerticalScrollBar) c).getTable();
Rectangle headerRect = table.getTableHeader().getBounds();
int headerHeight = headerRect.height;
thumbBounds.y = Math.max(thumbBounds.y, headerHeight);
}
super.paintThumb(g, c, thumbBounds);
}

1
designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java

@ -47,6 +47,7 @@ public interface FineUIStyle {
String DEFAULT_TABLE = "defaultTable";
String WHITE_BUTTON = "whiteButton";
String ORIGINAL_BUTTON = "originalButton";
String DETAIL_LABEL = "detailLabel";
/**

7
designer-base/src/main/java/com/fr/design/constants/UIConstants.java

@ -3,6 +3,7 @@
*/
package com.fr.design.constants;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.svg.IconUtils;
import com.fr.base.svg.SVGLoader;
import com.fr.general.IOUtils;
@ -222,10 +223,10 @@ public interface UIConstants {
public static final int LARGEARC = 6;
public static final Stroke BS = new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND, 2f, new float[]{3, 1}, 0);
public static final Icon PREVIEW_DOWN = IconUtils.readIcon("/com/fr/design/standard/preview_down_icon");
public static final Icon CLOSE_OF_AUTHORITY = IOUtils.readIcon("/com/fr/design/images/m_report/close.png");
public static final Icon CLOSE_OVER_AUTHORITY = IOUtils.readIcon("/com/fr/design/images/m_report/close_over.png");
public static final Icon CLOSE_PRESS_AUTHORITY = IOUtils.readIcon("/com/fr/design/images/m_report/close_press.png");
public static final int CLOSE_AUTHORITY_HEIGHT_AND_WIDTH = 24;
public static final Icon CLOSE_OF_AUTHORITY = new LazyIcon("platform_close", CLOSE_AUTHORITY_HEIGHT_AND_WIDTH).disabled();
public static final Icon CLOSE_OVER_AUTHORITY = new LazyIcon("platform_close", CLOSE_AUTHORITY_HEIGHT_AND_WIDTH);
public static final Icon CLOSE_PRESS_AUTHORITY = new LazyIcon("platform_close", CLOSE_AUTHORITY_HEIGHT_AND_WIDTH);
/**

61
designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java

@ -4,6 +4,8 @@
package com.fr.design.data.datapane.connect;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
@ -24,9 +26,9 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.rpc.ExceptionHandler;
import com.fr.rpc.RPCInvokerExceptionInfo;
@ -36,8 +38,6 @@ import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import org.jetbrains.annotations.NotNull;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
@ -136,14 +136,14 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
public void mouseClicked(MouseEvent e) {
if (hiddenPanel.isVisible()) {
hiddenPanel.setVisible(false);
dialog.setSize(FineUIScale.scale(new Dimension(380, 142)));
dialog.setSize(FineUIScale.scale(new Dimension(360, 142)));
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail"));
directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.right"));
directUiLabel.setIcon(new LazyIcon("plus"));
} else {
dialog.setSize(FineUIScale.scale(new Dimension(380, 270)));
dialog.setSize(FineUIScale.scale(new Dimension(360, 270)));
hiddenPanel.setVisible(true);
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Hide_Detail"));
directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.down"));
directUiLabel.setIcon(new LazyIcon("minus"));
}
}
@ -231,9 +231,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
detailLabel = new UILabel();
directUiLabel = new UILabel();
hiddenPanel = new JPanel();
midPane = new JPanel();
midPane.add(directUiLabel);
midPane.add(detailLabel);
midPane = Layouts.row(cell(directUiLabel), cell(detailLabel)).getComponent();
okButton = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK"));
cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel"));
@ -318,33 +316,27 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
private void initDialogPane() {
message.setText(Toolkit.i18nText("Fine-Design_Basic_Datasource_Test_Connection") + "...");
message.setBorder(BorderFactory.createEmptyBorder(8, 5, 0, 0));
okButton.setEnabled(false);
dialog = new JDialog((Dialog) SwingUtilities.getWindowAncestor(DatabaseConnectionPane.this), Toolkit.i18nText("Fine-Design_Basic_Datasource_Test_Connection"), true);
dialog.setSize(new Dimension(380, 125));
dialog.setSize(FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.env.RemoteEnvPane.dialog")));
okButton.setEnabled(false);
JPanel jp = new JPanel();
JPanel upPane = new JPanel();
JPanel upPane = new JPanel(new BorderLayout());
JPanel downPane = new JPanel();
uiLabel = new UILabel(UIManager.getIcon("OptionPane.informationIcon"));
upPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
upPane.add(uiLabel);
upPane.add(message);
midPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 0));
directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.right"));
uiLabel = new UILabel(new LazyIcon("information", 20));
upPane.add(Layouts.row(10, Layouts.cell(uiLabel), Layouts.cell(message), Layouts.flex()).getComponent(), BorderLayout.NORTH);
directUiLabel.setIcon(new LazyIcon("plus"));
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail"));
detailLabel.setForeground(Color.BLUE);
hiddenPanel.setLayout(new BorderLayout(2, 0));
hiddenPanel.add(new JPanel(), BorderLayout.WEST);
hiddenPanel.add(new JPanel(), BorderLayout.EAST);
downPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 15, 9));
downPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 8, 0));
downPane.add(okButton);
downPane.add(cancelButton);
jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS));
jp.add(upPane);
jp.add(midPane);
jp.add(hiddenPanel);
jp.add(downPane);
jp.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
jp.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
jp.add(Layouts.column(10, cell(upPane), row(10, fix(20), cell(midPane)),
row(10, fix(20), cell(hiddenPanel).weight(1)).weight(1)).getComponent(), BorderLayout.CENTER);
jp.add(downPane, BorderLayout.SOUTH);
dialog.add(jp);
dialog.setResizable(false);
dialog.setLocationRelativeTo(SwingUtilities.getWindowAncestor(DatabaseConnectionPane.this));
@ -482,9 +474,9 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
protected void done() {
try {
get();
dialog.setSize(new Dimension(380, 125));
dialog.setSize(FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.env.RemoteEnvPane.dialog")));
okButton.setEnabled(true);
uiLabel.setIcon(UIManager.getIcon("OptionPane.informationIcon"));
uiLabel.setIcon(new LazyIcon("information", 20));
message.setText(Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully"));
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
@ -495,11 +487,11 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
}
private void dealWithException(ExecutionException e) {
dialog.setSize(new Dimension(380, 142));
dialog.setSize(FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.env.RemoteEnvPane.dialog")));
midPane.setVisible(true);
hiddenPanel.setVisible(false);
okButton.setEnabled(true);
uiLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon"));
uiLabel.setIcon(new LazyIcon("error", 20));
message.setText(Toolkit.i18nText("Fine-Design_Basic_Connection_Failed"));
Connection database = DatabaseConnectionPane.this.updateBean();
SolutionProcessor select = ExceptionSolutionSelector.get().select(e, database);
@ -551,9 +543,14 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
} else {
redirect.setText(Toolkit.i18nText("Fine_Designer_Not_Found_Driver_No_Solution"));
}
FineUIStyle.setStyle(driverTips, FineUIStyle.DETAIL_LABEL);
FineUIStyle.setStyle(deatail, FineUIStyle.DETAIL_LABEL);
gridJpanel.add(redirect);
gridJpanel.setBorder(new ScaledEmptyBorder(10, 10, 0, 10));
hiddenPanel.add(gridJpanel);
gridJpanel.setBackground(Color.WHITE);
hiddenPanel.setOpaque(true);
gridJpanel.setOpaque(false);
hiddenPanel.setBackground(UIManager.getColor("fill.normal"));
}
private void showExceptionMessageUI(String detail, String solution) {

9
designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/FineSearchPane.java

@ -133,6 +133,15 @@ public class FineSearchPane extends JPanel implements HoverAware {
clearButton.addActionListener(listener);
}
/**
* 按钮添加鼠标监听
*
* @param mouseAdapter
*/
public void addClearMouseListener(MouseAdapter mouseAdapter) {
clearButton.addMouseListener(mouseAdapter);
}
public String getText() {
return searchTextField.getText();
}

19
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java

@ -5,7 +5,6 @@ package com.fr.design.data.datapane.preview;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineTableHeaderUI;
import com.fine.theme.light.ui.FineTableScrollBarPaneUI;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils;
@ -29,6 +28,7 @@ import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UITableScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.iprogressbar.AutoProgressBar;
import com.fr.design.gui.itable.SortableJTable;
@ -51,6 +51,7 @@ import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
@ -98,6 +99,9 @@ public class PreviewTablePane extends BasicPane {
private PreviewTableDesensitizationPane desensitizationPane;
private static final int PREVIEW_TABLE_MIN_COLUMN_WIDTH = FineUIScale.scale(75);
private static final int PREVIEW_TABLE_WIDTH = FineUIScale.scale(600);
/**
* 用于refreshLabel的鼠标监听
*/
@ -305,8 +309,7 @@ public class PreviewTablePane extends BasicPane {
preveiwTable = new CopyableJTable(new TableSorter());
preveiwTable.setRowSelectionAllowed(false);
preveiwTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
JScrollPane scrollPane = new JScrollPane(preveiwTable);
scrollPane.getVerticalScrollBar().setUI(new FineTableScrollBarPaneUI(preveiwTable));
UITableScrollPane scrollPane = new UITableScrollPane(preveiwTable);
return scrollPane;
}
@ -401,7 +404,11 @@ public class PreviewTablePane extends BasicPane {
public static void resetPreviewTable() {
getInstance().preveiwTable = new SortableJTable(new TableSorter());
getInstance().preveiwTable.setRowSelectionAllowed(false);
getInstance().preveiwTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
if (getInstance().preveiwTable.getColumnCount() * PREVIEW_TABLE_MIN_COLUMN_WIDTH > PREVIEW_TABLE_WIDTH) {
getInstance().preveiwTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
} else {
getInstance().preveiwTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
}
PreviewTablePane.progressBar.close();
getInstance().repaint();
}
@ -411,6 +418,10 @@ public class PreviewTablePane extends BasicPane {
tableSorter.setTableModel(tableModel);
if (tableModel.getColumnCount() * PREVIEW_TABLE_MIN_COLUMN_WIDTH > PREVIEW_TABLE_WIDTH) {
preveiwTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
}
preveiwTable.getParent().validate();
preveiwTable.repaint();
}

1
designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java

@ -14,6 +14,7 @@ import com.fr.design.data.datapane.preview.desensitization.view.rule.Desensitiza
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.ComboCheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombocheckbox.UIComboCheckBox;
import com.fr.design.gui.ilable.UILabel;

14
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java

@ -1,11 +1,12 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fine.theme.utils.FineUIScale;
import com.fr.data.impl.EmbeddedTableData;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.date.UIDatePicker;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UITableScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
@ -15,7 +16,6 @@ import com.fr.stable.StringUtils;
import javax.swing.DefaultCellEditor;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
@ -37,8 +37,10 @@ import java.util.Date;
public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableData> {
private static final int MIN_CELL_WIDTH = 30;
private static final int PREVIEW_TABLE_MIN_COLUMN_WIDTH = FineUIScale.scale(75);
private static final int PREVIEW_TABLE_WIDTH = FineUIScale.scale(600);
private JTable dataJTable ;
private JScrollPane scrollPane;
private UITableScrollPane scrollPane;
private UILabel coordinatelabel;
private UIButton insertRowButton;
private UIButton removeRowButton;
@ -59,7 +61,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
// prepare the data in this way as default if no arguments is passed in
EmbeddedTableModel tableModel = new EmbeddedTableModel(new EmbeddedTableData());
dataJTable = new JTable(tableModel);
scrollPane = new JScrollPane(dataJTable);
scrollPane = new UITableScrollPane(dataJTable);
this.add(scrollPane, BorderLayout.CENTER);
// 显示double,date类;渲染date类
@ -79,7 +81,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
// AUTO RESIZE
// dataJTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
dataJTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
dataJTable.setAutoResizeMode(tableModel.getColumnCount() * PREVIEW_TABLE_MIN_COLUMN_WIDTH <= PREVIEW_TABLE_WIDTH ? JTable.AUTO_RESIZE_ALL_COLUMNS : JTable.AUTO_RESIZE_OFF);
dataJTable.setRowSelectionAllowed(true);
dataJTable.setColumnSelectionAllowed(true);
@ -134,6 +136,8 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
localDefaultModel.fireTableDataChanged();
tableStructureChanged();
selectedChanged();
dataJTable.setAutoResizeMode(localDefaultModel.getColumnCount() * PREVIEW_TABLE_MIN_COLUMN_WIDTH <= PREVIEW_TABLE_WIDTH ? JTable.AUTO_RESIZE_ALL_COLUMNS : JTable.AUTO_RESIZE_OFF);
dataJTable.repaint();
}
};

19
designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java

@ -1,6 +1,8 @@
package com.fr.design.file;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.file.DelFileAction;
import com.fr.design.actions.file.LocateAction;
@ -38,7 +40,6 @@ import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
@ -46,6 +47,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
import static javax.swing.JOptionPane.WARNING_MESSAGE;
import static javax.swing.JOptionPane.YES_NO_OPTION;
@ -370,12 +374,11 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
dirTreePane = TemplateDirTreePane.getInstance();
card.show(cardPane, DIR);
add(cardPane, BorderLayout.CENTER);
cardPane.setBorder(BorderFactory.createEmptyBorder(10, 15, 0, 10));
cardPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
dirTreePane.refresh();
// 确认按钮,默认就可用
confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm"));
confirmButton.setPreferredSize(new Dimension(60, 25));
confirmButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -386,7 +389,6 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
// 取消按钮
UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel"));
cancelButton.setPreferredSize(new Dimension(60, 25));
cancelButton.addActionListener(new ActionListener() {
@ -396,13 +398,10 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
}
});
JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0));
bottomPanel.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10));
bottomPanel.add(confirmButton);
bottomPanel.add(cancelButton);
this.add(bottomPanel, BorderLayout.SOUTH);
this.add(row(8, flex(), cell(confirmButton), cell(cancelButton))
.with(it -> it.setBorder(new ScaledEmptyBorder(0, 0, 10, 10))).getComponent(), BorderLayout.SOUTH);
this.setSize(new Dimension(600, 400));
this.setSize(FineUIScale.scale(new Dimension(660, 600)));
this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Move"));
this.setResizable(false);
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);

12
designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UICheckListPopup.java

@ -3,7 +3,6 @@ package com.fr.design.gui.icombocheckbox;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -15,6 +14,7 @@ import com.fr.general.IOUtils;
import javax.swing.JCheckBox;
import javax.swing.JPanel;
import javax.swing.UIManager;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -38,7 +38,7 @@ public class UICheckListPopup extends UIPopupMenu {
private Object[] values;
private JPanel checkboxPane;
private UIScrollPane jScrollPane;
private Color mouseEnteredColor = UIConstants.CHECKBOX_HOVER_SELECTED;
private Color mouseEnteredColor = UIManager.getColor("List.selectionBackground");
private int maxDisplayNumber = 8;
private boolean supportSelectAll = true;
/**
@ -86,7 +86,6 @@ public class UICheckListPopup extends UIPopupMenu {
checkboxPane.setBackground(Color.WHITE);
jScrollPane = new UIScrollPane(checkboxPane);
jScrollPane.setBorder(new FineRoundBorder());
jScrollPane.setBackground(FlatUIUtils.getUIColor("default.background", new Color(246, 248, 250)));
this.setLayout(new BorderLayout());
this.add(jScrollPane, BorderLayout.CENTER);
@ -111,10 +110,10 @@ public class UICheckListPopup extends UIPopupMenu {
}
addSelectListener();
jScrollPane.setPreferredSize(FineUIScale.scale(new Dimension(140, checkBoxList.size() * CHECKBOX_HEIGHT + 10)));
jScrollPane.setPreferredSize(FineUIScale.scale(new Dimension(144, checkBoxList.size() * CHECKBOX_HEIGHT + 10)));
//超过1页的数量时显示滚动条
if (checkBoxList.size() > maxDisplayNumber) {
jScrollPane.setPreferredSize(FineUIScale.scale(new Dimension(140, maxDisplayNumber * CHECKBOX_HEIGHT)));
jScrollPane.setPreferredSize(FineUIScale.scale(new Dimension(144, maxDisplayNumber * CHECKBOX_HEIGHT)));
}
checkboxPane.repaint();
jScrollPane.repaint();
@ -122,7 +121,7 @@ public class UICheckListPopup extends UIPopupMenu {
private void addOneCheckValue(Object checkValue) {
JPanel checkPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
checkPane.setPreferredSize(FineUIScale.scale(new Dimension(140, CHECKBOX_HEIGHT)));
checkPane.setPreferredSize(FineUIScale.scale(new Dimension(144, CHECKBOX_HEIGHT)));
final JCheckBox temp = createCheckbox();
final UILabel label = new UILabel(checkValue.toString());
label.setBackground(Color.WHITE);
@ -167,6 +166,7 @@ public class UICheckListPopup extends UIPopupMenu {
public void mouseEntered(MouseEvent e) {
label.setOpaque(true);
label.setBackground(mouseEnteredColor);
repaint();
}
@Override

18
designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java

@ -70,6 +70,8 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam
private boolean supportSelectAll = true;
private String placeHolder = StringUtils.EMPTY;
private boolean rollOver;
public UIComboCheckBox(Object[] value) {
this(value, DEFAULT_VALUE_SPERATOR, true);
}
@ -132,6 +134,8 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam
setText();
addPopupListener(this);
setBackground(Color.WHITE);
setOpaque(true);
}
/**
@ -198,6 +202,18 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam
public void mouseClicked(MouseEvent e) {
togglePopup();
}
@Override
public void mouseEntered(MouseEvent e) {
rollOver = true;
repaint();
}
@Override
public void mouseExited(MouseEvent e) {
rollOver = false;
repaint();
}
});
}
@ -224,7 +240,7 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam
@Override
public boolean isHovered() {
return true;
return rollOver || this.popup.isShowing();
}
private class PopupAction implements ActionListener {

23
designer-base/src/main/java/com/fr/design/gui/icontainer/UITableScrollPane.java

@ -0,0 +1,23 @@
package com.fr.design.gui.icontainer;
import com.fr.design.gui.iscrollbar.UIVerticalScrollBar;
import javax.swing.JScrollBar;
import javax.swing.JTable;
import java.awt.Component;
/**
* FineUITable 定义垂直滚动条 {@link UIVerticalScrollBar}
* @author lemon
* @since
* Created on
*/
public class UITableScrollPane extends UIScrollPane {
public UITableScrollPane(Component c) {
super(c);
if (c instanceof JTable) {
setVerticalScrollBar(new UIVerticalScrollBar((JTable) c, JScrollBar.VERTICAL));
}
}
}

31
designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java

@ -0,0 +1,31 @@
package com.fr.design.gui.iscrollbar;
import javax.swing.JTable;
/**
* jtable 垂直滚动条
*
* @author lemon
* @since
* Created on
*/
public class UIVerticalScrollBar extends UIScrollBar {
private static final String UI_CLASS_ID = "TableVerticalBarUI";
private static final long serialVersionUID = 1L;
public JTable table;
public UIVerticalScrollBar(JTable table, int orientation) {
super(orientation);
this.table = table;
}
public String getUIClassID() {
return UI_CLASS_ID;
}
public JTable getTable() {
return this.table;
}
}

38
designer-base/src/main/java/com/fr/design/gui/itable/FineUITable.java

@ -0,0 +1,38 @@
package com.fr.design.gui.itable;
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumnModel;
/**
* 应用 TableHeaderUI 样式的 table
* @author lemon
* @since
* Created on
*/
public class FineUITable extends JTable {
public FineUITable(AbstractTableModel tableModel){
super(tableModel);
setTableHeader(new FineUITableHeader(tableHeader.getColumnModel()));
}
/**
* tableHeader
*/
public static class FineUITableHeader extends JTableHeader {
private static final String UI_CLASS_ID = "TableHeaderUI";
public FineUITableHeader(TableColumnModel columnModel){
super(columnModel);
}
@Override
public String getUIClassID() {
return UI_CLASS_ID;
}
}
}

12
designer-base/src/main/java/com/fr/design/gui/itable/SortableJTable.java

@ -1,14 +1,16 @@
package com.fr.design.gui.itable;
import com.fine.theme.light.ui.FineTableHeaderUI;
/**
* SortableJTable
* @author lemon
* @since
* Created on
*/
public class SortableJTable extends FineUITable {
import javax.swing.JTable;
public class SortableJTable extends JTable{
public SortableJTable(TableSorter tableModel){
super(tableModel);
tableModel.setTableHeader(getTableHeader());
setShowGrid(true);
getTableHeader().setUI(new FineTableHeaderUI());
}
}

17
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java

@ -2,19 +2,17 @@ package com.fr.design.gui.itableeditorpane;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.light.ui.FineTableHeaderUI;
import com.fine.theme.light.ui.FineTableScrollBarPaneUI;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.icontainer.UITableScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.FineUITable;
import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.event.TableModelListener;
import java.awt.BorderLayout;
import java.awt.Dimension;
@ -33,7 +31,7 @@ public class UITableEditorPane<T> extends BasicPane {
*
*/
private static final long serialVersionUID = 6855793816972735815L;
protected JTable editTable;
protected FineUITable editTable;
// 放置action 的按钮.
protected UITableModelAdapter<T> tableModel;
private String leftLabelName;
@ -70,16 +68,15 @@ public class UITableEditorPane<T> extends BasicPane {
UILabel l = new UILabel(leftLabelName);
editTable = tableModel.createTable();
UIScrollPane scrollPane = new UIScrollPane(editTable);
UITableScrollPane scrollPane = new UITableScrollPane(editTable);
scrollPane.setBorder(new FineRoundBorder());
initbuttonPane(action);
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
controlPane.add(buttonPane, BorderLayout.EAST);
controlPane.add(content == null ? l : content, BorderLayout.WEST);
scrollPane.getVerticalScrollBar().setUI(new FineTableScrollBarPaneUI(editTable));
pane.add(Layouts.column(LayoutConstants.HGAP_LARGE, Layouts.cell(controlPane), Layouts.cell(scrollPane).weight(1)).getComponent());
this.editTable.getTableHeader().setUI(new FineTableHeaderUI());
pane.add(Layouts.column(10, Layouts.cell(controlPane), Layouts.cell(scrollPane).weight(1)).getComponent());
this.editTable.setRowHeight(FineUIScale.scale(24));
}
@ -170,11 +167,11 @@ public class UITableEditorPane<T> extends BasicPane {
/**
* @return jTable
*/
public JTable getEditTable() {
public FineUITable getEditTable() {
return editTable;
}
public void setEditTable(JTable editTable) {
public void setEditTable(FineUITable editTable) {
this.editTable = editTable;
}

8
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java

@ -2,12 +2,12 @@ package com.fr.design.gui.itableeditorpane;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.itable.FineUITable;
import com.fr.design.mainframe.DesignerContext;
import com.fr.log.FineLoggerFactory;
import org.jetbrains.annotations.Nullable;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableCellEditor;
@ -30,7 +30,7 @@ public abstract class UITableModelAdapter<T> extends AbstractTableModel implemen
*
*/
private static final long serialVersionUID = 3633792011995186187L;
protected JTable table;
protected FineUITable table;
private Class<?>[] classes;
private String[] columnNames;
@ -40,7 +40,7 @@ public abstract class UITableModelAdapter<T> extends AbstractTableModel implemen
protected UITableModelAdapter(String[] columnNames) {
this.columnNames = columnNames;
table = new JTable(this);
table = new FineUITable(this);
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
// TableRowSorter rowSorter = new TableRowSorter(this);
// table.setRowSorter(rowSorter);
@ -50,7 +50,7 @@ public abstract class UITableModelAdapter<T> extends AbstractTableModel implemen
* 创建表
* @return
*/
public JTable createTable() {
public FineUITable createTable() {
return table;
}

32
designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java

@ -5,6 +5,8 @@ package com.fr.design.gui.style;
*/
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.CellBorderStyle;
import com.fr.base.Style;
@ -29,9 +31,7 @@ import javax.swing.SwingConstants;
import javax.swing.UIManager;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
import java.awt.*;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
@ -105,18 +105,20 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
cell(currentLineColorPane).weight(3)),
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Out_Border"), SwingConstants.LEFT)).weight(1.2),
cell(outerToggleButton = new UIToggleButton(new Icon[]{IOUtils.readIcon("com/fr/design/images/m_format/out.png"),
IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/out_white.png")}, false)).weight(3)),
cell(outerToggleButton = new UIToggleButton(new Icon[]{new LazyIcon("out"),
IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/out_white.png")}, false)).
with(it -> it.setPreferredSize(new Dimension(-1, FineUIScale.scale(24)))).weight(3)),
row(
flex(1.2),
cell(externalPane).weight(3)),
cell(externalPane).with(it -> it.setPreferredSize(new Dimension(-1, FineUIScale.scale(24)))).weight(3)),
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_In_Border"), SwingConstants.LEFT)).weight(1.2),
cell(innerToggleButton = new UIToggleButton(new Icon[]{IOUtils.readIcon("com/fr/design/images/m_format/in.png"),
IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/in_white.png")}, false)).weight(3)),
cell(innerToggleButton = new UIToggleButton(new Icon[]{new LazyIcon("in"),
IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/in_white.png")}, false)).
with(it -> it.setPreferredSize(new Dimension(-1, FineUIScale.scale(24)))).weight(3)),
row(
flex(1.2),
cell(insidePane).weight(3))
cell(insidePane).with(it -> it.setPreferredSize(new Dimension(-1, FineUIScale.scale(24)))).weight(3))
).with(it -> it.setBorder(new ScaledEmptyBorder(0, 0, LayoutConstants.VERTICAL_GAP, 0))).getComponent();
}
@ -156,12 +158,12 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
private void initButtonsWithIcon() {
// todo: 暂缺视觉反白图标
topToggleButton = new UIToggleButton(new Icon[]{IOUtils.readIcon("/com/fr/base/images/dialog/border/top.png"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/top_white.png")}, false);
leftToggleButton = new UIToggleButton(new Icon[]{IOUtils.readIcon("/com/fr/base/images/dialog/border/left.png"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/left_white.png")}, false);
bottomToggleButton = new UIToggleButton(new Icon[]{IOUtils.readIcon("/com/fr/base/images/dialog/border/bottom.png"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bottom_white.png")}, false);
rightToggleButton = new UIToggleButton(new Icon[]{IOUtils.readIcon("/com/fr/base/images/dialog/border/right.png"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/right_white.png")}, false);
horizontalToggleButton = new UIToggleButton(new Icon[]{IOUtils.readIcon("/com/fr/base/images/dialog/border/horizontal.png"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/horizontal_white.png")}, false);
verticalToggleButton = new UIToggleButton(new Icon[]{IOUtils.readIcon("/com/fr/base/images/dialog/border/vertical.png"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/vertical_white.png")}, false);
topToggleButton = new UIToggleButton(new Icon[]{new LazyIcon("top"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/top_white.png")}, false);
leftToggleButton = new UIToggleButton(new Icon[]{new LazyIcon("left"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/left_white.png")}, false);
bottomToggleButton = new UIToggleButton(new Icon[]{new LazyIcon("bottom"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bottom_white.png")}, false);
rightToggleButton = new UIToggleButton(new Icon[]{new LazyIcon("right"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/right_white.png")}, false);
horizontalToggleButton = new UIToggleButton(new Icon[]{new LazyIcon("horizontal"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/horizontal_white.png")}, false);
verticalToggleButton = new UIToggleButton(new Icon[]{new LazyIcon("vertical"), IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/vertical_white.png")}, false);
this.currentLineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY);
this.currentLineColorPane = new NewColorSelectBox(100);
}

17
designer-base/src/main/java/com/fr/design/icon/BorderIcon.java

@ -1,5 +1,6 @@
package com.fr.design.icon;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.CellBorderStyle;
import com.fr.base.GraphHelper;
import com.fr.stable.AssistUtils;
@ -13,8 +14,8 @@ import java.awt.Graphics2D;
public class BorderIcon implements Icon {
private int width = 14;
private int height = 14;
private int width = FineUIScale.scale(16);
private int height = FineUIScale.scale(16);
public CellBorderStyle cellBorderStyle;
public BorderIcon(CellBorderStyle cellBorderStyle) {
@ -35,10 +36,6 @@ public class BorderIcon implements Icon {
private void drawLine(Graphics g, double x1, double y1, double x2,
double y2, int lineStyle, Color color) {
g.setColor(color);
x1--;
x2--;
y1--;
y2--;
if (lineStyle == Constants.LINE_MEDIUM
|| lineStyle == Constants.LINE_THICK) {
lineStyle = Constants.LINE_MEDIUM;
@ -69,10 +66,10 @@ public class BorderIcon implements Icon {
public void paintIcon(Component c, Graphics g, int x, int y) {
int defaultWidth = c.getWidth();
int defaultHeight = c.getHeight();
int x1 = (defaultWidth - width) / 2;
int x2 = (defaultWidth + width) / 2;
int y1 = (defaultHeight - height) / 2;
int y2 = (defaultHeight + height) / 2;
int x1 = (defaultWidth - width) / 2 + 1;
int x2 = (defaultWidth + width) / 2 - 1;
int y1 = (defaultHeight - height) / 2 + 1;
int y2 = (defaultHeight + height) / 2 - 1;
Graphics2D gr = (Graphics2D) g;
drawLine(gr, x1, y1, x2, y1, cellBorderStyle.getTopStyle(),
cellBorderStyle.getTopColor());

6
designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java

@ -108,11 +108,11 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
public void mouseClicked(MouseEvent e) {
if (hiddenPanel.isVisible()) {
hiddenPanel.setVisible(false);
CheckFontInfoDialog.this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.collapse"));
CheckFontInfoDialog.this.setSize(FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.collapse")));
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail"));
directUiLabel.setIcon(new LazyIcon("plus"));
} else {
CheckFontInfoDialog.this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.unfold"));
CheckFontInfoDialog.this.setSize(FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.unfold")));
hiddenPanel.setVisible(true);
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Hide_Detail"));
directUiLabel.setIcon(new LazyIcon("minus"));
@ -134,7 +134,7 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
this.add(topPanel, BorderLayout.NORTH);
this.add(hiddenPanel, BorderLayout.CENTER);
this.add(bottomPanel, BorderLayout.SOUTH);
this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.collapse"));
this.setSize(FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.collapse")));
GUICoreUtils.centerWindow(this);
}

56
designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirTreeSearchPane.java

@ -1,9 +1,7 @@
package com.fr.design.mainframe.manager.search.searcher.control.pane;
import com.fr.base.svg.IconUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.datapane.management.search.pane.FineSearchPane;
import com.fr.design.file.TemplateDirTreePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
@ -39,7 +37,7 @@ public class TemplateDirTreeSearchPane extends JPanel implements TreeSearchStatu
/**
* 搜索面板
*/
private JPanel searchPane;
private FineSearchPane searchPane;
private final KeyAdapter enterPressed = new KeyAdapter() {
@Override
@ -61,27 +59,12 @@ public class TemplateDirTreeSearchPane extends JPanel implements TreeSearchStatu
}
private void initSearchPane() {
searchPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.TOOLBAR_BORDER_COLOR));
searchPane.setBackground(Color.WHITE);
// 左侧搜索图标
UILabel searchLabel = new UILabel(IconUtils.readIcon("/com/fr/design/images/data/search"));
searchLabel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0));
searchLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
// do nothing
}
});
searchPane = new FineSearchPane();
// 中间输入框
initSearchTextField();
// 右侧返回图标
UILabel returnLabel = new UILabel(IconUtils.readIcon("/com/fr/design/images/data/clear"));
returnLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Tree_Search_Return"));
returnLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 11));
returnLabel.addMouseListener(new MouseAdapter() {
searchPane.setClearToolTipText(Toolkit.i18nText("Fine-Design_Tree_Search_Return"));
searchPane.addClearMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
TemplateDirTreeSearchManager.getInstance().outOfSearchMode();
@ -89,34 +72,11 @@ public class TemplateDirTreeSearchPane extends JPanel implements TreeSearchStatu
}
});
searchPane.add(searchLabel, BorderLayout.WEST);
searchPane.add(searchTextField, BorderLayout.CENTER);
searchPane.add(returnLabel, BorderLayout.EAST);
}
private void initSearchTextField() {
searchTextField = new UITextField(){
@Override
public Insets getInsets() {
return new Insets(2, 4, 0, 4);
}
};
searchTextField.setBorderPainted(false);
searchTextField.setPlaceholder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Template_Dir_Search_Press_Enter_For_Search"));
searchTextField.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.NORMAL_BLUE));
searchPane.repaint();
}
@Override
public void focusLost(FocusEvent e) {
searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.TOOLBAR_BORDER_COLOR));
searchPane.repaint();
}
});
this.searchTextField.getDocument().addDocumentListener(new DocumentListener() {
searchPane.setPlaceholder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Template_Dir_Search_Press_Enter_For_Search"));
searchPane.addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
}
@ -130,7 +90,7 @@ public class TemplateDirTreeSearchPane extends JPanel implements TreeSearchStatu
public void changedUpdate(DocumentEvent e) {
}
});
this.searchTextField.addKeyListener(enterPressed);
searchPane.addKeyListener(enterPressed);
}
private void dealWithTextChange() {

2
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java

@ -77,7 +77,7 @@ public abstract class AbstractSupportSelectTablePane<T extends TableEntity> exte
/**
* 整体面板的north部分
*/
protected JPanel tableTopPane = new JPanel();
protected JPanel tableTopPane = new JPanel(new BorderLayout());
/**
* 整体面板
*/

16
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java

@ -58,9 +58,9 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
protected UITextField searchTextField;
protected UILabel deleteLabel;
protected UILabel deleteLabel = new UILabel(ICON_DELETE);
protected UILabel restoreLabel;
protected UILabel restoreLabel = new UILabel(ICON_REFRESH);
private static final int COLUMNS_COUNT = 15;
private BasicDialog dialog;
@ -116,7 +116,7 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
tableTopPane = new JPanel();
tableTopPane.setLayout(new BorderLayout());
JPanel leftPane = new JPanel();
JPanel rightPane = new JPanel();
JPanel rightPane = new JPanel(new BorderLayout());
//左边面板,包含搜索icon+搜索框
if (isNeedSearch()) {
searchTextField = new UITextField();
@ -130,24 +130,26 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
it.setOpaque(true);
it.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
}).getComponent();
tableTopPane.add(leftPane, BorderLayout.EAST);
}
//右边面板,包括还原按钮+删除按钮
restoreLabel.setVisible(false);
deleteLabel.setVisible(false);
if (isNeedRestore()) {
restoreLabel = new UILabel(ICON_REFRESH);
restoreLabel.setVisible(true);
restoreLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
restoreLabel.setDisabledIcon(ICON_REFRESH_DISABLE);
restoreLabel.setEnabled(false);
rightPane.add(restoreLabel);
}
if (isNeedDelete()) {
deleteLabel = new UILabel(ICON_DELETE);
deleteLabel.setVisible(true);
deleteLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
deleteLabel.setDisabledIcon(ICON_DELETE_DISABLE);
deleteLabel.setEnabled(false);
rightPane.add(deleteLabel);
}
tableTopPane.add(leftPane, BorderLayout.EAST);
tableTopPane.add(rightPane, BorderLayout.WEST);
tableTopPane.add(row(8, cell(restoreLabel), cell(deleteLabel)).getComponent(), BorderLayout.WEST);
}

17
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecycleSettingPane.java

@ -1,5 +1,7 @@
package com.fr.design.mainframe.vcs.ui;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.design.gui.ibutton.UIButton;
@ -66,20 +68,15 @@ public class RecycleSettingPane extends BasicPane {
}
private JPanel createSchedulePane() {
JPanel schedulePane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, VerticalFlowLayout.TOP, 0, 0);
JPanel spinnerPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
JPanel buttonPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
spinnerPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Recycle_Schedule")));
spinner = new UISpinner(MIN_VALUE, MAX_VALUE, STEP, DEFAULT_VALUE);
spinner.setValue(VcsConfig.getInstance().getV2CleanRecycleInterval());
spinnerPane.add(spinner);
spinnerPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Recycle_Schedule_Day")));
schedulePane.add(spinnerPane);
button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Save"));
initButtonListener();
buttonPane.add(button);
schedulePane.add(buttonPane);
return schedulePane;
return Layouts.column(10, Layouts.row(Layouts.cell(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Recycle_Schedule")))
, Layouts.cell(spinner).with(it -> it.setPreferredSize(new Dimension(FineUIScale.scale(100), -1)))
, Layouts.fix(6)
, Layouts.cell(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Recycle_Schedule_Day"))), Layouts.flex()),
Layouts.row(Layouts.cell(button), Layouts.flex())).getComponent();
}
private void initButtonListener() {

3
designer-base/src/main/java/com/fr/design/report/SelectImagePane.java

@ -1,6 +1,7 @@
package com.fr.design.report;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.Style;
import com.fr.design.dialog.BasicPane;
@ -82,7 +83,7 @@ public class SelectImagePane extends BasicPane {
previewPane.setOpaque(false);
this.add(column(
5,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"))),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"))).with(it -> FineUIStyle.setStyle(it, FineUIStyle.LABEL_TIP)),
row(
10,
cell(new JScrollPane(previewPane)).with(it -> {

13
designer-base/src/main/java/com/fr/design/style/BorderPane.java

@ -3,6 +3,7 @@
*/
package com.fr.design.style;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.ui.FlatUIUtils;
@ -102,12 +103,12 @@ public class BorderPane extends BasicPane {
private void initBasicComponents() {
borderComponent = new BorderComponent();
topToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/top.png"), BorderPane.TOP_BORDER, false);
horizontalToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/horizontal.png"), BorderPane.HORIZONTAL_BORDER, false);
bottomToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/bottom.png"), BorderPane.BOTTOM_BORDER, false);
leftToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/left.png"), BorderPane.LEFT_BORDER, true);
verticalToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/vertical.png"), BorderPane.VERTICAL_BORDER, true);
rightToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/right.png"), BorderPane.RIGHT_BORDER, true);
topToggleButton = new ToggleButton(new LazyIcon("top"), BorderPane.TOP_BORDER, false);
horizontalToggleButton = new ToggleButton(new LazyIcon("horizontal"), BorderPane.HORIZONTAL_BORDER, false);
bottomToggleButton = new ToggleButton(new LazyIcon("bottom"), BorderPane.BOTTOM_BORDER, false);
leftToggleButton = new ToggleButton(new LazyIcon("left"), BorderPane.LEFT_BORDER, true);
verticalToggleButton = new ToggleButton(new LazyIcon("vertical"), BorderPane.VERTICAL_BORDER, true);
rightToggleButton = new ToggleButton(new LazyIcon("right"), BorderPane.RIGHT_BORDER, true);
this.currentLineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY);
this.currentLineColorPane = new NewColorSelectBox(100);
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

4
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -35,6 +35,7 @@ import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.CheckBoxList;
import com.fr.design.gui.itable.FineUITable;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.i18n.Toolkit;
import com.fr.design.javascript.JavaScriptActionPane;
@ -173,7 +174,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
keyColumnValuesTable.setPreferredScrollableViewportSize(FineUIScale.scale(new Dimension(280, 150)));
keyColumnValuesTable.setShowHorizontalLines(true);
keyColumnValuesTable.getTableHeader().setUI(new FineTableHeaderUI());
northPane.add(column(10,
cell(FineUIUtils.wrapComponentWithTitle(typePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))),
@ -1018,7 +1018,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}
}
protected static class KeyColumnNameValueTable extends JTable {
protected static class KeyColumnNameValueTable extends FineUITable {
public KeyColumnNameValueTable() {
super(new KeyColumnValueTableModel(null));

32
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -1,12 +1,13 @@
package com.fr.env;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.UITitledBorder;
import com.fr.design.env.RemoteDesignerWorkspaceInfo;
import com.fr.design.env.processor.RemoteDesignerWorkspaceInfoProcessor;
import com.fr.design.fun.DesignerEnvProcessor;
@ -25,7 +26,6 @@ import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.scrollruler.ModLineBorder;
import com.fr.env.handler.WorkspaceExceptionHandler;
import com.fr.stable.StringUtils;
import com.fr.third.guava.base.Strings;
@ -33,7 +33,6 @@ import com.fr.workspace.WorkContext;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
@ -42,8 +41,6 @@ import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import javax.swing.ToolTipManager;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.BorderLayout;
@ -564,15 +561,12 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
try {
if (get()) {
message.setText(Toolkit.i18nText("Fine-Design_Basic_Remote_Connect_Successful"));
uiLabel.setIcon(UIManager.getIcon("OptionPane.informationIcon"));
uiLabel.setIcon(new LazyIcon("information", 20));
}
} catch (Exception e) {
dialog.dispose();
WorkspaceExceptionHandler.getInstance().handleInTest(e, remoteEnv);
}
dialogDownPane.remove(cancelButton);
dialogDownPane.revalidate();
dialogDownPane.repaint();
}
};
worker.execute();
@ -604,26 +598,24 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
private void initMessageDialog() {
message.setText(Toolkit.i18nText("Fine-Design_Basic_Remote_Env_Try") + "...");
message.setBorder(BorderFactory.createEmptyBorder(8, 5, 0, 0));
okButton.setEnabled(false);
dialog = new JDialog((Dialog) SwingUtilities.getWindowAncestor(RemoteEnvPane.this), Toolkit.i18nText("Fine-Design_Basic_Dialog_Message_Title"), true);
dialog.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.env.RemoteEnvPane.dialog"));
dialog.setSize(FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.env.RemoteEnvPane.dialog")));
okButton.setEnabled(false);
JPanel jp = new JPanel();
JPanel upPane = new JPanel();
JPanel upPane = new JPanel(new BorderLayout());
dialogDownPane = new JPanel();
uiLabel = new UILabel(UIManager.getIcon("OptionPane.informationIcon"));
upPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
upPane.add(uiLabel);
upPane.add(message);
dialogDownPane.setLayout(new FlowLayout(FlowLayout.CENTER, 6, 0));
uiLabel = new UILabel(new LazyIcon("information", 20));
upPane.add(Layouts.row(10, Layouts.cell(uiLabel), Layouts.cell(message), Layouts.flex()).getComponent(), BorderLayout.NORTH);
dialogDownPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 8, 0));
dialogDownPane.add(okButton);
dialogDownPane.add(cancelButton);
jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS));
jp.add(upPane);
jp.add(dialogDownPane);
jp.setLayout(new BorderLayout());
jp.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
jp.add(upPane, BorderLayout.CENTER);
jp.add(dialogDownPane, BorderLayout.SOUTH);
dialog.add(jp);
dialog.setResizable(false);
dialog.setLocationRelativeTo(SwingUtilities.getWindowAncestor(RemoteEnvPane.this));

18
designer-base/src/main/java/com/fr/env/TestConnectionResult.java vendored

@ -1,5 +1,6 @@
package com.fr.env;
import com.fine.theme.icon.LazyIcon;
import com.fr.decision.webservice.exception.login.UserLoginLockException;
import com.fr.decision.webservice.exception.login.UserPasswordNeedUpdateException;
import com.fr.decision.webservice.exception.user.UserPasswordStrengthLimitException;
@ -11,7 +12,6 @@ import com.fr.workspace.connect.WorkspaceConnectionInfo;
import com.fr.workspace.engine.exception.WorkspaceCheckException;
import javax.swing.Icon;
import javax.swing.UIManager;
/**
* 测试连接的结果
@ -27,7 +27,7 @@ public enum TestConnectionResult {
FULLY_SUCCESS {
@Override
public Icon getIcon() {
return UIManager.getIcon("OptionPane.informationIcon");
return new LazyIcon("information", 20);
}
@Override
@ -42,7 +42,7 @@ public enum TestConnectionResult {
PARTLY_SUCCESS {
@Override
public Icon getIcon() {
return UIManager.getIcon("OptionPane.warningIcon");
return new LazyIcon("warning", 20);
}
@Override
@ -57,7 +57,7 @@ public enum TestConnectionResult {
FULLY_FAILED {
@Override
public Icon getIcon() {
return UIManager.getIcon("OptionPane.errorIcon");
return new LazyIcon("error", 20);
}
@Override
@ -72,7 +72,7 @@ public enum TestConnectionResult {
AUTH_FAILED {
@Override
public Icon getIcon() {
return UIManager.getIcon("OptionPane.errorIcon");
return new LazyIcon("error", 20);
}
@Override
@ -90,7 +90,7 @@ public enum TestConnectionResult {
@Override
public Icon getIcon() {
return UIManager.getIcon("OptionPane.errorIcon");
return new LazyIcon("error", 20);
}
@Override
@ -120,7 +120,7 @@ public enum TestConnectionResult {
PERMISSION_DENIED {
@Override
public Icon getIcon() {
return UIManager.getIcon("OptionPane.errorIcon");
return new LazyIcon("error", 20);
}
@Override
@ -140,7 +140,7 @@ public enum TestConnectionResult {
PASSWORD_STRENGTH_LIMIT () {
@Override
public Icon getIcon() {
return UIManager.getIcon("OptionPane.errorIcon");
return new LazyIcon("error", 20);
}
@Override
@ -165,7 +165,7 @@ public enum TestConnectionResult {
PASSWORD_NEED_UPDATE {
@Override
public Icon getIcon() {
return UIManager.getIcon("OptionPane.errorIcon");
return new LazyIcon("error", 20);
}
@Override

3
designer-base/src/main/resources/com/fine/theme/icon/border/all.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 379 B

4
designer-base/src/main/resources/com/fine/theme/icon/border/bottom.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M30 29C30 29.5523 29.5523 30 29 30L3 30C2.44772 30 2 29.5523 2 29C2 28.4477 2.44772 28 3 28L29 28C29.5523 28 30 28.4477 30 29Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 553 B

4
designer-base/src/main/resources/com/fine/theme/icon/border/bottom_thick.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M30 28.5C30 29.3284 29.3284 30 28.5 30L3.5 30C2.67157 30 2 29.3284 2 28.5C2 27.6716 2.67157 27 3.5 27L28.5 27C29.3284 27 30 27.6716 30 28.5Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 567 B

5
designer-base/src/main/resources/com/fine/theme/icon/border/double_bottom.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M30 29C30 29.5523 29.5523 30 29 30L3 30C2.44772 30 2 29.5523 2 29C2 28.4477 2.44772 28 3 28L29 28C29.5523 28 30 28.4477 30 29Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M30 25C30 25.5523 29.5523 26 29 26L3 26C2.44772 26 2 25.5523 2 25C2 24.4477 2.44772 24 3 24L29 24C29.5523 24 30 24.4477 30 25Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 726 B

4
designer-base/src/main/resources/com/fine/theme/icon/border/horizontal.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 4H28V28H17L17 4ZM16 2H28C29.1046 2 30 2.89543 30 4V28C30 29.1046 29.1046 30 28 30H16H4C2.89543 30 2 29.1046 2 28V4C2 2.89543 2.89543 2 4 2H16ZM15 28H4V4H15L15 28Z" fill="#0A1C38" fill-opacity="0.29"/>
<rect x="2" y="15" width="28" height="2" rx="1" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 441 B

4
designer-base/src/main/resources/com/fine/theme/icon/border/in.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M28 4H4V28H28V4ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M17 15V3C17 2.44772 16.5523 2 16 2C15.4477 2 15 2.44772 15 3V15H3C2.44772 15 2 15.4477 2 16C2 16.5523 2.44772 17 3 17H15V29C15 29.5523 15.4477 30 16 30C16.5523 30 17 29.5523 17 29V17H29C29.5523 17 30 16.5523 30 16C30 15.4477 29.5523 15 29 15H17Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 618 B

4
designer-base/src/main/resources/com/fine/theme/icon/border/left.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M3 2C3.55229 2 4 2.44772 4 3L4 29C4 29.5523 3.55228 30 3 30C2.44771 30 2 29.5523 2 29L2 3C2 2.44771 2.44772 2 3 2Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 541 B

3
designer-base/src/main/resources/com/fine/theme/icon/border/none.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
</svg>

After

Width:  |  Height:  |  Size: 380 B

4
designer-base/src/main/resources/com/fine/theme/icon/border/out.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M30 3.00197C30 3.00132 30 3.00066 30 3C30 2.96548 29.9983 2.93137 29.9948 2.89776C29.9436 2.3935 29.5178 2 29 2H3C2.93958 2 2.88041 2.00536 2.82295 2.01563C2.74909 2.02882 2.67804 2.05013 2.61076 2.07858C2.53077 2.11242 2.4561 2.15636 2.38835 2.20881C2.20277 2.35249 2.06911 2.56002 2.02032 2.79846C2.007 2.86356 2 2.93096 2 3V29C2 29.0604 2.00536 29.1196 2.01563 29.1771C2.08748 29.5792 2.39975 29.8981 2.79847 29.9797C2.86356 29.993 2.93096 30 3 30H3.00197L29 30C29.5523 30 30 29.5523 30 29C30 28.9993 30 28.9987 30 28.998V3.00197ZM28 4L4 4L4 28L28 28L28 4Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

4
designer-base/src/main/resources/com/fine/theme/icon/border/out_thick.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 5L27 5L27 27L5 27L5 5ZM27.9996 30L4.00194 30L4 30L3 30C2.50813 30 2.09921 29.6449 2.01563 29.1771C2.00921 29.1411 2.00471 29.1046 2.00224 29.0674C2.00075 29.0451 2 29.0227 2 29V28V4V3C2 2.44771 2.44771 2 3 2H3H4H4.00042L27.9979 2C27.9986 2 27.9993 2 28 2L29 2C29.5178 2 29.9436 2.3935 29.9948 2.89776C29.998 2.92927 29.9998 2.96122 30 2.99354C30 2.99569 30 2.99785 30 3V4V28V29C30 29.4832 29.6572 29.8864 29.2015 29.9797C29.1364 29.993 29.069 30 29 30H28C27.9999 30 27.9997 30 27.9996 30Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 958 B

4
designer-base/src/main/resources/com/fine/theme/icon/border/right.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M29 2C29.5523 2 30 2.44772 30 3L30 29C30 29.5523 29.5523 30 29 30C28.4477 30 28 29.5523 28 29L28 3C28 2.44771 28.4477 2 29 2Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 552 B

4
designer-base/src/main/resources/com/fine/theme/icon/border/top.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M2 3C2 2.44771 2.44772 2 3 2L29 2C29.5523 2 30 2.44771 30 3C30 3.55228 29.5523 4 29 4L3 4C2.44771 4 2 3.55228 2 3Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 541 B

5
designer-base/src/main/resources/com/fine/theme/icon/border/top_bottom.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M30 29C30 29.5523 29.5523 30 29 30L3 30C2.44772 30 2 29.5523 2 29C2 28.4477 2.44772 28 3 28L29 28C29.5523 28 30 28.4477 30 29Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M30 3C30 3.55229 29.5523 4 29 4L3 4C2.44772 4 2 3.55229 2 3C2 2.44772 2.44772 2 3 2L29 2C29.5523 2 30 2.44772 30 3Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 715 B

6
designer-base/src/main/resources/com/fine/theme/icon/border/top_double_bottom.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M30 29C30 29.5523 29.5523 30 29 30L3 30C2.44772 30 2 29.5523 2 29C2 28.4477 2.44772 28 3 28L29 28C29.5523 28 30 28.4477 30 29Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M30 25C30 25.5523 29.5523 26 29 26L3 26C2.44772 26 2 25.5523 2 25C2 24.4477 2.44772 24 3 24L29 24C29.5523 24 30 24.4477 30 25Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M30 3C30 3.55229 29.5523 4 29 4L3 4C2.44772 4 2 3.55228 2 3C2 2.44771 2.44772 2 3 2L29 2C29.5523 2 30 2.44772 30 3Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 888 B

5
designer-base/src/main/resources/com/fine/theme/icon/border/top_thick_bottom.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 4H4V15H15V4ZM17 4V15H28V4H17ZM15 17H4V28H15V17ZM17 28V17H28V28H17ZM4 2C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H28C29.1046 30 30 29.1046 30 28V4C30 2.89543 29.1046 2 28 2H4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M30 28.5C30 29.3284 29.3284 30 28.5 30L3.5 30C2.67158 30 2 29.3284 2 28.5C2 27.6716 2.67157 27 3.5 27L28.5 27C29.3284 27 30 27.6716 30 28.5Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M30 3C30 3.55229 29.5523 4 29 4L3 4C2.44772 4 2 3.55229 2 3C2 2.44772 2.44772 2 3 2L29 2C29.5523 2 30 2.44772 30 3Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 729 B

4
designer-base/src/main/resources/com/fine/theme/icon/border/vertical.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 4H28V15H4V4ZM4 17V28H28V17H4ZM2 4C2 2.89543 2.89543 2 4 2H28C29.1046 2 30 2.89543 30 4V28C30 29.1046 29.1046 30 28 30H4C2.89543 30 2 29.1046 2 28V4Z" fill="#0A1C38" fill-opacity="0.29"/>
<rect x="17" y="2" width="28" height="2" rx="0.999999" transform="rotate(90 17 2)" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 461 B

11
designer-base/src/main/resources/com/fine/theme/icon/close/platform_close.svg

@ -0,0 +1,11 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_5827_104846)">
<circle cx="16" cy="16" r="16" fill="#2576EF"/>
<path d="M7.51451 7.51479C7.08493 7.94436 7.08493 8.64085 7.51451 9.07042L14.4442 16.0001L7.51457 22.9296C7.085 23.3592 7.085 24.0557 7.51457 24.4853C7.94415 24.9149 8.64063 24.9149 9.07021 24.4853L15.9998 17.5557L22.9294 24.4854C23.359 24.9149 24.0555 24.9149 24.4851 24.4854C24.9146 24.0558 24.9146 23.3593 24.4851 22.9297L17.5554 16.0001L24.4851 9.07035C24.9147 8.64077 24.9147 7.94429 24.4851 7.51471C24.0556 7.08514 23.3591 7.08514 22.9295 7.51471L15.9998 14.4444L9.07014 7.51479C8.64057 7.08521 7.94409 7.08521 7.51451 7.51479Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_5827_104846">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 851 B

4
designer-base/src/main/resources/com/fine/theme/icon/tip/error.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M30 16C30 23.7313 23.7313 30 16 30C8.26871 30 2 23.7313 2 16C2 8.26871 8.26871 2 16 2C23.7313 2 30 8.26871 30 16Z" fill="#F1393C"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.0811 11.6159C22.3154 11.3816 22.3154 11.0017 22.0811 10.7674L21.2326 9.91887C20.9983 9.68455 20.6184 9.68455 20.3841 9.91887L16 14.3029L11.6159 9.91887C11.3816 9.68455 11.0017 9.68455 10.7674 9.91887L9.91888 10.7674C9.68457 11.0017 9.68457 11.3816 9.91888 11.6159L14.3029 16L9.91888 20.384C9.68457 20.6184 9.68457 20.9983 9.91888 21.2326L10.7674 22.0811C11.0017 22.3154 11.3816 22.3154 11.6159 22.0811L16 17.697L20.3841 22.0811C20.6184 22.3154 20.9983 22.3154 21.2326 22.0811L22.0811 21.2326C22.3154 20.9983 22.3154 20.6184 22.0811 20.384L17.6971 16L22.0811 11.6159Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 920 B

3
designer-base/src/main/resources/com/fine/theme/icon/tip/information.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M30 16C30 8.26871 23.7313 2 16 2C8.26871 2 2 8.26871 2 16C2 23.7313 8.26871 30 16 30C23.7313 30 30 23.7313 30 16ZM14.8667 11.416C14.5556 11.1048 14.4 10.7271 14.4 10.2826C14.4 9.83817 14.5556 9.4604 14.8667 9.14929C15.1778 8.83817 15.5556 8.68262 16 8.68262C16.4444 8.68262 16.8222 8.83817 17.1333 9.14929C17.4444 9.4604 17.6 9.83817 17.6 10.2826C17.6 10.7271 17.4444 11.1048 17.1333 11.416C16.8222 11.7271 16.4444 11.8826 16 11.8826C15.5556 11.8826 15.1778 11.7271 14.8667 11.416ZM15.3 23.5574C14.9134 23.5574 14.6 23.244 14.6 22.8574V14.2574C14.6 13.8708 14.9134 13.5574 15.3 13.5574H16.7C17.0866 13.5574 17.4 13.8708 17.4 14.2574V22.8574C17.4 23.244 17.0866 23.5574 16.7 23.5574H15.3Z" fill="#2576EF"/>
</svg>

After

Width:  |  Height:  |  Size: 858 B

4
designer-base/src/main/resources/com/fine/theme/icon/tip/new_information.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M30 16C30 23.7313 23.7313 30 16 30C8.26871 30 2 23.7313 2 16C2 8.26871 8.26871 2 16 2C23.7313 2 30 8.26871 30 16Z" fill="#46B15D"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.92852 11.1711C7.36643 12.7332 7.36643 15.2658 8.92852 16.8279L10.3427 18.2422L15.9996 23.899L21.6564 18.2422L23.0707 16.8279C24.6328 15.2658 24.6328 12.7332 23.0707 11.1711C21.5086 9.60899 18.9759 9.60899 17.4138 11.1711L15.9996 12.5853L14.5854 11.1711C13.0233 9.60899 10.4906 9.60899 8.92852 11.1711Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 654 B

3
designer-base/src/main/resources/com/fine/theme/icon/tip/success.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 30C23.7313 30 30 23.7313 30 16C30 8.26871 23.7313 2 16 2C8.26871 2 2 8.26871 2 16C2 23.7313 8.26871 30 16 30ZM8.38122 15.3227C8.86572 14.8705 9.62507 14.8967 10.0773 15.3812L13.8667 19.4413L22.3227 10.3812C22.7749 9.89672 23.5343 9.87054 24.0188 10.3227C24.5033 10.7749 24.5295 11.5343 24.0773 12.0188L14.7439 22.0188C14.2695 22.5271 13.4638 22.5271 12.9894 22.0188L8.32274 17.0188C7.87054 16.5343 7.89672 15.7749 8.38122 15.3227Z" fill="#46B15D"/>
</svg>

After

Width:  |  Height:  |  Size: 605 B

5
designer-base/src/main/resources/com/fine/theme/icon/tip/warning.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M30 16C30 23.7313 23.7313 30 16 30C8.26871 30 2 23.7313 2 16C2 8.26871 8.26871 2 16 2C23.7313 2 30 8.26871 30 16Z" fill="#F9AE31"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8666 20.584C14.5555 20.8952 14.3999 21.2729 14.3999 21.7174C14.3999 22.1618 14.5555 22.5396 14.8666 22.8507C15.1777 23.1618 15.5555 23.3174 15.9999 23.3174C16.4443 23.3174 16.8221 23.1618 17.1332 22.8507C17.4443 22.5396 17.5999 22.1618 17.5999 21.7174C17.5999 21.2729 17.4443 20.8952 17.1332 20.584C16.8221 20.2729 16.4443 20.1174 15.9999 20.1174C15.5555 20.1174 15.1777 20.2729 14.8666 20.584Z" fill="white"/>
<rect x="14.6001" y="8.44263" width="2.8" height="10" rx="0.7" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 826 B

5
designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_column.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 28H4L4 11L8 11L8 28ZM10 28C10 29.1046 9.10457 30 8 30H4C2.89543 30 2 29.1046 2 28V11C2 9.89543 2.89543 9 4 9L8 9C9.10457 9 10 9.89543 10 11L10 28ZM28 28H24L24 12L28 12L28 28ZM30 28C30 29.1046 29.1046 30 28 30H24C22.8954 30 22 29.1046 22 28L22 12C22 10.8954 22.8954 10 24 10L28 10C29.1046 10 30 10.8954 30 12L30 28Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M19 14C19 14.5523 18.5523 15 18 15L14 15C13.4477 15 13 14.5523 13 14L13 4C13 3.44772 13.4477 3 14 3L18 3C18.5523 3 19 3.44771 19 4L19 14Z" stroke="#2576EF" stroke-width="2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 15C17 14.4477 16.5523 14 16 14C15.4477 14 15 14.4477 15 15L15 21L11.6603 21C11.0732 21 10.7792 21.6273 11.1943 21.9941L15.1084 25.4532C15.2736 25.7777 15.6109 26 16 26C16.3891 26 16.7264 25.7777 16.8916 25.4532L20.8057 21.9941C21.2208 21.6273 20.9268 21 20.3397 21L17 21L17 15Z" fill="#2576EF"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

5
designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_row.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 8L4 4L21 4V8L4 8ZM4 10C2.89543 10 2 9.10457 2 8V4C2 2.89543 2.89543 2 4 2L21 2C22.1046 2 23 2.89543 23 4V8C23 9.10457 22.1046 10 21 10L4 10ZM4 28L4 24L21 24V28L4 28ZM4 30C2.89543 30 2 29.1046 2 28V24C2 22.8954 2.89543 22 4 22L21 22C22.1046 22 23 22.8954 23 24V28C23 29.1046 22.1046 30 21 30L4 30Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M18 19C17.4477 19 17 18.5523 17 18L17 14C17 13.4477 17.4477 13 18 13L28 13C28.5523 13 29 13.4477 29 14L29 18C29 18.5523 28.5523 19 28 19L18 19Z" stroke="#2576EF" stroke-width="2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.54677 15.1084C6.22227 15.2736 6 15.6109 6 16C6 16.3891 6.22227 16.7264 6.54678 16.8916L10.0059 20.8057C10.3727 21.2208 11 20.9268 11 20.3397L11 17L17 17C17.5523 17 18 16.5523 18 16C18 15.4477 17.5523 15 17 15L11 15L11 11.6603C11 11.0732 10.3727 10.7792 10.0059 11.1943L6.54677 15.1084Z" fill="#2576EF"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

6
designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_column.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 28H4L4 4L8 4L8 28ZM10 28C10 29.1046 9.10457 30 8 30H4C2.89543 30 2 29.1046 2 28L2 4C2 2.89543 2.89543 2 4 2H8C9.10457 2 10 2.89543 10 4L10 28ZM28 28H24V4L28 4L28 28ZM30 28C30 29.1046 29.1046 30 28 30H24C22.8954 30 22 29.1046 22 28L22 4C22 2.89543 22.8954 2 24 2H28C29.1046 2 30 2.89543 30 4L30 28Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M19 14C19 14.5523 18.5523 15 18 15L14 15C13.4477 15 13 14.5523 13 14L13 4C13 3.44772 13.4477 3 14 3L18 3C18.5523 3 19 3.44771 19 4L19 14Z" stroke="#E73437" stroke-width="2"/>
<path d="M11.707 18.7071C12.0975 18.3166 12.7306 18.3166 13.1212 18.7071L20.1922 25.7782C20.5828 26.1687 20.5828 26.8019 20.1922 27.1924C19.8017 27.5829 19.1685 27.5829 18.778 27.1924L11.707 20.1213C11.3164 19.7308 11.3164 19.0976 11.707 18.7071Z" fill="#E73437"/>
<path d="M20.1925 18.7071C19.8019 18.3166 19.1688 18.3166 18.7782 18.7071L11.7072 25.7782C11.3167 26.1687 11.3167 26.8019 11.7072 27.1924C12.0977 27.5829 12.7309 27.5829 13.1214 27.1924L20.1925 20.1213C20.583 19.7308 20.583 19.0976 20.1925 18.7071Z" fill="#E73437"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

6
designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_row.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M28 4V8L4 8L4 4L28 4ZM28 2C29.1046 2 30 2.89543 30 4V8C30 9.10457 29.1046 10 28 10L4 10C2.89543 10 2 9.10457 2 8V4C2 2.89543 2.89543 2 4 2L28 2ZM28 24V28L4 28L4 24L28 24ZM28 22C29.1046 22 30 22.8954 30 24V28C30 29.1046 29.1046 30 28 30L4 30C2.89543 30 2 29.1046 2 28V24C2 22.8954 2.89543 22 4 22L28 22Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M14 13C14.5523 13 15 13.4477 15 14L15 18C15 18.5523 14.5523 19 14 19L4 19C3.44772 19 3 18.5523 3 18L3 14C3 13.4477 3.44771 13 4 13L14 13Z" stroke="#E73437" stroke-width="2"/>
<path d="M18.7071 20.293C18.3166 19.9025 18.3166 19.2694 18.7071 18.8788L25.7782 11.8078C26.1687 11.4172 26.8019 11.4172 27.1924 11.8078C27.5829 12.1983 27.5829 12.8315 27.1924 13.222L20.1213 20.293C19.7308 20.6836 19.0976 20.6836 18.7071 20.293Z" fill="#E73437"/>
<path d="M18.7071 11.8075C18.3166 12.1981 18.3166 12.8312 18.7071 13.2218L25.7782 20.2928C26.1687 20.6833 26.8019 20.6833 27.1924 20.2928C27.5829 19.9023 27.5829 19.2691 27.1924 18.8786L20.1213 11.8075C19.7308 11.417 19.0976 11.417 18.7071 11.8075Z" fill="#E73437"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

31
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -165,8 +165,10 @@
"clear": "clear.svg",
"clear_hover": "clear_hover.svg",
"stash": "toolbar/stash.svg",
"appendRow": "toolbar/appendRow.svg",
"deleteRow": "toolbar/deleteRow.svg",
"appendRow": "toolbar/append_row.svg",
"deleteRow": "toolbar/delete_row.svg",
"appendColumn": "toolbar/append_column.svg",
"deleteColumn": "toolbar/delete_column.svg",
"showValue": "toolbar/showValue.svg",
"tool_copy": "toolbar/copy.svg",
"move_down": "toolbar/move_down.svg",
@ -288,6 +290,7 @@
"nosort": "sort/nosort.svg",
"close": "close/close.svg",
"close_round": "close/close_round.svg",
"platform_close": "close/platform_close.svg",
"add_parenthesis": "font/add_parenthesis.svg",
"remove_parenthesis": "font/remove_parenthesis.svg",
"shadow": "font/shadow.svg",
@ -382,6 +385,28 @@
"chart_heatMap": "chart/chart_heatMap.svg",
"chart_rectangleTree": "chart/chart_rectangleTree.svg",
"chart_wordCloud": "chart/chart_wordCloud.svg",
"chart_frame": "chart/chart_frame.svg"
"chart_frame": "chart/chart_frame.svg",
"out": "border/out.svg",
"in": "border/in.svg",
"bottom": "border/bottom.svg",
"vertical": "border/vertical.svg",
"bottom_thick": "border/bottom_thick.svg",
"out_thick": "border/out_thick.svg",
"double_bottom": "border/double_bottom.svg",
"left": "border/left.svg",
"horizontal": "border/horizontal.svg",
"none": "border/none.svg",
"right": "border/right.svg",
"top_bottom": "border/top_bottom.svg",
"top_thick_bottom": "border/top_thick_bottom.svg",
"top_double_bottom": "border/top_double_bottom.svg",
"top": "border/top.svg",
"all":"border/all.svg",
"error":"tip/error.svg",
"information":"tip/information.svg",
"new_information":"tip/new_information.svg",
"success":"tip/success.svg",
"warning":"tip/warning.svg"
}
}

3
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties

@ -34,7 +34,8 @@ SpinnerUI=com.formdev.flatlaf.ui.FlatSpinnerUI
SplitPaneUI=com.formdev.flatlaf.ui.FlatSplitPaneUI
TabbedPaneUI=com.formdev.flatlaf.ui.FlatTabbedPaneUI
TableUI=com.formdev.flatlaf.ui.FlatTableUI
TableHeaderUI=com.formdev.flatlaf.ui.FlatTableHeaderUI
TableVerticalBarUI=com.fine.theme.light.ui.FineTableScrollBarPaneUI
TableHeaderUI=com.fine.theme.light.ui.FineTableHeaderUI
TextAreaUI=com.formdev.flatlaf.ui.FlatTextAreaUI
TextFieldUI=com.formdev.flatlaf.ui.FlatTextFieldUI
TextPaneUI=com.formdev.flatlaf.ui.FlatTextPaneUI

6
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -1379,4 +1379,8 @@ chart.selectedBorderColor = #2576EF
[style]Button.originalButton = \
border: 4,4,4,4; \
background: null;
background: null;
[style]Label.detailLabel = \
foreground: fade(@foreground, 90%); \
background: $fill.normal;

2
designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties

@ -3,7 +3,7 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=630*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=570*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=630*280
com.fr.design.report.ReportColumnsPane=800*600
com.fr.env.RemoteEnvPane.dialog=458*132
com.fr.env.RemoteEnvPane.dialog=360*132
com.fr.design.version.check.dialog=490*95
com.fr.design.version.detail.label=750*30
com.fr.design.version.detail.dialog=900*500

2
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties

@ -1,6 +1,6 @@
# \u9ED8\u8BA4\u4E3A\u7C7B\u7684\u5168\u9650\u5B9A\u540D\uFF08\u53EF\u81EA\u5B9A\u4E49key\uFF09= width * height
com.fr.design.mainframe.check.CheckButton=250*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=360*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=325*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280
com.fr.env.RemoteEnvPane.dialog=308*132

22
designer-base/src/test/java/com/fr/design/gui/storybook/components/TableStoryBoard.java

@ -1,18 +1,13 @@
package com.fr.design.gui.storybook.components;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.light.ui.FineTableHeaderUI;
import com.fine.theme.light.ui.FineTableScrollBarPaneUI;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.icontainer.UITableScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.FineUITable;
import com.fr.design.gui.storybook.StoryBoard;
import javax.swing.BorderFactory;
import javax.swing.JCheckBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.UIManager;
import javax.swing.*;
import javax.swing.plaf.UIResource;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
@ -52,8 +47,7 @@ public class TableStoryBoard extends StoryBoard {
{"4", "Dave", "Male", "Finance"},
{"4", "Dave", "Male", "Finance"}
}, new String[] {"ID", "Name", "Gender", "Department"});
JTable table1 = new JTable(model1);
table1.getTableHeader().setUI(new FineTableHeaderUI());
FineUITable table1 = new FineUITable(model1);
DefaultTableModel model2 = new DefaultTableModel(new Object[][] {
{"1", "Alice", "Female", "Engineering"},
@ -61,8 +55,7 @@ public class TableStoryBoard extends StoryBoard {
{"3", "Carol", "Female", "Design"},
{"4", "Dave", "Male", "Finance"}
}, new String[] {"ID", "Name", "Gender", "Department"});
JTable table2 = new JTable(model2);
table2.getTableHeader().setUI(new FineTableHeaderUI());
FineUITable table2 = new FineUITable(model2);
DefaultTableModel model3 = new DefaultTableModel(new Object[][] {
{false, "1", "Alice", "Female", "Engineering"},
@ -77,11 +70,10 @@ public class TableStoryBoard extends StoryBoard {
return types[columnIndex];
}
};
JTable table3 = new JTable(model3);
table3.getTableHeader().setUI(new FineTableHeaderUI());
FineUITable table3 = new FineUITable(model3);
table3.getTableHeader().getColumnModel().getColumn(0).setCellRenderer(new BooleanRenderer());
add(column(20, cell(new UIScrollPane(table1)).with(this::setFixSize).with(it -> it.getVerticalScrollBar().setUI(new FineTableScrollBarPaneUI(table1))),
add(column(20, cell(new UITableScrollPane(table1)).with(this::setFixSize),
cell(new UIScrollPane(table2)).with(this::setFixSize),
cell(new UIScrollPane(table3)).with(this::setFixSize)).getComponent());
}

2
designer-realize/src/main/java/com/fr/design/actions/cell/UIToolbarBorderButton.java

@ -1,6 +1,7 @@
package com.fr.design.actions.cell;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.CellBorderStyle;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
@ -28,6 +29,7 @@ import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

3
designer-realize/src/main/java/com/fr/design/actions/columnrow/DeleteColumnAction.java

@ -3,6 +3,7 @@
*/
package com.fr.design.actions.columnrow;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.actions.CellSelectionAction;
import com.fr.design.mainframe.ElementCasePane;
@ -26,7 +27,7 @@ public class DeleteColumnAction extends CellSelectionAction {
super(t);
this.setName(name);
this.setMnemonic(DELETE_COLUMN.getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/deleteColumn.png"));
this.setSmallIcon(new LazyIcon("deleteColumn"));
}
@Override

3
designer-realize/src/main/java/com/fr/design/actions/columnrow/DeleteRowAction.java

@ -3,6 +3,7 @@
*/
package com.fr.design.actions.columnrow;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.actions.CellSelectionAction;
import com.fr.design.mainframe.ElementCasePane;
@ -27,7 +28,7 @@ public class DeleteRowAction extends CellSelectionAction {
this.setName(name);
this.setMnemonic(DELETE_ROW.getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/deleteRow.png"));
this.setSmallIcon(new LazyIcon("deleteRow"));
}
@Override

2
designer-realize/src/main/java/com/fr/design/actions/columnrow/InsertColumnAction.java

@ -27,7 +27,7 @@ public class InsertColumnAction extends CellSelectionAction {
this.setName(name);
this.setMnemonic(INSERT_COLUMN.getMnemonic());
this.setSmallIcon(new LazyIcon("vertical_expand"));
this.setSmallIcon(new LazyIcon("appendColumn"));
}
public static final MenuKeySet INSERT_COLUMN = new MenuKeySet() {

2
designer-realize/src/main/java/com/fr/design/actions/columnrow/InsertRowAction.java

@ -26,7 +26,7 @@ public class InsertRowAction extends CellSelectionAction {
super(t);
this.setName(name);
this.setMnemonic(INSERT_ROW.getMnemonic());
this.setSmallIcon(new LazyIcon("horizontal_expand"));
this.setSmallIcon(new LazyIcon("appendRow"));
}
public static final MenuKeySet INSERT_ROW = new MenuKeySet() {

17
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java

@ -2,16 +2,15 @@ package com.fr.design.actions.replace.ui;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineTableHeaderUI;
import com.fine.theme.light.ui.FineTableScrollBarPaneUI;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.TRL;
import com.fr.design.actions.replace.info.base.ITContent;
import com.fr.design.dialog.BasicPane;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.icontainer.UITableScrollPane;
import com.fr.design.gui.itable.FineUITable;
import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itableeditorpane.UITableModelAdapter;
import com.fr.design.layout.FRGUIPaneFactory;
@ -26,6 +25,7 @@ import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import javax.swing.JTable;
import javax.swing.SortOrder;
import javax.swing.SwingConstants;
@ -50,7 +50,7 @@ import static com.fine.swing.ui.layout.Layouts.cell;
* Created On
*/
public class ITTableEditorPane<T> extends BasicPane {
public static JTable editTable;
public static FineUITable editTable;
private UITableModelAdapter<T> tableModel;
private String leftLabelName;
private JPanel buttonPane;
@ -94,8 +94,7 @@ public class ITTableEditorPane<T> extends BasicPane {
}
});
UIScrollPane scrollPane = new UIScrollPane(editTable);
scrollPane.getVerticalScrollBar().setUI(new FineTableScrollBarPaneUI(editTable));
UITableScrollPane scrollPane = new UITableScrollPane(editTable);
add(cell(scrollPane).weight(1).getComponent());
}
@ -245,7 +244,6 @@ public class ITTableEditorPane<T> extends BasicPane {
* @param table
*/
public static void makeFace(JTable table) {
table.getTableHeader().setUI(new FineTableHeaderUI());
table.getTableHeader().setDefaultRenderer(new ITHeaderRenderer(table));
}
@ -353,13 +351,12 @@ public class ITTableEditorPane<T> extends BasicPane {
*
* @return
*/
public static JTable getEditTable() {
public static FineUITable getEditTable() {
return editTable;
}
public void setEditTable(JTable editTable) {
public void setEditTable(FineUITable editTable) {
this.editTable = editTable;
}
}

15
designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java

@ -3,17 +3,14 @@ package com.fr.design.cell.smartaction;
import java.awt.BorderLayout;
import java.awt.Window;
import com.fine.theme.light.ui.FineTableHeaderUI;
import com.fine.theme.light.ui.FineTableScrollBarPaneUI;
import com.fr.design.gui.icontainer.UITableScrollPane;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableCellRenderer;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicDialog;
@ -27,6 +24,7 @@ import com.fr.design.selection.SelectionListener;
* SmartJTablePane用于在Grid上面选单元格时编辑JTable
*/
public abstract class SmartJTablePane extends BasicPane {
private static final String UI_CLASS_ID = "TableHeaderUI";
public static final int OK = 0;
public static final int CANCEL = 1;
@ -61,8 +59,7 @@ public abstract class SmartJTablePane extends BasicPane {
// BasicPane的center放JTable
table = new JTable(model);
this.add(scrollPane = new JScrollPane(table), BorderLayout.CENTER);
scrollPane.getVerticalScrollBar().setUI(new FineTableScrollBarPaneUI(table));
this.add(scrollPane = new UITableScrollPane(table), BorderLayout.CENTER);
// 鼠标切换选中项时,editingRowIndex也要跟着变
table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@ -76,7 +73,6 @@ public abstract class SmartJTablePane extends BasicPane {
}
}
});
table.getTableHeader().setUI(new FineTableHeaderUI());
setCellRenderer();
actionReportPane.addSelectionChangeListener(gridSelectionChangeL);
@ -120,5 +116,10 @@ public abstract class SmartJTablePane extends BasicPane {
return dlg;
}
@Override
public String getUIClassID() {
return UI_CLASS_ID;
}
}

4
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java

@ -5,6 +5,7 @@ import com.fr.design.border.FineBorderFactory;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.FineUITable;
import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itableeditorpane.UITableEditorPane;
import com.fr.design.i18n.Toolkit;
@ -14,7 +15,6 @@ import com.fr.design.mainframe.cell.settingpane.desensitization.model.CellDesens
import com.fr.report.cell.desensitization.CellDesensitizationBean;
import javax.swing.JPanel;
import javax.swing.JTable;
import java.awt.BorderLayout;
import java.util.List;
import java.util.Objects;
@ -80,7 +80,7 @@ public class CellDesensitizationGroupsPane extends JPanel {
protected void initComponent(UITableEditAction[] action) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JTable editTable = getTableModel().createTable();
FineUITable editTable = getTableModel().createTable();
setEditTable(editTable);
initbuttonPane(action);
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();

Loading…
Cancel
Save