From ae244f874e15ceef4020e4feb6266e88522ac335 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 13 Aug 2024 19:19:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-127437=20fix:=20table=20UI=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/light/ui/FineTableHeaderUI.java | 6 ++-- .../datapane/preview/PreviewTablePane.java | 12 +++++-- .../gui/iscrollbar/UIVerticalScrollBar.java | 30 ++++++++++++++++++ .../fr/design/gui/itable/SortableJTable.java | 11 +++++-- .../itableeditorpane/UITableEditorPane.java | 31 +++++++++++++++---- .../com/fr/design/report/SelectImagePane.java | 3 +- .../write/submit/DBManipulationPane.java | 7 ++++- .../theme/light/ui/laf/FineLaf.properties | 2 +- .../storybook/components/TableStoryBoard.java | 15 ++++----- .../actions/replace/ui/ITTableEditorPane.java | 19 +++++++++--- .../cell/smartaction/SmartJTablePane.java | 22 ++++++++----- 11 files changed, 122 insertions(+), 36 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java diff --git a/designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java b/designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java index 2dc2b53392..fb35b6bd42 100644 --- a/designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java +++ b/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); } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java index 70f821dcdf..ca5757ec14 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java +++ b/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; @@ -31,6 +30,8 @@ import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.iprogressbar.AutoProgressBar; +import com.fr.design.gui.iscrollbar.UIScrollBar; +import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; import com.fr.design.gui.itable.SortableJTable; import com.fr.design.gui.itable.TableSorter; import com.fr.design.gui.itextfield.UINumberField; @@ -51,6 +52,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; @@ -305,8 +307,12 @@ 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)); + JScrollPane scrollPane = new JScrollPane(preveiwTable) { + @Override + public UIScrollBar createVerticalScrollBar() { + return new UIVerticalScrollBar(preveiwTable, JScrollBar.VERTICAL); + } + }; return scrollPane; } diff --git a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java new file mode 100644 index 0000000000..5962f42b26 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java @@ -0,0 +1,30 @@ +package com.fr.design.gui.iscrollbar; + +import com.fine.theme.light.ui.FineTableScrollBarPaneUI; + +import javax.swing.JTable; + +/** + * jtable 垂直滚动条 + * + * @author lemon + * @since + * Created on + */ +public class UIVerticalScrollBar extends UIScrollBar { + private static final String UI_CLASS_ID = "TableScrollBarUI"; + private static final long serialVersionUID = 1L; + + public UIVerticalScrollBar() { + } + + public UIVerticalScrollBar(JTable table, int orientation) { + super(orientation); + this.setUI(new FineTableScrollBarPaneUI(table)); + } + + @Override + public String getUIClassID() { + return UI_CLASS_ID; + } +} diff --git a/designer-base/src/main/java/com/fr/design/gui/itable/SortableJTable.java b/designer-base/src/main/java/com/fr/design/gui/itable/SortableJTable.java index 99a919d0ee..345de187c7 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itable/SortableJTable.java +++ b/designer-base/src/main/java/com/fr/design/gui/itable/SortableJTable.java @@ -1,14 +1,19 @@ package com.fr.design.gui.itable; -import com.fine.theme.light.ui.FineTableHeaderUI; - import javax.swing.JTable; public class SortableJTable extends JTable{ + private static final String UI_CLASS_ID = "FineTableHeaderUI"; + + public SortableJTable(TableSorter tableModel){ super(tableModel); tableModel.setTableHeader(getTableHeader()); setShowGrid(true); - getTableHeader().setUI(new FineTableHeaderUI()); + } + + @Override + public String getUIClassID() { + return UI_CLASS_ID; } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java index 18979b677b..34ed21efdc 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java @@ -1,20 +1,22 @@ package com.fr.design.gui.itableeditorpane; import com.fine.swing.ui.layout.Layouts; -import com.fine.swing.ui.layout.Row; 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.dialog.BasicPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.iscrollbar.UIScrollBar; +import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; import com.fr.design.layout.FRGUIPaneFactory; +import javax.swing.JComponent; import javax.swing.JPanel; +import javax.swing.JScrollBar; import javax.swing.JScrollPane; import javax.swing.JTable; +import javax.swing.UIDefaults; import javax.swing.event.TableModelListener; import java.awt.BorderLayout; import java.awt.Dimension; @@ -29,6 +31,7 @@ import java.util.List; * @since 2012-3-28下午3:06:30 */ public class UITableEditorPane extends BasicPane { + private static final String UI_CLASS_ID = "FineTableHeaderUI"; /** * */ @@ -70,16 +73,19 @@ public class UITableEditorPane extends BasicPane { UILabel l = new UILabel(leftLabelName); editTable = tableModel.createTable(); - UIScrollPane scrollPane = new UIScrollPane(editTable); + UIScrollPane scrollPane = new UIScrollPane(editTable){ + @Override + public UIScrollBar createVerticalScrollBar() { + return new UIVerticalScrollBar(editTable, JScrollBar.VERTICAL); + } + }; 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(10, Layouts.cell(controlPane), Layouts.cell(scrollPane).weight(1)).getComponent()); - this.editTable.getTableHeader().setUI(new FineTableHeaderUI()); this.editTable.setRowHeight(FineUIScale.scale(24)); } @@ -193,4 +199,17 @@ public class UITableEditorPane extends BasicPane { editTable.getTableHeader().setResizingAllowed(resizingAllowed); } + + /** + * Returns the name of the L&F class that renders this component. + * + * @return the string "ToolTipUI" + * @see JComponent#getUIClassID + * @see UIDefaults#getUI + */ + @Override + public String getUIClassID() { + return UI_CLASS_ID; + } + } diff --git a/designer-base/src/main/java/com/fr/design/report/SelectImagePane.java b/designer-base/src/main/java/com/fr/design/report/SelectImagePane.java index 2d6ac90efd..5450e30fd5 100644 --- a/designer-base/src/main/java/com/fr/design/report/SelectImagePane.java +++ b/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 -> { diff --git a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java index c4ceaef668..24cd02f207 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java @@ -173,7 +173,6 @@ public class DBManipulationPane extends BasicBeanPane { 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"))), @@ -1019,6 +1018,12 @@ public class DBManipulationPane extends BasicBeanPane { } protected static class KeyColumnNameValueTable extends JTable { + private static final String UI_CLASS_ID = "FineTableHeaderUI"; + + @Override + public String getUIClassID() { + return UI_CLASS_ID; + } public KeyColumnNameValueTable() { super(new KeyColumnValueTableModel(null)); diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties index 4bd77031c2..597be37f58 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties @@ -34,7 +34,7 @@ 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 +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 diff --git a/designer-base/src/test/java/com/fr/design/gui/storybook/components/TableStoryBoard.java b/designer-base/src/test/java/com/fr/design/gui/storybook/components/TableStoryBoard.java index e2ff6554f6..67c5830d99 100644 --- a/designer-base/src/test/java/com/fr/design/gui/storybook/components/TableStoryBoard.java +++ b/designer-base/src/test/java/com/fr/design/gui/storybook/components/TableStoryBoard.java @@ -5,14 +5,11 @@ 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.ilable.UILabel; +import com.fr.design.gui.iscrollbar.UIScrollBar; +import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; 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; @@ -81,7 +78,11 @@ public class TableStoryBoard extends StoryBoard { table3.getTableHeader().setUI(new FineTableHeaderUI()); 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 UIScrollPane(table1) { + public UIScrollBar createVerticalScrollBar() { + return new UIVerticalScrollBar(table1, JScrollBar.VERTICAL); + } + }).with(this::setFixSize), cell(new UIScrollPane(table2)).with(this::setFixSize), cell(new UIScrollPane(table3)).with(this::setFixSize)).getComponent()); } diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java index 132f1cd85c..83added3e7 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java @@ -2,9 +2,7 @@ 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; @@ -12,6 +10,8 @@ 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.iscrollbar.UIScrollBar; +import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; import com.fr.design.gui.itableeditorpane.UITableEditAction; import com.fr.design.gui.itableeditorpane.UITableModelAdapter; import com.fr.design.layout.FRGUIPaneFactory; @@ -26,6 +26,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,6 +51,7 @@ import static com.fine.swing.ui.layout.Layouts.cell; * Created On */ public class ITTableEditorPane extends BasicPane { + private static final String UI_CLASS_ID = "FineTableHeaderUI"; public static JTable editTable; private UITableModelAdapter tableModel; private String leftLabelName; @@ -94,8 +96,12 @@ public class ITTableEditorPane extends BasicPane { } }); - UIScrollPane scrollPane = new UIScrollPane(editTable); - scrollPane.getVerticalScrollBar().setUI(new FineTableScrollBarPaneUI(editTable)); + UIScrollPane scrollPane = new UIScrollPane(editTable) { + @Override + public UIScrollBar createVerticalScrollBar() { + return new UIVerticalScrollBar(editTable, JScrollBar.VERTICAL); + } + }; add(cell(scrollPane).weight(1).getComponent()); } @@ -245,7 +251,6 @@ public class ITTableEditorPane extends BasicPane { * @param table */ public static void makeFace(JTable table) { - table.getTableHeader().setUI(new FineTableHeaderUI()); table.getTableHeader().setDefaultRenderer(new ITHeaderRenderer(table)); } @@ -361,5 +366,9 @@ public class ITTableEditorPane extends BasicPane { this.editTable = editTable; } + @Override + public String getUIClassID() { + return UI_CLASS_ID; + } } \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java b/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java index 7812fb5352..53732bef69 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java +++ b/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java @@ -3,18 +3,17 @@ 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.ilable.UILabel; +import javax.swing.JScrollBar; 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.gui.iscrollbar.UIScrollBar; +import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; @@ -27,6 +26,7 @@ import com.fr.design.selection.SelectionListener; * SmartJTablePane用于在Grid上面选单元格时编辑JTable */ public abstract class SmartJTablePane extends BasicPane { + private static final String UI_CLASS_ID = "FineTableHeaderUI"; public static final int OK = 0; public static final int CANCEL = 1; @@ -61,8 +61,12 @@ 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 JScrollPane(table) { + @Override + public UIScrollBar createVerticalScrollBar() { + return new UIVerticalScrollBar(table, JScrollBar.VERTICAL); + } + }, BorderLayout.CENTER); // 鼠标切换选中项时,editingRowIndex也要跟着变 table.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @@ -76,7 +80,6 @@ public abstract class SmartJTablePane extends BasicPane { } } }); - table.getTableHeader().setUI(new FineTableHeaderUI()); setCellRenderer(); actionReportPane.addSelectionChangeListener(gridSelectionChangeL); @@ -120,5 +123,10 @@ public abstract class SmartJTablePane extends BasicPane { return dlg; } + + @Override + public String getUIClassID() { + return UI_CLASS_ID; + } } From 4b380d43ca109dfae1023fc6aadd573c30d438da Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 14 Aug 2024 20:20:52 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-127437=20fix:=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=E7=BF=BB=E6=96=B0=EF=BC=8C=E8=BE=B9=E6=A1=86=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=8C=E9=83=A8=E5=88=86=E5=9B=BE=E6=A0=87=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=EF=BC=8C=E6=8F=90=E7=A4=BA=E5=BC=B9=E6=A1=86=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E6=A0=B7=E5=BC=8F=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fine/theme/utils/FineUIStyle.java | 1 + .../com/fr/design/constants/UIConstants.java | 7 ++- .../connect/DatabaseConnectionPane.java | 61 +++++++++---------- .../search/pane/FineSearchPane.java | 9 +++ .../datapane/preview/PreviewTablePane.java | 23 ++++--- .../TableDataDesensitizationTableModel.java | 1 + .../tabledatapane/EmbeddedTableDataPane.java | 14 +++-- .../DefaultTemplateTreeDefineProcessor.java | 19 +++--- .../gui/icombocheckbox/UICheckListPopup.java | 12 ++-- .../gui/icombocheckbox/UIComboCheckBox.java | 18 +++++- .../gui/icontainer/UITableScrollPane.java | 24 ++++++++ .../gui/iscrollbar/UIVerticalScrollBar.java | 5 -- .../com/fr/design/gui/itable/FineUITable.java | 38 ++++++++++++ .../fr/design/gui/itable/SortableJTable.java | 17 +++--- .../itableeditorpane/UITableEditorPane.java | 29 ++------- .../itableeditorpane/UITableModelAdapter.java | 8 +-- .../com/fr/design/gui/style/BorderPane.java | 32 +++++----- .../java/com/fr/design/icon/BorderIcon.java | 17 +++--- .../mainframe/check/CheckFontInfoDialog.java | 6 +- .../pane/TemplateDirTreeSearchPane.java | 56 +++-------------- .../ui/AbstractSupportSelectTablePane.java | 2 +- .../design/mainframe/vcs/ui/RecyclePane.java | 16 ++--- .../mainframe/vcs/ui/RecycleSettingPane.java | 17 +++--- .../java/com/fr/design/style/BorderPane.java | 13 ++-- .../write/submit/DBManipulationPane.java | 9 +-- .../main/java/com/fr/env/RemoteEnvPane.java | 32 ++++------ .../java/com/fr/env/TestConnectionResult.java | 18 +++--- .../com/fine/theme/icon/border/all.svg | 3 + .../com/fine/theme/icon/border/bottom.svg | 4 ++ .../fine/theme/icon/border/bottom_thick.svg | 4 ++ .../fine/theme/icon/border/double_bottom.svg | 5 ++ .../com/fine/theme/icon/border/horizontal.svg | 4 ++ .../com/fine/theme/icon/border/in.svg | 4 ++ .../com/fine/theme/icon/border/left.svg | 4 ++ .../com/fine/theme/icon/border/none.svg | 3 + .../com/fine/theme/icon/border/out.svg | 4 ++ .../com/fine/theme/icon/border/out_thick.svg | 4 ++ .../com/fine/theme/icon/border/right.svg | 4 ++ .../com/fine/theme/icon/border/top.svg | 4 ++ .../com/fine/theme/icon/border/top_bottom.svg | 5 ++ .../theme/icon/border/top_double_bottom.svg | 6 ++ .../theme/icon/border/top_thick_bottom.svg | 5 ++ .../com/fine/theme/icon/border/vertical.svg | 4 ++ .../fine/theme/icon/close/platform_close.svg | 11 ++++ .../com/fine/theme/icon/tip/error.svg | 4 ++ .../com/fine/theme/icon/tip/information.svg | 3 + .../fine/theme/icon/tip/new_information.svg | 4 ++ .../com/fine/theme/icon/tip/success.svg | 3 + .../com/fine/theme/icon/tip/warning.svg | 5 ++ .../fine/theme/icon/toolbar/append_column.svg | 5 ++ .../fine/theme/icon/toolbar/append_row.svg | 5 ++ .../fine/theme/icon/toolbar/delete_column.svg | 6 ++ .../fine/theme/icon/toolbar/delete_row.svg | 6 ++ .../fine/theme/light/ui/fine_light.icon.json | 31 +++++++++- .../light/ui/laf/FineLightLaf.properties | 6 +- .../fr/design/i18n/dimension_en.properties | 2 +- .../fr/design/i18n/dimension_zh.properties | 2 +- .../storybook/components/TableStoryBoard.java | 21 ++----- .../actions/cell/UIToolbarBorderButton.java | 2 + .../actions/columnrow/DeleteColumnAction.java | 3 +- .../actions/columnrow/DeleteRowAction.java | 3 +- .../actions/columnrow/InsertColumnAction.java | 2 +- .../actions/columnrow/InsertRowAction.java | 2 +- .../actions/replace/ui/ITTableEditorPane.java | 24 ++------ .../cell/smartaction/SmartJTablePane.java | 13 +--- .../CellDesensitizationGroupsPane.java | 4 +- 66 files changed, 439 insertions(+), 299 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/gui/icontainer/UITableScrollPane.java create mode 100644 designer-base/src/main/java/com/fr/design/gui/itable/FineUITable.java create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/all.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/bottom.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/bottom_thick.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/double_bottom.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/horizontal.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/in.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/left.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/none.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/out.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/out_thick.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/right.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/top.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/top_bottom.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/top_double_bottom.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/top_thick_bottom.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/border/vertical.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/close/platform_close.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/tip/error.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/tip/information.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/tip/new_information.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/tip/success.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/tip/warning.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_column.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_row.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_column.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_row.svg diff --git a/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java b/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java index a98d062021..afdb0e5261 100644 --- a/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java +++ b/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"; /** diff --git a/designer-base/src/main/java/com/fr/design/constants/UIConstants.java b/designer-base/src/main/java/com/fr/design/constants/UIConstants.java index eba4a5634a..792ab91365 100644 --- a/designer-base/src/main/java/com/fr/design/constants/UIConstants.java +++ b/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); /** diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java index 370ce5219e..3779930143 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java +++ b/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 PREVIEW_TABLE_WIDTH) { + getInstance().preveiwTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + } else { + getInstance().preveiwTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); + } PreviewTablePane.progressBar.close(); getInstance().repaint(); } @@ -417,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(); } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java index 5605f2d911..32959ef942 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java +++ b/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; diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java index 27dfa07e2a..7b95cc5c16 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java +++ b/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 { 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 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); diff --git a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UICheckListPopup.java b/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UICheckListPopup.java index 26834f3074..7bc5dac7e7 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UICheckListPopup.java +++ b/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 diff --git a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java b/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java index 904d1041ea..d5f573f773 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java +++ b/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 { diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UITableScrollPane.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UITableScrollPane.java new file mode 100644 index 0000000000..204ebfdfc0 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UITableScrollPane.java @@ -0,0 +1,24 @@ +package com.fr.design.gui.icontainer; + +import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; +import com.fr.design.gui.itable.FineUITable; + +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)); + } + } +} diff --git a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java index 5962f42b26..cc0581aaf4 100644 --- a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java +++ b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java @@ -12,7 +12,6 @@ import javax.swing.JTable; * Created on */ public class UIVerticalScrollBar extends UIScrollBar { - private static final String UI_CLASS_ID = "TableScrollBarUI"; private static final long serialVersionUID = 1L; public UIVerticalScrollBar() { @@ -23,8 +22,4 @@ public class UIVerticalScrollBar extends UIScrollBar { this.setUI(new FineTableScrollBarPaneUI(table)); } - @Override - public String getUIClassID() { - return UI_CLASS_ID; - } } diff --git a/designer-base/src/main/java/com/fr/design/gui/itable/FineUITable.java b/designer-base/src/main/java/com/fr/design/gui/itable/FineUITable.java new file mode 100644 index 0000000000..2bd7bfd051 --- /dev/null +++ b/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; + } + } +} diff --git a/designer-base/src/main/java/com/fr/design/gui/itable/SortableJTable.java b/designer-base/src/main/java/com/fr/design/gui/itable/SortableJTable.java index 345de187c7..e071f15008 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itable/SortableJTable.java +++ b/designer-base/src/main/java/com/fr/design/gui/itable/SortableJTable.java @@ -1,19 +1,16 @@ package com.fr.design.gui.itable; -import javax.swing.JTable; - -public class SortableJTable extends JTable{ - private static final String UI_CLASS_ID = "FineTableHeaderUI"; - +/** + * SortableJTable + * @author lemon + * @since + * Created on + */ +public class SortableJTable extends FineUITable { public SortableJTable(TableSorter tableModel){ super(tableModel); tableModel.setTableHeader(getTableHeader()); setShowGrid(true); } - - @Override - public String getUIClassID() { - return UI_CLASS_ID; - } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java index c39cdda873..343183dee5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java @@ -6,18 +6,13 @@ 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.iscrollbar.UIScrollBar; -import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; +import com.fr.design.gui.itable.FineUITable; import com.fr.design.layout.FRGUIPaneFactory; -import javax.swing.JComponent; import javax.swing.JPanel; -import javax.swing.JScrollBar; import javax.swing.JScrollPane; -import javax.swing.JTable; -import javax.swing.UIDefaults; import javax.swing.event.TableModelListener; import java.awt.BorderLayout; import java.awt.Dimension; @@ -32,12 +27,11 @@ import java.util.List; * @since 2012-3-28下午3:06:30 */ public class UITableEditorPane extends BasicPane { - private static final String UI_CLASS_ID = "FineTableHeaderUI"; /** * */ private static final long serialVersionUID = 6855793816972735815L; - protected JTable editTable; + protected FineUITable editTable; // 放置action 的按钮. protected UITableModelAdapter tableModel; private String leftLabelName; @@ -74,12 +68,7 @@ public class UITableEditorPane extends BasicPane { UILabel l = new UILabel(leftLabelName); editTable = tableModel.createTable(); - UIScrollPane scrollPane = new UIScrollPane(editTable){ - @Override - public UIScrollBar createVerticalScrollBar() { - return new UIVerticalScrollBar(editTable, JScrollBar.VERTICAL); - } - }; + UITableScrollPane scrollPane = new UITableScrollPane(editTable); scrollPane.setBorder(new FineRoundBorder()); initbuttonPane(action); JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); @@ -178,11 +167,11 @@ public class UITableEditorPane 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; } @@ -201,10 +190,4 @@ public class UITableEditorPane extends BasicPane { editTable.getTableHeader().setResizingAllowed(resizingAllowed); } - - @Override - public String getUIClassID() { - return UI_CLASS_ID; - } - } diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java index ae283a6591..69d58e6c55 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java +++ b/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 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 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 extends AbstractTableModel implemen * 创建表 * @return 表 */ - public JTable createTable() { + public FineUITable createTable() { return table; } diff --git a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java index 903124a4ae..81759d5f04 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java +++ b/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); } diff --git a/designer-base/src/main/java/com/fr/design/icon/BorderIcon.java b/designer-base/src/main/java/com/fr/design/icon/BorderIcon.java index d8ecb88a4f..4e034ba963 100644 --- a/designer-base/src/main/java/com/fr/design/icon/BorderIcon.java +++ b/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()); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java index e0bf8843d1..448fca52c6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java +++ b/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); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirTreeSearchPane.java b/designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirTreeSearchPane.java index 07636ce631..73d909ae81 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirTreeSearchPane.java +++ b/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() { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java index b6b0215729..89ae4a7072 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java @@ -77,7 +77,7 @@ public abstract class AbstractSupportSelectTablePane exte /** * 整体面板的north部分 */ - protected JPanel tableTopPane = new JPanel(); + protected JPanel tableTopPane = new JPanel(new BorderLayout()); /** * 整体面板 */ diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java index 2c5ad62eb8..20d7843034 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java @@ -58,9 +58,9 @@ public class RecyclePane extends AbstractSupportSelectTablePane 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 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 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); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecycleSettingPane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecycleSettingPane.java index 2215ac0f20..65549bc1a9 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecycleSettingPane.java +++ b/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() { diff --git a/designer-base/src/main/java/com/fr/design/style/BorderPane.java b/designer-base/src/main/java/com/fr/design/style/BorderPane.java index c1d2f67da0..65b46ced4c 100644 --- a/designer-base/src/main/java/com/fr/design/style/BorderPane.java +++ b/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)); diff --git a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java index 24cd02f207..591e662abb 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java +++ b/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; @@ -1017,13 +1018,7 @@ public class DBManipulationPane extends BasicBeanPane { } } - protected static class KeyColumnNameValueTable extends JTable { - private static final String UI_CLASS_ID = "FineTableHeaderUI"; - - @Override - public String getUIClassID() { - return UI_CLASS_ID; - } + protected static class KeyColumnNameValueTable extends FineUITable { public KeyColumnNameValueTable() { super(new KeyColumnValueTableModel(null)); diff --git a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java index 865c5d71d7..0dbc508ad6 100644 --- a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java +++ b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java @@ -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 { 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 { 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)); diff --git a/designer-base/src/main/java/com/fr/env/TestConnectionResult.java b/designer-base/src/main/java/com/fr/env/TestConnectionResult.java index 1dee557980..5fe442a477 100644 --- a/designer-base/src/main/java/com/fr/env/TestConnectionResult.java +++ b/designer-base/src/main/java/com/fr/env/TestConnectionResult.java @@ -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 diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/all.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/all.svg new file mode 100644 index 0000000000..18e1d13096 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/all.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/bottom.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/bottom.svg new file mode 100644 index 0000000000..13542782b0 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/bottom.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/bottom_thick.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/bottom_thick.svg new file mode 100644 index 0000000000..c4f8020e34 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/bottom_thick.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/double_bottom.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/double_bottom.svg new file mode 100644 index 0000000000..70023c6016 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/double_bottom.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/horizontal.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/horizontal.svg new file mode 100644 index 0000000000..d5c6201be7 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/horizontal.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/in.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/in.svg new file mode 100644 index 0000000000..e9b1d1277c --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/in.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/left.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/left.svg new file mode 100644 index 0000000000..450833cadc --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/left.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/none.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/none.svg new file mode 100644 index 0000000000..50ea0bfc72 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/none.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/out.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/out.svg new file mode 100644 index 0000000000..f5a32e2fcc --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/out.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/out_thick.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/out_thick.svg new file mode 100644 index 0000000000..2cab9efcd5 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/out_thick.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/right.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/right.svg new file mode 100644 index 0000000000..087f06c6c6 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/right.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/top.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/top.svg new file mode 100644 index 0000000000..a406e406a0 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/top.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/top_bottom.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/top_bottom.svg new file mode 100644 index 0000000000..68a4f264e6 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/top_bottom.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/top_double_bottom.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/top_double_bottom.svg new file mode 100644 index 0000000000..bb10e60255 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/top_double_bottom.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/top_thick_bottom.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/top_thick_bottom.svg new file mode 100644 index 0000000000..0a3c261eb9 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/top_thick_bottom.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/border/vertical.svg b/designer-base/src/main/resources/com/fine/theme/icon/border/vertical.svg new file mode 100644 index 0000000000..f73700628b --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/border/vertical.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/close/platform_close.svg b/designer-base/src/main/resources/com/fine/theme/icon/close/platform_close.svg new file mode 100644 index 0000000000..a2be848c0d --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/close/platform_close.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/tip/error.svg b/designer-base/src/main/resources/com/fine/theme/icon/tip/error.svg new file mode 100644 index 0000000000..1b372e81db --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/tip/error.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/tip/information.svg b/designer-base/src/main/resources/com/fine/theme/icon/tip/information.svg new file mode 100644 index 0000000000..3ee949564e --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/tip/information.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/tip/new_information.svg b/designer-base/src/main/resources/com/fine/theme/icon/tip/new_information.svg new file mode 100644 index 0000000000..42825bc9b1 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/tip/new_information.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/tip/success.svg b/designer-base/src/main/resources/com/fine/theme/icon/tip/success.svg new file mode 100644 index 0000000000..3c4fb4d703 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/tip/success.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/tip/warning.svg b/designer-base/src/main/resources/com/fine/theme/icon/tip/warning.svg new file mode 100644 index 0000000000..f8086fbdf2 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/tip/warning.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_column.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_column.svg new file mode 100644 index 0000000000..2d46946d0f --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_column.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_row.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_row.svg new file mode 100644 index 0000000000..34a5f0848d --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/append_row.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_column.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_column.svg new file mode 100644 index 0000000000..b82d7e9503 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_column.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_row.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_row.svg new file mode 100644 index 0000000000..7283f31c7c --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/delete_row.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json index 37e648ae86..86246c8d82 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json +++ b/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" + } } diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties index c4d0559d4e..cba6d8e7fd 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties +++ b/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; \ No newline at end of file + background: null; + +[style]Label.detailLabel = \ + foreground: fade(@foreground, 90%); \ + background: $fill.normal; \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties index 9a00559eae..24cc2ad5aa 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties +++ b/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 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties index 1286e77fb6..dc9b090cc6 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties +++ b/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 diff --git a/designer-base/src/test/java/com/fr/design/gui/storybook/components/TableStoryBoard.java b/designer-base/src/test/java/com/fr/design/gui/storybook/components/TableStoryBoard.java index 67c5830d99..62ee55fa40 100644 --- a/designer-base/src/test/java/com/fr/design/gui/storybook/components/TableStoryBoard.java +++ b/designer-base/src/test/java/com/fr/design/gui/storybook/components/TableStoryBoard.java @@ -1,12 +1,10 @@ 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.iscrollbar.UIScrollBar; -import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; +import com.fr.design.gui.itable.FineUITable; import com.fr.design.gui.storybook.StoryBoard; import javax.swing.*; @@ -49,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"}, @@ -58,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"}, @@ -74,15 +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) { - public UIScrollBar createVerticalScrollBar() { - return new UIVerticalScrollBar(table1, JScrollBar.VERTICAL); - } - }).with(this::setFixSize), + 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()); } diff --git a/designer-realize/src/main/java/com/fr/design/actions/cell/UIToolbarBorderButton.java b/designer-realize/src/main/java/com/fr/design/actions/cell/UIToolbarBorderButton.java index b5bf07e5ea..89181e247a 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/cell/UIToolbarBorderButton.java +++ b/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; diff --git a/designer-realize/src/main/java/com/fr/design/actions/columnrow/DeleteColumnAction.java b/designer-realize/src/main/java/com/fr/design/actions/columnrow/DeleteColumnAction.java index c08a62253c..4dc52b9200 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/columnrow/DeleteColumnAction.java +++ b/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 diff --git a/designer-realize/src/main/java/com/fr/design/actions/columnrow/DeleteRowAction.java b/designer-realize/src/main/java/com/fr/design/actions/columnrow/DeleteRowAction.java index b7e3485425..30cf43dcca 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/columnrow/DeleteRowAction.java +++ b/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 diff --git a/designer-realize/src/main/java/com/fr/design/actions/columnrow/InsertColumnAction.java b/designer-realize/src/main/java/com/fr/design/actions/columnrow/InsertColumnAction.java index 609a0740e7..8612ffdecb 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/columnrow/InsertColumnAction.java +++ b/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() { diff --git a/designer-realize/src/main/java/com/fr/design/actions/columnrow/InsertRowAction.java b/designer-realize/src/main/java/com/fr/design/actions/columnrow/InsertRowAction.java index ca24e3c137..86a5aa17f8 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/columnrow/InsertRowAction.java +++ b/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() { diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java index 83added3e7..e9422bcfea 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java @@ -9,9 +9,8 @@ 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.iscrollbar.UIScrollBar; -import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; +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; @@ -51,8 +50,7 @@ import static com.fine.swing.ui.layout.Layouts.cell; * Created On */ public class ITTableEditorPane extends BasicPane { - private static final String UI_CLASS_ID = "FineTableHeaderUI"; - public static JTable editTable; + public static FineUITable editTable; private UITableModelAdapter tableModel; private String leftLabelName; private JPanel buttonPane; @@ -96,12 +94,7 @@ public class ITTableEditorPane extends BasicPane { } }); - UIScrollPane scrollPane = new UIScrollPane(editTable) { - @Override - public UIScrollBar createVerticalScrollBar() { - return new UIVerticalScrollBar(editTable, JScrollBar.VERTICAL); - } - }; + UITableScrollPane scrollPane = new UITableScrollPane(editTable); add(cell(scrollPane).weight(1).getComponent()); } @@ -358,17 +351,12 @@ public class ITTableEditorPane 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; } - @Override - public String getUIClassID() { - return UI_CLASS_ID; - } - } \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java b/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java index 53732bef69..df63556e9f 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java +++ b/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java @@ -3,17 +3,15 @@ package com.fr.design.cell.smartaction; import java.awt.BorderLayout; import java.awt.Window; +import com.fr.design.gui.icontainer.UITableScrollPane; import com.fr.design.gui.ilable.UILabel; -import javax.swing.JScrollBar; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.table.AbstractTableModel; -import com.fr.design.gui.iscrollbar.UIScrollBar; -import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; @@ -26,7 +24,7 @@ import com.fr.design.selection.SelectionListener; * SmartJTablePane用于在Grid上面选单元格时编辑JTable */ public abstract class SmartJTablePane extends BasicPane { - private static final String UI_CLASS_ID = "FineTableHeaderUI"; + private static final String UI_CLASS_ID = "TableHeaderUI"; public static final int OK = 0; public static final int CANCEL = 1; @@ -61,12 +59,7 @@ public abstract class SmartJTablePane extends BasicPane { // BasicPane的center放JTable table = new JTable(model); - this.add(scrollPane = new JScrollPane(table) { - @Override - public UIScrollBar createVerticalScrollBar() { - return new UIVerticalScrollBar(table, JScrollBar.VERTICAL); - } - }, BorderLayout.CENTER); + this.add(scrollPane = new UITableScrollPane(table), BorderLayout.CENTER); // 鼠标切换选中项时,editingRowIndex也要跟着变 table.getSelectionModel().addListSelectionListener(new ListSelectionListener() { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java index 830cbd4ce9..e741da25cd 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java +++ b/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(); From e6e2ff531a624ad2d703d4e31ccb3298bd94e1ab Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 14 Aug 2024 20:32:50 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-127437=20fix:setui=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java | 5 +++++ .../resources/com/fine/theme/light/ui/laf/FineLaf.properties | 1 + 2 files changed, 6 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java index cc0581aaf4..ae5f8e589b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java +++ b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java @@ -12,6 +12,7 @@ import javax.swing.JTable; * Created on */ public class UIVerticalScrollBar extends UIScrollBar { + private static final String UI_CLASS_ID = "TableVerticalBarUI"; private static final long serialVersionUID = 1L; public UIVerticalScrollBar() { @@ -22,4 +23,8 @@ public class UIVerticalScrollBar extends UIScrollBar { this.setUI(new FineTableScrollBarPaneUI(table)); } + public String getUIClassID() { + return UI_CLASS_ID; + } + } diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties index 597be37f58..ddb9f328a1 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties @@ -34,6 +34,7 @@ SpinnerUI=com.formdev.flatlaf.ui.FlatSpinnerUI SplitPaneUI=com.formdev.flatlaf.ui.FlatSplitPaneUI TabbedPaneUI=com.formdev.flatlaf.ui.FlatTabbedPaneUI TableUI=com.formdev.flatlaf.ui.FlatTableUI +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 From 8013627bcc22ae4658c3c96faa845a99a4ea5708 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 14 Aug 2024 20:52:52 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-127437=20fix:setui=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../light/ui/FineTableScrollBarPaneUI.java | 27 ++++++++++++++----- .../gui/icontainer/UITableScrollPane.java | 1 - .../gui/iscrollbar/UIVerticalScrollBar.java | 11 ++++---- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/designer-base/src/main/java/com/fine/theme/light/ui/FineTableScrollBarPaneUI.java b/designer-base/src/main/java/com/fine/theme/light/ui/FineTableScrollBarPaneUI.java index 9e18e17b45..0da29904ca 100644 --- a/designer-base/src/main/java/com/fine/theme/light/ui/FineTableScrollBarPaneUI.java +++ b/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); } diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UITableScrollPane.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UITableScrollPane.java index 204ebfdfc0..2d0807409b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UITableScrollPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UITableScrollPane.java @@ -1,7 +1,6 @@ package com.fr.design.gui.icontainer; import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; -import com.fr.design.gui.itable.FineUITable; import javax.swing.JScrollBar; import javax.swing.JTable; diff --git a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java index ae5f8e589b..a323933db3 100644 --- a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java +++ b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIVerticalScrollBar.java @@ -1,7 +1,5 @@ package com.fr.design.gui.iscrollbar; -import com.fine.theme.light.ui.FineTableScrollBarPaneUI; - import javax.swing.JTable; /** @@ -15,16 +13,19 @@ public class UIVerticalScrollBar extends UIScrollBar { private static final String UI_CLASS_ID = "TableVerticalBarUI"; private static final long serialVersionUID = 1L; - public UIVerticalScrollBar() { - } + public JTable table; public UIVerticalScrollBar(JTable table, int orientation) { super(orientation); - this.setUI(new FineTableScrollBarPaneUI(table)); + this.table = table; } public String getUIClassID() { return UI_CLASS_ID; } + public JTable getTable() { + return this.table; + } + }