From f62d54971f645e1cd345cf0a9d9ae039eabdef59 Mon Sep 17 00:00:00 2001 From: "Richard.Fang" Date: Fri, 2 Aug 2024 16:37:40 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-127436=E3=80=90NewUI=E3=80=91=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E6=A0=B7=E5=BC=8F=E7=BF=BB=E6=96=B0-icon?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=9B=BF=E6=8D=A2=E5=8F=8A=E9=83=A8=E5=88=86?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E7=BF=BB=E6=96=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/RefreshLabel.java | 4 +- .../datapane/connect/ConnectionListPane.java | 13 +- .../tabledatapane/DBTableDataPane.java | 4 +- .../tabledatapane/EmbeddedTableDataPane.java | 27 +++- .../dialog/mobile/MobileRadioCheckPane.java | 11 +- .../design/editor/editor/BooleanEditor.java | 9 +- .../editor/editor/ColumnIndexEditor.java | 7 +- .../editor/editor/ColumnNameEditor.java | 9 +- .../design/editor/editor/ColumnRowEditor.java | 5 + .../editor/editor/ColumnSelectedEditor.java | 7 +- .../fr/design/editor/editor/DateEditor.java | 5 + .../com/fr/design/editor/editor/Editor.java | 26 ++-- .../design/editor/editor/FormulaEditor.java | 10 +- .../design/editor/editor/IntegerEditor.java | 5 + .../fr/design/editor/editor/NumberEditor.java | 7 +- .../editor/editor/OldColumnIndexEditor.java | 12 +- .../design/editor/editor/ParameterEditor.java | 8 +- .../editor/editor/SpinnerIntegerEditor.java | 7 +- .../fr/design/editor/editor/TextEditor.java | 5 + .../com/fr/design/formula/FormulaPane.java | 16 +-- .../design/formula/FunctionManagerPane.java | 17 +-- .../com/fr/design/fun/PreviewProvider.java | 6 + .../gui/controlpane/NameableSelfCreator.java | 8 +- .../hyperlink/ReportletHyperlinkPane.java | 4 +- .../hyperlink/popup/ContentSettingPane.java | 13 +- .../hyperlink/popup/MobilePopupUIUtils.java | 9 +- .../javascript/ExportJavaScriptPane.java | 126 +++++++----------- .../fr/design/javascript/JSContentPane.java | 7 +- .../com/fr/design/mainframe/JTemplate.java | 4 +- .../widget/editors/DataBindingEditor.java | 5 + .../widget/editors/DataTableEditor.java | 5 + .../design/parameter/ParameterArrayPane.java | 4 +- .../fr/design/parameter/ParameterPane.java | 13 +- .../com/fr/design/preview/FormPreview.java | 5 + .../com/fr/design/preview/MobilePreview.java | 5 + .../fr/design/preview/PagePlusPreview.java | 5 + .../com/fr/design/preview/PagePreview.java | 5 + .../com/fr/design/preview/ViewPreview.java | 5 + .../com/fr/design/preview/WritePreview.java | 5 + .../com/fr/design/report/WatermarkPane.java | 25 +--- .../design/report/fit/FormFitConfigPane.java | 16 +-- .../write/submit/DBManipulationPane.java | 5 +- .../write/submit/SubmitJobListPane.java | 5 +- .../com/fine/theme/icon/dataLink.svg | 11 ++ .../com/fine/theme/icon/dataLink_disable.svg | 11 ++ .../com/fine/theme/icon/datail_distable.svg | 3 + .../resources/com/fine/theme/icon/detail.svg | 3 + .../com/fine/theme/icon/editor/ds_column.svg | 16 +++ .../theme/icon/editor/ds_column_disable.svg | 16 +++ .../fine/theme/icon/editor/type_boolean.svg | 4 + .../icon/editor/type_boolean_disable.svg | 4 + .../fine/theme/icon/editor/type_double.svg | 11 ++ .../theme/icon/editor/type_double_disable.svg | 11 ++ .../com/fine/theme/icon/jumpHelp.svg | 3 + .../com/fine/theme/icon/jumpHelp_disable.svg | 3 + .../fine/theme/icon/preview/data_analysis.svg | 17 +++ .../icon/preview/data_analysis_disable.svg | 17 +++ .../theme/icon/preview/preview_mobile.svg | 17 +++ .../icon/preview/preview_mobile_disable.svg | 17 +++ .../theme/icon/preview/preview_paging.svg | 18 +++ .../icon/preview/preview_paging_disable.svg | 17 +++ .../fine/theme/icon/preview/preview_write.svg | 18 +++ .../icon/preview/preview_write_disable.svg | 18 +++ .../resources/com/fine/theme/icon/switch.svg | 3 + .../com/fine/theme/icon/toolbar/appendRow.svg | 7 + .../theme/icon/toolbar/appendRow_disable.svg | 7 + .../com/fine/theme/icon/toolbar/deleteRow.svg | 7 + .../theme/icon/toolbar/deleteRow_disable.svg | 7 + .../com/fine/theme/icon/toolbar/showValue.svg | 4 + .../theme/icon/toolbar/showValue_disable.svg | 4 + .../com/fine/theme/icon/toolbar/stash.svg | 7 + .../fine/theme/icon/toolbar/stash_disable.svg | 7 + .../com/fine/theme/icon/variable/dataItem.svg | 9 ++ .../theme/icon/variable/dataItem_disable.svg | 9 ++ .../fine/theme/icon/variable/param_global.svg | 9 ++ .../icon/variable/param_global_disable.svg | 9 ++ .../com/fine/theme/icon/variable/variable.svg | 5 + .../theme/icon/variable/variable_disable.svg | 5 + .../fine/theme/light/ui/fine_light.icon.json | 20 ++- .../chartx/component/MapAreaMatchPane.java | 4 +- .../fr/design/module/ChartHyperlinkGroup.java | 10 +- .../beans/actions/ChangeNameAction.java | 4 +- .../java/com/fr/design/mainframe/JForm.java | 3 +- .../fr/design/preview/DeveloperPreview.java | 5 + .../design/preview/FormAdaptivePreview.java | 5 + .../actions/columnrow/InsertColumnAction.java | 6 +- .../actions/columnrow/InsertRowAction.java | 6 +- .../design/javascript/ListenerEditPane.java | 36 +++-- .../mainframe/ElementCasePaneDelegate.java | 3 +- .../com/fr/design/mainframe/JWorkBook.java | 6 +- .../fr/design/report/VerifierListPane.java | 5 +- .../com/fr/design/report/WordExportPane.java | 3 +- .../fr/design/report/WriteShortCutsPane.java | 8 +- .../report/mobile/AppFitBrowserPane.java | 9 +- .../report/mobile/MobileRadioGroupPane.java | 19 +-- .../report/mobile/ReportMobileAttrPane.java | 8 +- .../fr/design/webattr/DragToolBarPane.java | 5 + .../com/fr/design/webattr/EditToolBar.java | 11 +- .../webattr/ReportWebWidgetConstants.java | 12 +- .../com/fr/design/webattr/SettingToolBar.java | 7 +- .../com/fr/design/webattr/ToolBarButton.java | 8 ++ .../fr/design/webattr/ToolBarDragPane.java | 12 +- .../com/fr/design/webattr/ToolBarPane.java | 3 +- .../AbstractNativePrintSettingPane.java | 2 +- .../printsettings/PrintSettingPane.java | 3 + .../fr/design/widget/WidgetConfigPane.java | 3 +- .../submit/SmartInsertDBManipulationPane.java | 5 +- .../write/submit/SubmitVisitorListPane.java | 6 +- .../java/com/fr/poly/creator/ECBlockPane.java | 3 +- .../fr/start/module/DesignerActivator.java | 14 +- 110 files changed, 782 insertions(+), 305 deletions(-) create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/dataLink.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/dataLink_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/datail_distable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/detail.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/type_double.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/jumpHelp.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/jumpHelp_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/preview/data_analysis.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/preview/data_analysis_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/preview/preview_mobile.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/preview/preview_mobile_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/preview/preview_paging.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/preview/preview_paging_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/preview/preview_write.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/preview/preview_write_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/switch.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/appendRow.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/appendRow_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/deleteRow.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/deleteRow_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/showValue.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/showValue_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/stash.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/stash_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/variable/dataItem.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/variable/dataItem_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/variable/param_global.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/variable/param_global_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/variable/variable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/variable/variable_disable.svg diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/RefreshLabel.java b/designer-base/src/main/java/com/fr/design/data/datapane/RefreshLabel.java index 1971c77809..ac4a407732 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/RefreshLabel.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/RefreshLabel.java @@ -1,11 +1,11 @@ package com.fr.design.data.datapane; +import com.fine.theme.icon.LazyIcon; import java.awt.Cursor; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import com.fr.base.BaseUtils; import com.fr.design.gui.ibutton.UIButton; @@ -15,7 +15,7 @@ public class RefreshLabel extends UIButton { private Refreshable refreshable; public RefreshLabel(Refreshable refreshable) { - super(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); + super(new LazyIcon("refresh")); this.refreshable = refreshable; diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index 6bfd0a37f0..a1a6aa1046 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -1,5 +1,6 @@ package com.fr.design.data.datapane.connect; +import com.fine.theme.icon.LazyIcon; import com.fr.config.RemoteConfigEvent; import com.fr.data.driver.DriverClassNotFoundException; import com.fr.data.impl.Connection; @@ -154,16 +155,12 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh */ public NameableCreator[] createNameableCreators() { NameObjectCreator jdbc = new NameObjectCreator( - "JDBC", - "/com/fr/design/images/data/source/jdbcTableData.png", - JDBCDatabaseConnection.class, - DatabaseConnectionPane.JDBC.class + "JDBC", new LazyIcon("dataLink"), + JDBCDatabaseConnection.class, DatabaseConnectionPane.JDBC.class ); NameObjectCreator jndi = new NameObjectCreator( - "JNDI", - "/com/fr/design/images/data/source/jdbcTableData.png", - JNDIDatabaseConnection.class, - DatabaseConnectionPane.JNDI.class + "JNDI", new LazyIcon("dataLink"), + JNDIDatabaseConnection.class, DatabaseConnectionPane.JNDI.class ); NameableCreator[] creators; if (WorkContext.getCurrent().get(DataBaseTypeOperator.class).limitDatabaseType()) { diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index fc502121d3..f31bbab0e8 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -44,7 +44,6 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.ToolBarDef; import com.fr.design.utils.ParameterUtils; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.esd.core.strategy.config.StrategyConfig; import com.fr.esd.core.strategy.config.StrategyConfigHelper; import com.fr.esd.core.strategy.config.service.StrategyConfigService; @@ -54,7 +53,6 @@ import com.fr.esd.event.DsNameTarget; import com.fr.esd.event.StrategyEventsNotifier; import com.fr.esd.query.StrategicTableData; import com.fr.general.ComparatorUtils; -import com.fr.general.IOUtils; import com.fr.general.sql.SqlUtils; import com.fr.log.FineLoggerFactory; import com.fr.script.Calculator; @@ -583,7 +581,7 @@ public class DBTableDataPane extends AbstractTableDataPane implemen protected class RefreshAction extends UITableEditAction { public RefreshAction() { setName(REFRESH_BUTTON); - setSmallIcon(IOUtils.readIcon("/com/fr/design/images/control/refresh.png")); + setSmallIcon(new LazyIcon("refresh")); } 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 90de902a9a..61b3bea3ab 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 @@ -13,11 +13,12 @@ import com.fr.general.DateUtils; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; -import javax.swing.BorderFactory; 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; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableColumn; @@ -57,7 +58,8 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane 1); + removeRowButton.setEnabled(dataJTable.getRowCount() > 0); + } + @Override protected String title4PopupWindow() { return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Embedded_TableData"); diff --git a/designer-base/src/main/java/com/fr/design/dialog/mobile/MobileRadioCheckPane.java b/designer-base/src/main/java/com/fr/design/dialog/mobile/MobileRadioCheckPane.java index 0b66019c91..7750cb01b9 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/mobile/MobileRadioCheckPane.java +++ b/designer-base/src/main/java/com/fr/design/dialog/mobile/MobileRadioCheckPane.java @@ -6,8 +6,7 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.stable.StringUtils; -import javax.swing.BorderFactory; -import javax.swing.JPanel; +import java.awt.BorderLayout; import java.awt.Component; import java.util.ArrayList; import java.util.List; @@ -30,16 +29,12 @@ public class MobileRadioCheckPane extends BasicBeanPane { UICheckBox checkBox = new UICheckBox(title); checkBox.setSelected(false); - checkBoxes.add(checkBox); - Component[][] components = new Component[][]{ new Component[]{checkBox} }; - JPanel fitOpsPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - fitOpsPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 10, 0)); - - this.add(fitOpsPane); + this.setLayout(new BorderLayout()); + this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize)); } public int getCurrentState() { diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java index af2589d455..902a45d31d 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java @@ -7,8 +7,8 @@ import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; -import javax.swing.*; -import java.awt.*; +import javax.swing.JComponent; +import java.awt.BorderLayout; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; @@ -106,6 +106,11 @@ public class BooleanEditor extends Editor { return "type_bool"; } + @Override + public String getIconId() { + return "type_boolean"; + } + @Override public boolean accept(Object object) { return object instanceof Boolean; diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/ColumnIndexEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/ColumnIndexEditor.java index 47ead39d45..d9b2f1a2f7 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/ColumnIndexEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/ColumnIndexEditor.java @@ -3,7 +3,7 @@ package com.fr.design.editor.editor; import com.fr.design.gui.icombobox.IntComboBox; -import java.awt.*; +import java.awt.BorderLayout; import java.awt.event.ActionListener; import java.awt.event.ItemListener; @@ -57,6 +57,11 @@ public class ColumnIndexEditor extends Editor { return "ds_column_index"; } + @Override + public String getIconId(){ + return "ds_column_index"; + } + /** * object参数是否是Integer * diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/ColumnNameEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/ColumnNameEditor.java index f4d2a132cf..54f833b279 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/ColumnNameEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/ColumnNameEditor.java @@ -5,8 +5,8 @@ import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.JList; +import java.awt.Component; /** * 列编辑器,里面是列名 @@ -76,4 +76,9 @@ public class ColumnNameEditor extends ColumnIndexEditor { return "ds_column_name"; } + @Override + public String getIconId() { + return "ds_column_name"; + } + } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/ColumnRowEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/ColumnRowEditor.java index 2da3bc3108..1fe29722f0 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/ColumnRowEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/ColumnRowEditor.java @@ -68,6 +68,11 @@ public class ColumnRowEditor extends Editor { return "cell"; } + @Override + public String getIconId() { + return "cellelement"; + } + @Override public boolean accept(Object object) { return object instanceof ColumnRow; diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java index edd531cae9..00b92731b8 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java @@ -10,7 +10,7 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.general.data.TableDataColumn; import com.fr.stable.StringUtils; -import java.awt.*; +import java.awt.BorderLayout; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.List; @@ -87,6 +87,11 @@ public class ColumnSelectedEditor extends Editor implements Prep return "ds_column"; } + @Override + public String getIconId() { + return "ds_column"; + } + @Override public boolean accept(Object object) { return object instanceof SimpleDSColumn; diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java index c40161ba6c..c2ca7f3a9b 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java @@ -168,6 +168,11 @@ public class DateEditor extends Editor { public String getIconName() { return "type_date"; } + + @Override + public String getIconId() { + return "date"; + } public void setUIDatePickerStyle(int style){ this.uiDatePicker.setStyle(style); diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/Editor.java b/designer-base/src/main/java/com/fr/design/editor/editor/Editor.java index d80e3d730e..97b507ffca 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/Editor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/Editor.java @@ -3,10 +3,12 @@ */ package com.fr.design.editor.editor; +import com.fine.theme.icon.LazyIcon; import com.fr.base.BaseUtils; import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.JComponent; +import javax.swing.Icon; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -35,15 +37,21 @@ public abstract class Editor extends JComponent { // 约定图片的文件名为this.getName(),处理起来方便些 // b:这里国际化没有考虑 public Icon getIcon() { - if (StringUtils.isEmpty(this.getIconName())) { - return null; - } - String iconName = "com/fr/design/images/buttonicon/" + this.getIconName() + ".png"; - try { - return BaseUtils.readIcon(iconName); - } catch (NullPointerException e) { - return null; + if(null == this.getIconId()){ + if (StringUtils.isEmpty(this.getIconName())) { + return null; + } + try { + return BaseUtils.readIcon("com/fr/design/images/buttonicon/" + this.getIconName() + ".png"); + } catch (NullPointerException e) { + return null; + } } + return new LazyIcon(this.getIconId()); + } + + public String getIconId(){ + return null; } public String getName() { diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/FormulaEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/FormulaEditor.java index b8dc5ad8fe..207562146f 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/FormulaEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/FormulaEditor.java @@ -10,9 +10,10 @@ import com.fr.design.formula.UIFormula; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; -import javax.swing.*; +import javax.swing.JPanel; +import javax.swing.SwingUtilities; import javax.swing.event.DocumentListener; -import java.awt.*; +import java.awt.BorderLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -139,6 +140,11 @@ public class FormulaEditor extends Editor { return "type_formula"; } + @Override + public String getIconId() { + return "formula"; + } + /** * object是否是公司类型对象 * diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/IntegerEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/IntegerEditor.java index b68c62b6d3..1c956719bb 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/IntegerEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/IntegerEditor.java @@ -35,6 +35,11 @@ public class IntegerEditor extends NumberEditor { return "type_int"; } + @Override + public String getIconId(){ + return "ds_column_index"; + } + @Override public void setValue(Integer value) { if (value == null) { diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/NumberEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/NumberEditor.java index 26b81f8a4b..9d049b08f0 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/NumberEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/NumberEditor.java @@ -8,7 +8,7 @@ import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.stable.StringUtils; -import java.awt.*; +import java.awt.BorderLayout; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; @@ -110,6 +110,11 @@ public abstract class NumberEditor extends Editor { return "type_double"; } + @Override + public String getIconId(){ + return "type_double"; + } + /** * Request focus */ diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/OldColumnIndexEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/OldColumnIndexEditor.java index b2cb6dc211..e0361a7971 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/OldColumnIndexEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/OldColumnIndexEditor.java @@ -8,8 +8,11 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import javax.swing.JList; +import javax.swing.ListCellRenderer; +import java.awt.BorderLayout; +import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemListener; @@ -102,6 +105,11 @@ public class OldColumnIndexEditor extends Editor { return "ds_column"; } + @Override + public String getIconId() { + return "ds_column"; + } + @Override public boolean accept(Object object) { return object instanceof Integer || object instanceof String; diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/ParameterEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/ParameterEditor.java index be25cab036..3f399d1c98 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/ParameterEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/ParameterEditor.java @@ -4,8 +4,7 @@ import com.fr.base.Parameter; import com.fr.design.gui.icombobox.ParameterComboBox; import com.fr.design.layout.FRGUIPaneFactory; - -import java.awt.*; +import java.awt.BorderLayout; /** * 参数Editor @@ -57,6 +56,11 @@ public class ParameterEditor extends Editor { return "parameter"; } + @Override + public String getIconId() { + return "param"; + } + @Override public boolean accept(Object object) { return object instanceof Parameter; diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/SpinnerIntegerEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/SpinnerIntegerEditor.java index 8d2bdb48ba..c3eb305a50 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/SpinnerIntegerEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/SpinnerIntegerEditor.java @@ -6,7 +6,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.stable.StringUtils; -import java.awt.*; +import java.awt.BorderLayout; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; @@ -47,6 +47,11 @@ public class SpinnerIntegerEditor extends Editor { return "type_int"; } + @Override + public String getIconId(){ + return "ds_column_index"; + } + KeyListener textKeyListener = new KeyAdapter() { public void keyReleased(KeyEvent evt) { diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/TextEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/TextEditor.java index 26bd7cad0a..3108bbdd19 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/TextEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/TextEditor.java @@ -147,6 +147,11 @@ public class TextEditor extends Editor { return "type_string"; } + @Override + public String getIconId() { + return "ds_column_name"; + } + /** * 判断object是否是字符类型 * diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java index 24c87a8c5d..2c25ee61e0 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java @@ -1438,26 +1438,26 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { DefaultMutableTreeNode bindCellNode = new DefaultMutableTreeNode(new TextUserObject("$$$")); rootNode.add(bindCellNode); } - // todo: 缺一些icon + // 数据项 rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Data_Fields"), - BaseUtils.readIcon("/com/fr/design/images/dialog/table.png"), + new LazyIcon("dataItem"), variableResolver.resolveColumnNames()).createMutableTreeNode()); // Set cutReport Variable rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Variables"), - BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"), + new LazyIcon("variable"), variableResolver.resolveCurReportVariables()).createMutableTreeNode()); - + // 数据集参数 rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Source_Type_Tabledata"), - BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), + new LazyIcon("param_global"), variableResolver.resolveTableDataParameterVariables()).createMutableTreeNode()); - + // 报表参数 rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ParameterD_Report_Parameter"), new LazyIcon("param"), variableResolver.resolveReportParameterVariables()).createMutableTreeNode()); - + // 全局参数 rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Server_Global_Parameters"), - BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), + new LazyIcon("param_global"), variableResolver.resolveGlobalParameterVariables()).createMutableTreeNode()); variableModel.reload(); diff --git a/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java b/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java index de2535c929..2acf6e772a 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java @@ -1,6 +1,6 @@ package com.fr.design.formula; -import com.fr.base.svg.IconUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.design.beans.BasicBeanPane; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.dialog.BasicDialog; @@ -15,7 +15,6 @@ import com.fr.design.gui.itextarea.DescriptionTextArea; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.file.FunctionConfig; import com.fr.general.NameObject; @@ -24,8 +23,13 @@ import com.fr.stable.project.ProjectConstants; import com.fr.stable.script.FunctionDef; import com.fr.workspace.WorkContext; -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import javax.swing.BorderFactory; +import javax.swing.SwingUtilities; +import javax.swing.JScrollPane; +import java.awt.BorderLayout; +import java.awt.Dialog; +import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; @@ -34,7 +38,6 @@ import java.util.List; import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.cell; -import static com.fine.swing.ui.layout.Layouts.flex; import static com.fine.swing.ui.layout.Layouts.column; public class FunctionManagerPane extends BasicPane { @@ -101,9 +104,7 @@ public class FunctionManagerPane extends BasicPane { @Override public NameableCreator[] createNameableCreators() { NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"), - IconUtils.readIcon("com/fr/design/images/server/global_param.png"), - FunctionDef.class, - FunctionContentPane.class); + new LazyIcon("param"), FunctionDef.class, FunctionContentPane.class); return new NameableCreator[]{funcDef}; } diff --git a/designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java b/designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java index 76b5037ef5..5eca345207 100644 --- a/designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java @@ -38,6 +38,12 @@ public interface PreviewProvider extends Mutable, Filter { */ String iconPathForLarge(); + /** + * 下拉弹出菜单的图标Id + * @return 图标Id + */ + String iconIdForPopupItem(); + /** * 点击下拉菜单时触发的事件 * @param jt 当前的模板对象 diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/NameableSelfCreator.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/NameableSelfCreator.java index 4b06b74ca4..8543b77500 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/NameableSelfCreator.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/NameableSelfCreator.java @@ -3,16 +3,16 @@ package com.fr.design.gui.controlpane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ilist.ListModelElement; import com.fr.stable.Nameable; - +import javax.swing.Icon; public abstract class NameableSelfCreator extends AbstractNameableCreator { public NameableSelfCreator(String menuName, Class clazz, Class updatePane) { super(menuName, clazz, updatePane); } - - public NameableSelfCreator(String menuName, String iconPath, Class clazz, Class updatePane) { - super(menuName, iconPath, clazz, updatePane); + + public NameableSelfCreator(String menuName, Icon icon, Class clazz, Class updatePane) { + super(menuName, icon, clazz, updatePane); } @Override diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java index d7d9817b55..0aeb286cb3 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java @@ -1,6 +1,6 @@ package com.fr.design.hyperlink; -import com.fr.base.BaseUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.base.Parameter; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.frpane.ReportletParameterViewPane; @@ -121,7 +121,7 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane { private ExportRadioGroup templateRadioGroup; @@ -114,31 +121,22 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane(new ExportJSTableModel()); editorPane.setHeaderResizing(false); - - this.add(editorPane, BorderLayout.CENTER); + editorPane.setPreferredSize(FineUIScale.scale(new Dimension(-1,300))); + this.add(wrapComponentWithTitle(editorPane, Toolkit.i18nText("Fine-Design_Basic_Export_JS_Template_Other"))); } public void reset() { @@ -769,14 +752,6 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane> */ public Icon getPreviewLargeIcon() { PreviewProvider provider = getPreviewType(); - String iconPath = provider.iconPathForLarge(); - return IconUtils.readIcon(iconPath); + return new LazyIcon(provider.iconIdForPopupItem(), 32); } /** diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataBindingEditor.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataBindingEditor.java index 0e53fd8631..1a56928251 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataBindingEditor.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataBindingEditor.java @@ -156,4 +156,9 @@ public class DataBindingEditor extends Editor { public String getIconName() { return "bind_ds_column"; } + + @Override + public String getIconId() { + return "bind_column"; + } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java index de85b63041..d52d600a31 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java @@ -81,4 +81,9 @@ public class DataTableEditor extends Editor { return "bind_ds_column"; } + @Override + public String getIconId() { + return "bind_column"; + } + } diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java index a1e73dcfa8..85c7c93af3 100644 --- a/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java +++ b/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java @@ -1,8 +1,8 @@ package com.fr.design.parameter; +import com.fine.theme.icon.LazyIcon; import com.fr.base.Parameter; import com.fr.base.ParameterConfig; -import com.fr.base.svg.IconUtils; import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableSelfCreator; @@ -59,7 +59,7 @@ public class ParameterArrayPane extends JListControlPane { public NameableCreator[] createNameableCreators() { return new NameableCreator[]{ new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), - "com/fr/design/images/server/global_param.png", + new LazyIcon("param"), Parameter.class, ParameterPane.class) { public Parameter createNameable(UnrepeatedNameHelper helper) { diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java index 340f9a5232..76986b5520 100644 --- a/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java +++ b/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java @@ -39,22 +39,21 @@ public class ParameterPane extends BasicBeanPane { protected void initComponents() { this.setLayout(new BorderLayout()); //名字 - nameTextField = new UITextField(10); + nameTextField = new UITextField(); nameTextField.setEditable(false); //默认值 valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane(); // richer:要排列显示的控件 JPanel centerPane = column(LayoutConstants.VERTICAL_GAP, - row(20, - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":")).weight(0.1), + row(LayoutConstants.HORIZONTAL_GAP, + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name"))).weight(0.1), cell(nameTextField).weight(0.8), flex(0.1)), - row(20, - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value") + ":")).weight(0.1), + row(LayoutConstants.HORIZONTAL_GAP, + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).weight(0.1), cell(valueEditor).weight(0.8), flex(0.1)) - ).getComponent(); - centerPane.setBorder(new ScaledEmptyBorder(0, 20, 0, 0)); + ).with(it -> it.setBorder(new ScaledEmptyBorder(0, 10, 0, 0))).getComponent(); this.add(centerPane, BorderLayout.CENTER); } diff --git a/designer-base/src/main/java/com/fr/design/preview/FormPreview.java b/designer-base/src/main/java/com/fr/design/preview/FormPreview.java index 83b8a353f2..324a7a1ca6 100644 --- a/designer-base/src/main/java/com/fr/design/preview/FormPreview.java +++ b/designer-base/src/main/java/com/fr/design/preview/FormPreview.java @@ -26,6 +26,11 @@ public class FormPreview extends AbstractPreviewProvider { return "/com/fr/design/standard/preview/run24.svg"; } + @Override + public String iconIdForPopupItem() { + return "default"; + } + @Override public int previewTypeCode() { return PREVIEW_TYPE; diff --git a/designer-base/src/main/java/com/fr/design/preview/MobilePreview.java b/designer-base/src/main/java/com/fr/design/preview/MobilePreview.java index a55eb25733..c1548029e8 100644 --- a/designer-base/src/main/java/com/fr/design/preview/MobilePreview.java +++ b/designer-base/src/main/java/com/fr/design/preview/MobilePreview.java @@ -27,6 +27,11 @@ public class MobilePreview extends AbstractPreviewProvider { return "/com/fr/design/standard/preview/mobileb24.svg"; } + @Override + public String iconIdForPopupItem() { + return "preview_mobile"; + } + @Override public int previewTypeCode() { return PREVIEW_TYPE; diff --git a/designer-base/src/main/java/com/fr/design/preview/PagePlusPreview.java b/designer-base/src/main/java/com/fr/design/preview/PagePlusPreview.java index 04fd6623c8..d2ec7bf41d 100644 --- a/designer-base/src/main/java/com/fr/design/preview/PagePlusPreview.java +++ b/designer-base/src/main/java/com/fr/design/preview/PagePlusPreview.java @@ -27,6 +27,11 @@ public class PagePlusPreview extends AbstractPreviewProvider { return "com/fr/design/images/buttonicon/pageb24.png"; } + @Override + public String iconIdForPopupItem() { + return "default"; + } + @Override public int previewTypeCode() { return CODE; diff --git a/designer-base/src/main/java/com/fr/design/preview/PagePreview.java b/designer-base/src/main/java/com/fr/design/preview/PagePreview.java index c2f15c915a..2473f56086 100644 --- a/designer-base/src/main/java/com/fr/design/preview/PagePreview.java +++ b/designer-base/src/main/java/com/fr/design/preview/PagePreview.java @@ -25,6 +25,11 @@ public class PagePreview extends AbstractPreviewProvider { return "/com/fr/design/standard/preview/pageb24.svg"; } + @Override + public String iconIdForPopupItem() { + return "preview_paging"; + } + @Override public int previewTypeCode() { return IOFile.DEFAULT_PREVIEW_TYPE; diff --git a/designer-base/src/main/java/com/fr/design/preview/ViewPreview.java b/designer-base/src/main/java/com/fr/design/preview/ViewPreview.java index 5df602649c..fee54a06e0 100644 --- a/designer-base/src/main/java/com/fr/design/preview/ViewPreview.java +++ b/designer-base/src/main/java/com/fr/design/preview/ViewPreview.java @@ -28,6 +28,11 @@ public class ViewPreview extends AbstractPreviewProvider { return "/com/fr/design/standard/preview/anab24.svg"; } + @Override + public String iconIdForPopupItem() { + return "data_analysis"; + } + @Override public int previewTypeCode() { return IOFile.ANA_PREVIEW_TYPE; diff --git a/designer-base/src/main/java/com/fr/design/preview/WritePreview.java b/designer-base/src/main/java/com/fr/design/preview/WritePreview.java index 8cac86f392..4778e072d3 100644 --- a/designer-base/src/main/java/com/fr/design/preview/WritePreview.java +++ b/designer-base/src/main/java/com/fr/design/preview/WritePreview.java @@ -28,6 +28,11 @@ public class WritePreview extends AbstractPreviewProvider { return "/com/fr/design/standard/preview/writeb24.svg"; } + @Override + public String iconIdForPopupItem() { + return "preview_write"; + } + @Override public int previewTypeCode() { return IOFile.WRITE_PREVIEW_TYPE; diff --git a/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java b/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java index b322cc910c..3f8cd7cc84 100644 --- a/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java +++ b/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java @@ -2,7 +2,6 @@ package com.fr.design.report; import com.fine.theme.light.ui.FineRoundBorder; import com.fine.theme.utils.FineUIScale; -import com.fine.theme.utils.FineUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.BaseFormula; @@ -100,27 +99,15 @@ public class WatermarkPane extends BasicPane { cell(previewPaneWrapper) ).getComponent(); - // 分割线 - JPanel separatorLine = new JPanel(); - separatorLine.setBorder(FineBorderFactory.createDefaultUnderlineBorder()); - - //在预览与配置外创建一个大的外边框并设置边距 - JPanel innerPanel = row( - LayoutConstants.HORIZONTAL_GAP, - cell(leftPane).weight(0.55), - cell(wrapComponentWithTitle(getRightPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Config"))).weight(0.45) - ).with(it -> it.setBorder(new ScaledEmptyBorder(10,10,10,10))).getComponent(); - JPanel outerPanel = new JPanel(new BorderLayout()); - outerPanel.setBorder(new FineRoundBorder()); - outerPanel.setBackground(FineUIUtils.getUIColor("fill.gray", "defaultBorderColor")); - outerPanel.add(innerPanel); - // 分割线下方,左侧预览,右侧配置 JPanel centerPanel = column(LayoutConstants.VERTICAL_GAP, - cell(separatorLine), - cell(outerPanel) + cell(new JPanel()).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder())), + row(LayoutConstants.HORIZONTAL_GAP, + cell(leftPane).weight(0.55), + cell(wrapComponentWithTitle(getRightPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Config"))).weight(0.45) + ) + ).with(it -> it.setBorder(new ScaledEmptyBorder(0, 10, 0, 10)) ).getComponent(); - centerPanel.setBorder(new ScaledEmptyBorder(0, 10, 0, 10)); this.add(centerPanel, BorderLayout.CENTER); } diff --git a/designer-base/src/main/java/com/fr/design/report/fit/FormFitConfigPane.java b/designer-base/src/main/java/com/fr/design/report/fit/FormFitConfigPane.java index acd8ee1f73..7ed82cd09a 100644 --- a/designer-base/src/main/java/com/fr/design/report/fit/FormFitConfigPane.java +++ b/designer-base/src/main/java/com/fr/design/report/fit/FormFitConfigPane.java @@ -1,7 +1,7 @@ package com.fr.design.report.fit; +import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineUIStyle; -import com.fr.base.svg.SVGLoader; import com.fr.design.constants.LayoutConstants; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; @@ -14,12 +14,10 @@ import com.fr.report.fit.ReportFitAttr; import javax.swing.JPanel; import javax.swing.JPopupMenu; import java.awt.BorderLayout; -import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.FontMetrics; import java.awt.Graphics; -import java.awt.Image; import java.awt.Rectangle; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -29,10 +27,8 @@ import static com.fine.swing.ui.layout.Layouts.column; public class FormFitConfigPane extends ReportFitConfigPane { private static final int ICON_OFFSET_X = 25; - private static final int ICON_OFFSET_Y = 3; + private static final int ICON_OFFSET_Y = 2; private static final int ICON_SIZE = 16; - //待调整 - private static final Image HOVER_IMAGE = SVGLoader.load("/com/fr/design/icon/icon_ec_default_fit.svg"); private static final int DEFAULT_ITEM = 0; private static final int CUSTOM_ITEM = 1; @@ -129,10 +125,14 @@ public class FormFitConfigPane extends ReportFitConfigPane { @Override public void paint(Graphics g) { super.paint(g); - g.drawImage(HOVER_IMAGE, calculateStartX() + ICON_OFFSET_X, ICON_OFFSET_Y, null); + new LazyIcon("detail").paintIcon(this, g, calculateStartX() + ICON_OFFSET_X, ICON_OFFSET_Y); } - private int calculateStartX() { + /** + * 默认文本宽度 + * @return + */ + private int calculateStartX() { FontMetrics metrics = this.getFontMetrics(this.getFont()); return metrics.stringWidth(this.getText()); } 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 6dfa381e81..c7c07ba412 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 @@ -1,9 +1,9 @@ package com.fr.design.write.submit; import com.fine.swing.ui.layout.Layouts; +import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineUIScale; import com.fr.base.BaseFormula; -import com.fr.base.BaseUtils; import com.fr.base.Parameter; import com.fr.data.DataConstants; import com.fr.data.condition.JoinCondition; @@ -100,8 +100,7 @@ import static com.fine.swing.ui.layout.Layouts.column; //august:这个东西应该分成两类,一类是有单元格的情况,一类是没有单元格的情况 public class DBManipulationPane extends BasicBeanPane { - private static final Image ICODS_IMAGE = BaseUtils.readImage("/com/fr/web/core/css/images/icons.png"); - private static final Icon HEIP_ICON = BaseUtils.createIcon(ICODS_IMAGE, 193, 1, 14, 14); + private static final Icon HEIP_ICON = new LazyIcon("jumpHelp"); private static final int DEFAULT_RETURN_VALUE = 4; public KeyColumnNameValueTable keyColumnValuesTable; private UIComboBox columnsComboBox; // 用于编辑ColumnName的Editor diff --git a/designer-base/src/main/java/com/fr/design/write/submit/SubmitJobListPane.java b/designer-base/src/main/java/com/fr/design/write/submit/SubmitJobListPane.java index d52eb4a653..e2ec70aa8d 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/SubmitJobListPane.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/SubmitJobListPane.java @@ -1,6 +1,7 @@ package com.fr.design.write.submit; +import com.fine.theme.icon.LazyIcon; import com.fr.data.ClassSubmitJob; import com.fr.data.SubmitJob; import com.fr.design.gui.controlpane.NameObjectCreator; @@ -29,12 +30,12 @@ public class SubmitJobListPane extends ObjectJControlPane { return new NameableCreator[] { new NameObjectCreator( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_Submit_Event"), - "/com/fr/web/images/reportlet.png", + new LazyIcon("dataLink"), DMLConfigJob.class, DMLJobPane.class), new NameObjectCreator( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_Custom_Event"), - "/com/fr/web/images/reportlet.png", + new LazyIcon("dataLink"), ClassSubmitJob.class, CustomSubmitJobPane.class) }; diff --git a/designer-base/src/main/resources/com/fine/theme/icon/dataLink.svg b/designer-base/src/main/resources/com/fine/theme/icon/dataLink.svg new file mode 100644 index 0000000000..bc2a927b5d --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/dataLink.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/dataLink_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/dataLink_disable.svg new file mode 100644 index 0000000000..89be86e4b6 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/dataLink_disable.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/datail_distable.svg b/designer-base/src/main/resources/com/fine/theme/icon/datail_distable.svg new file mode 100644 index 0000000000..0fefdfa57f --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/datail_distable.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/detail.svg b/designer-base/src/main/resources/com/fine/theme/icon/detail.svg new file mode 100644 index 0000000000..b0ee53820b --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/detail.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column.svg new file mode 100644 index 0000000000..f0b1cc1be4 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_disable.svg new file mode 100644 index 0000000000..d49305f380 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_disable.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean.svg new file mode 100644 index 0000000000..40abe4cfda --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_disable.svg new file mode 100644 index 0000000000..2b0ba115b2 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_disable.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double.svg new file mode 100644 index 0000000000..65deb2864a --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_disable.svg new file mode 100644 index 0000000000..ffd7070f02 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_disable.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/jumpHelp.svg b/designer-base/src/main/resources/com/fine/theme/icon/jumpHelp.svg new file mode 100644 index 0000000000..192bdfff9a --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/jumpHelp.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/jumpHelp_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/jumpHelp_disable.svg new file mode 100644 index 0000000000..93e997128b --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/jumpHelp_disable.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/preview/data_analysis.svg b/designer-base/src/main/resources/com/fine/theme/icon/preview/data_analysis.svg new file mode 100644 index 0000000000..aeb08470bb --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/preview/data_analysis.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/preview/data_analysis_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/preview/data_analysis_disable.svg new file mode 100644 index 0000000000..121e83b7d7 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/preview/data_analysis_disable.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_mobile.svg b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_mobile.svg new file mode 100644 index 0000000000..09ddf6647b --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_mobile.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_mobile_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_mobile_disable.svg new file mode 100644 index 0000000000..0e54c95410 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_mobile_disable.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_paging.svg b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_paging.svg new file mode 100644 index 0000000000..071efca7ef --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_paging.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_paging_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_paging_disable.svg new file mode 100644 index 0000000000..0eb39556ab --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_paging_disable.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_write.svg b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_write.svg new file mode 100644 index 0000000000..546387326d --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_write.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_write_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_write_disable.svg new file mode 100644 index 0000000000..2719a5b546 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/preview/preview_write_disable.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/switch.svg b/designer-base/src/main/resources/com/fine/theme/icon/switch.svg new file mode 100644 index 0000000000..7fa83df944 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/switch.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/appendRow.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/appendRow.svg new file mode 100644 index 0000000000..953db77f69 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/appendRow.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/appendRow_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/appendRow_disable.svg new file mode 100644 index 0000000000..b28d2f9478 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/appendRow_disable.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/deleteRow.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/deleteRow.svg new file mode 100644 index 0000000000..d328022023 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/deleteRow.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/deleteRow_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/deleteRow_disable.svg new file mode 100644 index 0000000000..3d952d2b18 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/deleteRow_disable.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/showValue.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/showValue.svg new file mode 100644 index 0000000000..5b1429fc2e --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/showValue.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/showValue_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/showValue_disable.svg new file mode 100644 index 0000000000..309252f6df --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/showValue_disable.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/stash.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/stash.svg new file mode 100644 index 0000000000..93bc93a173 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/stash.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/stash_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/stash_disable.svg new file mode 100644 index 0000000000..59cd126696 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/stash_disable.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/variable/dataItem.svg b/designer-base/src/main/resources/com/fine/theme/icon/variable/dataItem.svg new file mode 100644 index 0000000000..bd565d58c8 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/variable/dataItem.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/variable/dataItem_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/variable/dataItem_disable.svg new file mode 100644 index 0000000000..faaba60788 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/variable/dataItem_disable.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/variable/param_global.svg b/designer-base/src/main/resources/com/fine/theme/icon/variable/param_global.svg new file mode 100644 index 0000000000..b40cfa16b1 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/variable/param_global.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/variable/param_global_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/variable/param_global_disable.svg new file mode 100644 index 0000000000..bb283b3f54 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/variable/param_global_disable.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/variable/variable.svg b/designer-base/src/main/resources/com/fine/theme/icon/variable/variable.svg new file mode 100644 index 0000000000..b1694b5a14 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/variable/variable.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/variable/variable_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/variable/variable_disable.svg new file mode 100644 index 0000000000..828e64f724 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/variable/variable_disable.svg @@ -0,0 +1,5 @@ + + + + + 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 3e244648a4..9a2987e2d7 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 @@ -17,6 +17,10 @@ "remove": "remove.svg", "search": "search.svg", "add": "add.svg", + "detail": "detail.svg", + "dataLink": "dataLink.svg", + "jumpHelp": "jumpHelp.svg", + "switch": "switch.svg", "drag_left": "drag_left.svg", "drag_right": "drag_right.svg", "down_arrow": "down_arrow.svg", @@ -147,6 +151,10 @@ }, "clear": "clear.svg", "clear_hover": "clear_hover.svg", + "stash": "toolbar/stash.svg", + "appendRow": "toolbar/appendRow.svg", + "deleteRow": "toolbar/deleteRow.svg", + "showValue": "toolbar/showValue.svg", "tool_copy": "toolbar/copy.svg", "move_down": "toolbar/move_down.svg", "move_up": "toolbar/move_up.svg", @@ -299,6 +307,16 @@ "text_field": "widget/text_field.svg", "widget_tree": "widget/tree.svg", "ds_column_name": "editor/ds_column_name.svg", - "ds_column_index": "editor/ds_column_index.svg" + "ds_column_index": "editor/ds_column_index.svg", + "ds_column": "editor/ds_column.svg", + "type_double": "editor/type_double.svg", + "type_boolean": "editor/type_boolean.svg", + "preview_mobile": "preview/preview_mobile.svg", + "preview_paging": "preview/preview_paging.svg", + "preview_write": "preview/preview_write.svg", + "data_analysis": "preview/data_analysis.svg", + "variable": "variable/variable.svg", + "dataItem": "variable/dataItem.svg", + "param_global": "variable/param_global.svg" } } diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java index 58068d10a8..aadda3e77f 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java @@ -1,6 +1,6 @@ package com.fr.design.chartx.component; -import com.fr.base.BaseUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.chartx.TwoTuple; import com.fr.data.TableDataSource; import com.fr.data.TableDataSourceTailor; @@ -140,7 +140,7 @@ public class MapAreaMatchPane extends BasicBeanPane { } private void initRefreshLabel() { - Icon refreshImage = BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"); + Icon refreshImage = new LazyIcon("refresh"); refreshLabel = new UILabel(refreshImage); refreshLabel.addMouseListener(new MouseAdapter() { boolean mouseEntered = false; diff --git a/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java b/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java index e81c4de238..ab5a923ca8 100644 --- a/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java +++ b/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java @@ -1,6 +1,6 @@ package com.fr.design.module; -import com.fr.base.svg.IconUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.chart.web.ChartHyperPoplink; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateFloatLink; @@ -42,10 +42,10 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup { FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); NameableCreator[] related4ChartHyper = { - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), formHyperlink.getClass(), FormHyperlinkPane.class)}; + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), new LazyIcon("cellHyperLinkAttr"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), new LazyIcon("cellHyperLinkAttr"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), new LazyIcon("cellHyperLinkAttr"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), new LazyIcon("cellHyperLinkAttr"), formHyperlink.getClass(), FormHyperlinkPane.class)}; return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper); } diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/actions/ChangeNameAction.java b/designer-form/src/main/java/com/fr/design/designer/beans/actions/ChangeNameAction.java index 57c70a7662..2ababe3580 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/actions/ChangeNameAction.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/actions/ChangeNameAction.java @@ -3,7 +3,7 @@ */ package com.fr.design.designer.beans.actions; -import com.fr.base.BaseUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.design.mainframe.FormDesigner; import com.fr.design.designer.creator.XWidgetCreator; @@ -19,7 +19,7 @@ public class ChangeNameAction extends FormUndoableAction { this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Change_Widget_Name")); this.setMnemonic('G'); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); + this.setSmallIcon(new LazyIcon("refresh")); } /** diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 6f231c5a10..47265b50ae 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -6,7 +6,6 @@ import com.fr.base.Parameter; import com.fr.base.Releasable; import com.fr.base.extension.FileExtension; import com.fr.base.iofile.attr.ExtendSharableAttrMark; -import com.fr.base.svg.IconUtils; import com.fr.base.theme.FineColorSynchronizer; import com.fr.base.theme.FormTheme; import com.fr.base.theme.TemplateTheme; @@ -840,7 +839,7 @@ public class JForm extends JTemplate implements BaseJForm menuItems = new ArrayList(); PreviewProvider[] previewProviders = supportPreview(); for (final PreviewProvider provider : previewProviders) { - UIMenuItem item = new UIMenuItem(provider.nameForPopupItem(), IconUtils.readIcon(provider.iconPathForPopupItem())); + UIMenuItem item = new UIMenuItem(provider.nameForPopupItem(), new LazyIcon(provider.iconIdForPopupItem())); item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/designer-form/src/main/java/com/fr/design/preview/DeveloperPreview.java b/designer-form/src/main/java/com/fr/design/preview/DeveloperPreview.java index 4afacee781..300e44d043 100644 --- a/designer-form/src/main/java/com/fr/design/preview/DeveloperPreview.java +++ b/designer-form/src/main/java/com/fr/design/preview/DeveloperPreview.java @@ -36,6 +36,11 @@ public class DeveloperPreview extends AbstractPreviewProvider { return "/com/fr/design/standard/preview/developer_preview24.svg"; } + @Override + public String iconIdForPopupItem() { + return "default"; + } + @Override public int previewTypeCode() { return PREVIEW_TYPE; diff --git a/designer-form/src/main/java/com/fr/design/preview/FormAdaptivePreview.java b/designer-form/src/main/java/com/fr/design/preview/FormAdaptivePreview.java index b77d86620d..0ab571009b 100644 --- a/designer-form/src/main/java/com/fr/design/preview/FormAdaptivePreview.java +++ b/designer-form/src/main/java/com/fr/design/preview/FormAdaptivePreview.java @@ -26,6 +26,11 @@ public class FormAdaptivePreview extends AbstractPreviewProvider { return "com/fr/design/images/buttonicon/run24.png"; } + @Override + public String iconIdForPopupItem() { + return "default"; + } + @Override public int previewTypeCode() { return PREVIEW_TYPE; 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 954128f822..609a0740e7 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 @@ -3,7 +3,7 @@ */ package com.fr.design.actions.columnrow; -import com.fr.base.svg.IconUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.design.actions.CellSelectionAction; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.menu.MenuKeySet; @@ -11,7 +11,7 @@ import com.fr.design.menu.MenuKeySet; import com.fr.grid.selection.CellSelection; import com.fr.report.elementcase.ElementCase; -import javax.swing.*; +import javax.swing.KeyStroke; /** * Insert Column @@ -27,7 +27,7 @@ public class InsertColumnAction extends CellSelectionAction { this.setName(name); this.setMnemonic(INSERT_COLUMN.getMnemonic()); - this.setSmallIcon("/com/fr/design/images/m_insert/insertColumn"); + this.setSmallIcon(new LazyIcon("vertical_expand")); } 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 f05a71ffe7..ca24e3c137 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 @@ -3,7 +3,7 @@ */ package com.fr.design.actions.columnrow; -import com.fr.base.svg.IconUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.design.actions.CellSelectionAction; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.menu.MenuKeySet; @@ -11,7 +11,7 @@ import com.fr.design.menu.MenuKeySet; import com.fr.grid.selection.CellSelection; import com.fr.report.elementcase.ElementCase; -import javax.swing.*; +import javax.swing.KeyStroke; /** * Insert Row @@ -26,7 +26,7 @@ public class InsertRowAction extends CellSelectionAction { super(t); this.setName(name); this.setMnemonic(INSERT_ROW.getMnemonic()); - this.setSmallIcon("/com/fr/design/images/m_insert/insertRow"); + this.setSmallIcon(new LazyIcon("horizontal_expand")); } public static final MenuKeySet INSERT_ROW = new MenuKeySet() { diff --git a/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java b/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java index 8c27cff970..c8906b0e0b 100644 --- a/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java +++ b/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java @@ -1,8 +1,10 @@ package com.fr.design.javascript; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.constants.LayoutConstants; import com.fr.design.fun.JavaScriptActionProvider; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; @@ -18,9 +20,7 @@ import com.fr.js.JavaScript; import com.fr.report.web.util.ReportEngineEventMapping; import com.fr.write.JavaScriptResourceInfo; -import javax.swing.BorderFactory; import javax.swing.JPanel; -import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; @@ -30,8 +30,9 @@ import java.util.List; import java.util.Set; import static com.fine.swing.ui.layout.Layouts.cell; -import static com.fine.swing.ui.layout.Layouts.flex; +import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.swing.ui.layout.Layouts.flex; import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle; public class ListenerEditPane extends BasicBeanPane { @@ -68,9 +69,7 @@ public class ListenerEditPane extends BasicBeanPane { public void initComponents(String[] defaultArgs) { cards = new ArrayList<>(); this.setLayout(FRGUIPaneFactory.createBorderLayout()); - - JPanel namePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - nameText = new UITextField(8); + nameText = new UITextField(); nameText.setEditable(false); final List style = new ArrayList<>(Arrays.asList(JS, DBCOMMIT, CUSTOMACTION, EMAIL, MOBILEPOPUP)); styleBox = new UIComboBox(style.toArray()); @@ -79,12 +78,16 @@ public class ListenerEditPane extends BasicBeanPane { style.add(EXPORT); } styleBox = new UIComboBox(style.toArray()); - - JPanel eventName = row(10, cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event_Name"))), cell(nameText)).getComponent(); - JPanel eventType = row(10, cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event_Type"))), cell(styleBox)).getComponent(); - namePane = row(cell(eventName).weight(0.3), cell(eventType).weight(0.4), flex(0.3)).getComponent(); - - this.add(wrapComponentWithTitle(namePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event_Name_Type")), BorderLayout.NORTH); + //事件名 + JPanel eventName = row(LayoutConstants.HGAP_LARGE, + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event_Name"))), + cell(nameText).weight(1) + ).getComponent(); + //事件类型 + JPanel eventType = row(LayoutConstants.HGAP_LARGE, + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event_Type"))), + cell(styleBox)).getComponent(); + JPanel namePane = row(cell(eventName).weight(0.3), flex(0.1), cell(eventType).weight(0.5), flex(0.1)).getComponent(); card = new CardLayout(); hyperlinkPane = FRGUIPaneFactory.createCardLayout_S_Pane(); @@ -120,8 +123,13 @@ public class ListenerEditPane extends BasicBeanPane { } //其他事件 addOtherEvent(); - hyperlinkPane.setBorder(BorderFactory.createTitledBorder(Toolkit.i18nText("Fine-Design_Report_JavaScript_Set"))); - this.add(hyperlinkPane); + + //整体布局 + this.add(column(LayoutConstants.VERTICAL_GAP, + cell(wrapComponentWithTitle(namePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event_Name_Type"))), + cell(hyperlinkPane).weight(1) + ).with(it -> it.setBorder(new ScaledEmptyBorder(0, 10, 0, 10))).getComponent()); + styleBox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java index 66f97093e2..de1a637567 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe; +import com.fine.theme.icon.LazyIcon; import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignState; import com.fr.design.actions.UpdateAction; @@ -185,7 +186,7 @@ public class ElementCasePaneDelegate extends ElementCasePane { private void addInsertFloatMenuDef(MenuDef menuDef) { // 悬浮元素菜单 MenuDef subMenuDef = new MenuDef(KeySetUtils.INSERT_FLOAT.getMenuName()); - subMenuDef.setIconPath("/com/fr/design/images/m_insert/float_normal.svg"); + subMenuDef.setIcon(new LazyIcon("floatelement")); menuDef.addShortCut(subMenuDef); UpdateAction[] actions = ActionFactory.createFloatInsertAction(ElementCasePane.class, this); for (int i = 0; i < actions.length; i++) { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index a3d2a2136f..b972528be8 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -6,7 +6,6 @@ import com.fr.base.Parameter; import com.fr.base.ScreenResolution; import com.fr.base.TRL; import com.fr.base.extension.FileExtension; -import com.fr.base.svg.IconUtils; import com.fr.base.theme.FineColorSynchronizer; import com.fr.base.theme.ReportTheme; import com.fr.base.theme.TemplateTheme; @@ -983,7 +982,7 @@ public class JWorkBook extends JTemplate { List menuItems = new ArrayList(); PreviewProvider[] previewProviders = supportPreview(); for (final PreviewProvider provider : previewProviders) { - UIMenuItem item = new UIMenuItem(provider.nameForPopupItem(), IconUtils.readIcon(provider.iconPathForPopupItem())); + UIMenuItem item = new UIMenuItem(provider.nameForPopupItem(), new LazyIcon(provider.iconIdForPopupItem())); item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -1089,8 +1088,7 @@ public class JWorkBook extends JTemplate { */ public Icon getPreviewLargeIcon() { PreviewProvider provider = getPreviewType(); - String iconPath = provider.iconPathForLarge(); - return IconUtils.readIcon(iconPath); + return new LazyIcon(provider.iconIdForPopupItem(), 32); } /** diff --git a/designer-realize/src/main/java/com/fr/design/report/VerifierListPane.java b/designer-realize/src/main/java/com/fr/design/report/VerifierListPane.java index be8f1605e8..db243beaaa 100644 --- a/designer-realize/src/main/java/com/fr/design/report/VerifierListPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/VerifierListPane.java @@ -1,5 +1,6 @@ package com.fr.design.report; +import com.fine.theme.icon.LazyIcon; import com.fr.data.Verifier; import com.fr.design.ExtraDesignClassManager; import com.fr.design.fun.VerifyDefineProvider; @@ -35,7 +36,7 @@ public class VerifierListPane extends ObjectJControlPane { public NameableCreator[] createNameableCreators() { NameableCreator[] creators = new NameableCreator[]{ new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_BuildIn_Verify"), - "/com/fr/web/images/reportlet.png", + new LazyIcon("dataLink"), ValueVerifier.class, BuildInVerifierPane.class) }; @@ -51,7 +52,7 @@ public class VerifierListPane extends ObjectJControlPane { } creators = ArrayUtils.add(creators, new NameObjectCreator( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Custom_Verify"), - "/com/fr/web/images/reportlet.png", + new LazyIcon("dataLink"), WClassVerifier.class, CustomVerifierPane.class)); return creators; diff --git a/designer-realize/src/main/java/com/fr/design/report/WordExportPane.java b/designer-realize/src/main/java/com/fr/design/report/WordExportPane.java index cfef54ab32..5654cfc16c 100644 --- a/designer-realize/src/main/java/com/fr/design/report/WordExportPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/WordExportPane.java @@ -2,6 +2,7 @@ package com.fr.design.report; import com.fine.theme.utils.FineUIStyle; +import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.UIConstants; @@ -56,7 +57,7 @@ public class WordExportPane extends BasicPane { isExportAsTable = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Is_Need_Word_Adjust"), false); MultilineLabel wordLineLabel = new MultilineLabel(); wordLineLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alert_Word")); - wordLineLabel.setForeground(Color.GRAY); + wordLineLabel.setForeground(FlatUIUtils.getUIColor("Label.tipColor", Color.gray)); JPanel exportSettingPane = new JPanel(new BorderLayout()); exportSettingPane.add(column(LayoutConstants.VERTICAL_GAP, cell(isExportAsTable), cell(wordLineLabel)).getComponent()); diff --git a/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java b/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java index 4c7c03d2c5..359a06ba73 100644 --- a/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java @@ -1,7 +1,7 @@ package com.fr.design.report; -import com.fr.base.BaseUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.config.ServerPreferenceConfig; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; @@ -93,11 +93,7 @@ public class WriteShortCutsPane extends JPanel{ } private JPanel getSwitchBtnPane() { - UIButton switchbt = new UIButton(BaseUtils.readIcon("com/fr/design/images/buttonicon/switchShortCuts.png")) { - public Dimension getPreferredSize() { - return new Dimension(40, 30); - } - }; + UIButton switchbt = new UIButton(new LazyIcon("switch", new Dimension(36, 24))); switchbt.addActionListener(getListener()); switchbt.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Exchange_Key")); JPanel switchBtnPane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane(); diff --git a/designer-realize/src/main/java/com/fr/design/report/mobile/AppFitBrowserPane.java b/designer-realize/src/main/java/com/fr/design/report/mobile/AppFitBrowserPane.java index 59a29b5d93..dd903181c6 100644 --- a/designer-realize/src/main/java/com/fr/design/report/mobile/AppFitBrowserPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/mobile/AppFitBrowserPane.java @@ -3,6 +3,7 @@ package com.fr.design.report.mobile; import com.fr.base.mobile.MobileFitAttrState; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.constants.LayoutConstants; import com.fr.report.mobile.ElementCaseMobileAttr; import java.awt.BorderLayout; @@ -38,11 +39,9 @@ public class AppFitBrowserPane extends BasicBeanPane { ActionListener actionListener = getAppPreviewActionListener(); horizionPane.addActionListener(actionListener); verticalPane.addActionListener(actionListener); - this.add( - wrapComponentWithTitle((column(10, - row(cell(horizionPane)), - row(cell(verticalPane)) - ).getComponent()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fit"))); + this.add(wrapComponentWithTitle(column(LayoutConstants.VERTICAL_GAP, row(cell(horizionPane)), row(cell(verticalPane))).getComponent(), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fit")) + ); } public void setAppFitPreviewPane(AppFitPreviewPane appFitPreviewPane) { diff --git a/designer-realize/src/main/java/com/fr/design/report/mobile/MobileRadioGroupPane.java b/designer-realize/src/main/java/com/fr/design/report/mobile/MobileRadioGroupPane.java index d449dd1fcb..b110b85eed 100644 --- a/designer-realize/src/main/java/com/fr/design/report/mobile/MobileRadioGroupPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/mobile/MobileRadioGroupPane.java @@ -2,20 +2,19 @@ package com.fr.design.report.mobile; import com.fr.base.mobile.MobileFitAttrState; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.constants.LayoutConstants; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.stable.StringUtils; +import java.awt.BorderLayout; import javax.swing.ButtonGroup; -import java.awt.Component; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.List; import static com.fine.swing.ui.layout.Layouts.cell; -import static com.fine.swing.ui.layout.Layouts.flex; import static com.fine.swing.ui.layout.Layouts.row; -import static com.fine.swing.ui.layout.Layouts.fix; /** * Created by Administrator on 2016/5/16/0016. @@ -36,20 +35,14 @@ public class MobileRadioGroupPane extends BasicBeanPane{ IndexRadioButton notFitRadio = new IndexRadioButton(MobileFitAttrState.NONE.description(), MobileFitAttrState.NONE); addToButtonGroup(horizonRadio, verticalRadio, notFitRadio, bidirectionalRadio); - Component row = - row( + this.setLayout(new BorderLayout()); + this.add(row(LayoutConstants.HORIZONTAL_GAP, cell(new UILabel(title)), - fix(10), cell(horizonRadio), - fix(5), cell(verticalRadio), - fix(5), cell(bidirectionalRadio), - fix(5), - cell(notFitRadio), - flex() - ).getComponent(); - this.add(row); + cell(notFitRadio) + ).getComponent()); } private void addToButtonGroup(IndexRadioButton... radios) { diff --git a/designer-realize/src/main/java/com/fr/design/report/mobile/ReportMobileAttrPane.java b/designer-realize/src/main/java/com/fr/design/report/mobile/ReportMobileAttrPane.java index 93533777e2..8d58b63cb5 100644 --- a/designer-realize/src/main/java/com/fr/design/report/mobile/ReportMobileAttrPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/mobile/ReportMobileAttrPane.java @@ -18,8 +18,9 @@ import static com.fine.swing.ui.layout.Layouts.column; */ public class ReportMobileAttrPane extends BasicBeanPane{ - - private ReportMobileTemplateSettingsPane reportMobileTemplateSettingsPane; // 模版设置面板 + // 模版设置面板 + private ReportMobileTemplateSettingsPane reportMobileTemplateSettingsPane; + // 自适应面板 private AppFitBrowserPane appFitBrowserPane; // 其他 private MobileOthersPane mobileOthersPane; @@ -30,10 +31,13 @@ public class ReportMobileAttrPane extends BasicBeanPane{ private void initComponents() { this.setLayout(new BorderLayout()); + //预览效果面板 AppFitPreviewPane appFitPreviewPane = new AppFitPreviewPane(); reportMobileTemplateSettingsPane = new ReportMobileTemplateSettingsPane(); appFitBrowserPane = new AppFitBrowserPane(); appFitBrowserPane.setAppFitPreviewPane(appFitPreviewPane); + + //移动端属性整体面板 JPanel panel = new JPanel(new BorderLayout()); panel.add(column(LayoutConstants.VERTICAL_GAP, cell(reportMobileTemplateSettingsPane), diff --git a/designer-realize/src/main/java/com/fr/design/webattr/DragToolBarPane.java b/designer-realize/src/main/java/com/fr/design/webattr/DragToolBarPane.java index 5720e53232..496b368014 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/DragToolBarPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/DragToolBarPane.java @@ -1,5 +1,6 @@ package com.fr.design.webattr; +import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; @@ -26,6 +27,8 @@ import javax.swing.UIManager; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; +import java.awt.Dimension; +import java.awt.image.ImageObserver; import java.awt.datatransfer.Transferable; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -76,6 +79,7 @@ public class DragToolBarPane extends WidgetToolBarPane { //顶部工具栏 JPanel northContentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); northToolBar = new ToolBarPane(); + northToolBar.setPreferredSize(FineUIScale.scale(new Dimension(ImageObserver.WIDTH, 24))); northToolBar.setOpaque(false); northToolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, UIManager.getColor("defaultBorderColor"))); SettingToolBar top = new SettingToolBar(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ToolBar_Top"), northToolBar); @@ -91,6 +95,7 @@ public class DragToolBarPane extends WidgetToolBarPane { //底部工具栏 JPanel southContentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); southToolBar = new ToolBarPane(); + southToolBar.setPreferredSize(FineUIScale.scale(new Dimension(ImageObserver.WIDTH, 24))); southToolBar.setOpaque(false); southToolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, UIManager.getColor("defaultBorderColor"))); SettingToolBar bottom = new SettingToolBar(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ToolBar_Bottom"), southToolBar); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java index 0c1e2280ce..729b1e66b6 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java @@ -54,6 +54,7 @@ import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JSplitPane; +import javax.swing.JScrollPane; import javax.swing.ListCellRenderer; import javax.swing.SpinnerNumberModel; import javax.swing.SwingUtilities; @@ -155,8 +156,7 @@ public class EditToolBar extends BasicPane { list.setCellRenderer(render); list.addListSelectionListener(listSelectionListener); list.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE)); - list.setPreferredSize(FineUIScale.scale(new Dimension(-1, 380))); - leftPanel.add(list, BorderLayout.CENTER); + leftPanel.add(new JScrollPane(list), BorderLayout.CENTER); //添加外边框 leftPanel.setBorder(new FineRoundBorder()); if (listModel.getSize() > 0) { @@ -192,8 +192,8 @@ public class EditToolBar extends BasicPane { JPanel buttonColorGroupPane = createButtonColorGroup(); buttonColorGroupPane.setVisible(false); //样式设置面板布局,默认背景-按钮颜色 - backgroundPane.add(column(10, - row(10, cell(defaultCheckBox).weight(0.15), cell(bgButton).weight(0.2), flex(0.65)).weight(1), + backgroundPane.add(column(LayoutConstants.VERTICAL_GAP, + row(LayoutConstants.HORIZONTAL_GAP, cell(defaultCheckBox).weight(0.15), cell(bgButton).weight(0.2), flex(0.65)).weight(1), cell(buttonColorGroupPane).weight(1) ).getComponent()); @@ -203,8 +203,7 @@ public class EditToolBar extends BasicPane { //样式设置面板设置标题 JPanel styleSettingPane = new JPanel(new BorderLayout()); styleSettingPane.add(wrapComponentWithTitle(backgroundPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_ToolBar_Style_Setting"))); - styleSettingPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));; - this.add(column(cell(splitPane), cell(styleSettingPane)).getComponent()); + this.add(column(LayoutConstants.VERTICAL_GAP, cell(splitPane).weight(1), cell(styleSettingPane)).getComponent()); } ListCellRenderer render = new DefaultListCellRenderer() { diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java b/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java index 466f55e4d2..514b6b0dd7 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java @@ -62,7 +62,7 @@ public class ReportWebWidgetConstants { // 提交按钮 public static final WidgetOption SUBMIT = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Utils_Submit"), - BaseUtils.readIcon("/com/fr/web/images/save.png"), Submit.class); + new LazyIcon("save"), Submit.class); // flash打印按钮 public static final WidgetOption FLASHPRINT = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Utils_Print[Client]"), @@ -136,10 +136,10 @@ public class ReportWebWidgetConstants { //插入记录 public static final WidgetOption APPENDCOLUMNROW = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Insert_Record"), - BaseUtils.readIcon("/com/fr/web/images/appendRow.png"), AppendColumnRow.class); + new LazyIcon("appendRow"), AppendColumnRow.class); //删除记录 public static final WidgetOption DELETECOLUMNROW = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Delete_Record"), - BaseUtils.readIcon("/com/fr/web/images/deleteRow.png"), DeleteColumnRow.class); + new LazyIcon("deleteRow"), DeleteColumnRow.class); //数据校验 public static final WidgetOption VERIFY = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), @@ -147,7 +147,7 @@ public class ReportWebWidgetConstants { // show cell value 显示单元格值 public static final WidgetOption SHOWCELLVALUE = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Show_Cell_Value"), - BaseUtils.readIcon("/com/fr/web/images/showValue.png"), ShowCellValue.class); + new LazyIcon("showValue"), ShowCellValue.class); // import excel data 导入excel public static final WidgetOption IMPORTEXCELDATA = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Import_Excel_Data"), @@ -166,8 +166,8 @@ public class ReportWebWidgetConstants { new LazyIcon("customButton"), CustomToolBarButton.class); // 数据暂存 - public static final WidgetOption WRITESTASH = WidgetOptionFactory - .createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine-Write_Stash"), BaseUtils.readIcon("/com/fr/web/images/edit/stash.png"), StashButton.class); + public static final WidgetOption WRITESTASH = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine-Write_Stash"), + new LazyIcon("stash"), StashButton.class); // 数据清空 public static final WidgetOption WRITESTASHCLEAR = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine-Write_Clear"), diff --git a/designer-realize/src/main/java/com/fr/design/webattr/SettingToolBar.java b/designer-realize/src/main/java/com/fr/design/webattr/SettingToolBar.java index 75c17326e8..dbbc06ed20 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/SettingToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/SettingToolBar.java @@ -12,7 +12,7 @@ import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.Icon; import javax.swing.JPanel; -import java.awt.*; +import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -39,10 +39,11 @@ public class SettingToolBar extends JPanel { delButton.setAction(new DelAction()); this.add(row(LayoutConstants.HGAP_LARGE, - fix(LayoutConstants.HGAP_LARGE), + fix(LayoutConstants.HGAP_SMALL), cell(new UILabel(name)), cell(setButton), - cell(delButton) + cell(delButton), + fix(LayoutConstants.HGAP_SMALL) ).getComponent()); } diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java index b3e1e4e9f9..e375289d63 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java @@ -1,5 +1,6 @@ package com.fr.design.webattr; +import com.fine.theme.icon.LazyIcon; import com.fr.base.vcs.DesignerMode; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.DesignerContext; @@ -20,6 +21,10 @@ public class ToolBarButton extends UIButton implements MouseListener { public ToolBarButton(Icon icon, Widget widget) { this(null, icon, widget); + // 工具栏图标,取消其区域的背景填充,焦点边框 + this.setContentAreaFilled(false); + this.setFocusPainted(false); + this.setRequestFocusEnabled(false); } public ToolBarButton(String text, Icon icon, Widget widget) { @@ -27,6 +32,9 @@ public class ToolBarButton extends UIButton implements MouseListener { this.widget = widget; //直接设置Icon图标 setIcon(icon); + if (icon instanceof LazyIcon) { + setDisabledIcon(((LazyIcon) icon).disabled()); + } this.addMouseListener(this); setMargin(new Insets(0, 0, 0, 0)); } diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java index d7fbe0ac05..66ccb8cd61 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java @@ -2,6 +2,7 @@ package com.fr.design.webattr; import com.fine.theme.icon.LazyIcon; import com.fine.theme.light.ui.FineRoundBorder; +import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; @@ -20,6 +21,11 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.GraphDrawHelper; import com.fr.stable.StringUtils; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.Component; +import java.awt.Color; +import java.awt.image.ImageObserver; import javax.swing.Icon; import javax.swing.JOptionPane; import javax.swing.JPanel; @@ -32,9 +38,6 @@ import javax.swing.UIManager; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableColumnModel; -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; @@ -98,6 +101,8 @@ public class ToolBarDragPane extends WidgetToolBarPane { //顶部工具栏 JPanel northContentPane = new JPanel(new BorderLayout()); northToolBar = new ToolBarPane(); + //图标不垂直居中显示,超出宽度范围后在第二行显示,高度设置24可以看到第二行图标 + northToolBar.setPreferredSize(FineUIScale.scale(new Dimension(ImageObserver.WIDTH, 24))); northToolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, UIManager.getColor("defaultBorderColor"))); northToolBar.setOpaque(false); SettingToolBar top = new SettingToolBar(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ToolBar_Top"), northToolBar); @@ -171,6 +176,7 @@ public class ToolBarDragPane extends WidgetToolBarPane { //底部工具栏 JPanel southContentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); southToolBar = new ToolBarPane(); + southToolBar.setPreferredSize(FineUIScale.scale(new Dimension(ImageObserver.WIDTH, 24))); southToolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, UIManager.getColor("defaultBorderColor"))); southToolBar.setOpaque(false); SettingToolBar bottom = new SettingToolBar(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ToolBar_Bottom"), southToolBar); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java index 747d0a2b75..ef228699f6 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java @@ -13,7 +13,7 @@ import com.fr.report.web.annotation.OldPrintMethod; import javax.swing.BorderFactory; import javax.swing.SwingUtilities; import javax.swing.TransferHandler; -import java.awt.*; +import java.awt.Component; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.event.MouseAdapter; @@ -55,7 +55,6 @@ public class ToolBarPane extends BasicBeanPane { public void initComponent() { this.addMouseListener(listener); this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); - this.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2)); this.setTransferHandler(new ToolBarHandler(TransferHandler.COPY)); this.setBorder(BorderFactory.createTitledBorder("")); } diff --git a/designer-realize/src/main/java/com/fr/design/webattr/printsettings/AbstractNativePrintSettingPane.java b/designer-realize/src/main/java/com/fr/design/webattr/printsettings/AbstractNativePrintSettingPane.java index 6fe41a0d01..32a62c0a32 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/printsettings/AbstractNativePrintSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/printsettings/AbstractNativePrintSettingPane.java @@ -101,7 +101,7 @@ public abstract class AbstractNativePrintSettingPane extends JPanel { * @return */ private JPanel getHeaderPane() { - UILabel tipDownload = new UILabel("Fine-Design_Report_Tip_Native_Print_Need_Client"); + UILabel tipDownload = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Native_Print_Need_Client")); FineUIStyle.setStyle(tipDownload, FineUIStyle.LABEL_TIP); // 打印时需要打印设置窗口 showDialogCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Show_Print_Setting_Window_When_Printing")); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/printsettings/PrintSettingPane.java b/designer-realize/src/main/java/com/fr/design/webattr/printsettings/PrintSettingPane.java index f5cf1effb5..cfea458dc5 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/printsettings/PrintSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/printsettings/PrintSettingPane.java @@ -1,5 +1,6 @@ package com.fr.design.webattr.printsettings; +import com.fine.theme.utils.FineUIScale; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.print.PrintSettingsAttrMark; import com.fr.design.constants.LayoutConstants; @@ -12,6 +13,7 @@ import javax.swing.ButtonGroup; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.CardLayout; +import java.awt.Dimension; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; @@ -54,6 +56,7 @@ public class PrintSettingPane extends BasicPane { printPane.add(noClientPrintRadioButton.getText(), noClientPrintSettingPane); UIScrollPane scrollPane = new UIScrollPane(nativePrintSettingPane); + scrollPane.setPreferredSize(FineUIScale.scale(new Dimension(600, 400))); printPane.add(nativePrintRadioButton.getText(), scrollPane); JPanel allPanel = column(LayoutConstants.VERTICAL_GAP, cell(north), cell(printPane)).getComponent(); diff --git a/designer-realize/src/main/java/com/fr/design/widget/WidgetConfigPane.java b/designer-realize/src/main/java/com/fr/design/widget/WidgetConfigPane.java index 7d8f744e53..316f05920a 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/WidgetConfigPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/WidgetConfigPane.java @@ -1,5 +1,6 @@ package com.fr.design.widget; +import com.fine.theme.icon.LazyIcon; import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameableCreator; @@ -42,7 +43,7 @@ public class WidgetConfigPane extends JListControlPane { */ public NameableCreator[] createNameableCreators() { NameableCreator defaultWidget = new NameObjectCreator(WidgetConstants.USER_DEFINED_WIDGETCONFIG, - "/com/fr/design/images/data/user_widget.svg", UserDefinedWidgetConfig.class, + new LazyIcon("customButton"), UserDefinedWidgetConfig.class, UserDefinedWidgetConfigPane.class); return new NameableCreator[] { defaultWidget }; } diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java index 7d0dc693ec..38b4546c43 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java +++ b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java @@ -1,5 +1,6 @@ package com.fr.design.write.submit; +import com.fine.theme.icon.LazyIcon; import com.fr.cache.list.IntList; import com.fr.data.ClassSubmitJob; import com.fr.design.actions.UpdateAction; @@ -94,11 +95,11 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { public NameableCreator[] createNameableCreators() { return new NameableCreator[]{ new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Submit_Event"), - "/com/fr/web/images/reportlet.png", + new LazyIcon("dataLink"), DMLConfigJob.class, SmartInsertDMLJobPane.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Custom_Event"), - "/com/fr/web/images/reportlet.png", + new LazyIcon("dataLink"), ClassSubmitJob.class, CustomSubmitJobPane.class)}; } diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java index faf20088d5..afba738b69 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java +++ b/designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java @@ -1,5 +1,6 @@ package com.fr.design.write.submit; +import com.fine.theme.icon.LazyIcon; import com.fr.data.SubmitJob; import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.BasicBeanPane; @@ -12,7 +13,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.scrollruler.ModLineBorder; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; @@ -52,12 +52,12 @@ public class SubmitVisitorListPane extends ObjectJControlPane { public NameableCreator[] createNameableCreators() { return new NameableCreator[]{ new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Submit_Type_Build_In_Sql"), - "/com/fr/web/images/reportlet.png", + new LazyIcon("dataLink"), BuiltInSQLSubmiter.class, BuildInSQLPane.class), new NameObjectCreator( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Submit_Type_Custom"), - "/com/fr/web/images/reportlet.png", + new LazyIcon("dataLink"), WClassSubmiter.class, CustomPane.class) }; diff --git a/designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java b/designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java index d18e521106..b3ce28211f 100644 --- a/designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java +++ b/designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java @@ -3,6 +3,7 @@ */ package com.fr.poly.creator; +import com.fine.theme.icon.LazyIcon; import com.fr.base.TRL; import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignState; @@ -143,7 +144,7 @@ public class ECBlockPane extends PolyElementCasePane { private void addInsertFloatMenuDef(MenuDef menuDef) { // 悬浮元素菜单 MenuDef subMenuDef = new MenuDef(KeySetUtils.INSERT_FLOAT.getMenuName()); - subMenuDef.setIconPath("/com/fr/design/images/m_insert/float.png"); + subMenuDef.setIcon(new LazyIcon("floatelement")); menuDef.addShortCut(subMenuDef); UpdateAction[] actions = ActionFactory.createFloatInsertAction(ElementCasePane.class, this); for (int i = 0; i < actions.length; i++) { diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index d44a2d72f3..f245614f85 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -1,5 +1,6 @@ package com.fr.start.module; +import com.fine.theme.icon.LazyIcon; import com.fr.base.BaseFormula; import com.fr.base.Formula; import com.fr.base.MultiFieldParameter; @@ -7,7 +8,6 @@ import com.fr.base.OptimizeUtil; import com.fr.base.passport.FinePassportListenerAdapter; import com.fr.base.passport.FinePassportManager; import com.fr.base.process.ProcessOperator; -import com.fr.base.svg.IconUtils; import com.fr.base.theme.migrator.FormThemeConfigMigrator; import com.fr.base.theme.migrator.ReportThemeConfigMigrator; import com.fr.chart.chartattr.ChartCollection; @@ -342,12 +342,12 @@ public class DesignerActivator extends Activator implements Prepare { private static NameableCreator[] hyperlinkTypes() { return new NameableCreator[]{ - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), EmailJavaScript.class, EmailPane.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), MobilePopupHyperlink.class, MobilePopupPane.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), new LazyIcon("cellHyperLinkAttr"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), new LazyIcon("cellHyperLinkAttr"), EmailJavaScript.class, EmailPane.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), new LazyIcon("cellHyperLinkAttr"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), new LazyIcon("cellHyperLinkAttr"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), new LazyIcon("cellHyperLinkAttr"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup"), new LazyIcon("cellHyperLinkAttr"), MobilePopupHyperlink.class, MobilePopupPane.class), }; }