diff --git a/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java b/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java index 83d6e24ac8..a3e01ecf02 100644 --- a/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java +++ b/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java @@ -1,5 +1,6 @@ package com.fr.design.carton; +import com.fine.theme.utils.FineUIScale; import com.fr.decision.webservice.v10.log.download.utils.LogZipUtils; import com.fr.design.DesignerEnvManager; import com.fr.design.constants.UIConstants; @@ -87,7 +88,7 @@ public class FeedbackToolboxDialog extends JDialog { body.add(midPane, BorderLayout.CENTER); midPane.add(infoPane, BorderLayout.NORTH); Dimension dimension = new Dimension(662, 556); - body.setPreferredSize(dimension); + body.setPreferredSize(FineUIScale.scale(dimension)); this.body = body; } @@ -102,8 +103,8 @@ public class FeedbackToolboxDialog extends JDialog { } else { this.uiDatePicker = new UIDatePicker(UIDatePicker.STYLE_CN_DATE1, null, this); } - Dimension dimension = new Dimension(160, 100); - uiDatePicker.setPreferredSize(dimension); + Dimension dimension = new Dimension(100, 100); + uiDatePicker.setPreferredSize(FineUIScale.scale(dimension)); northPane.add(GUICoreUtils.createFlowPane(new Component[]{title, uiDatePicker}, FlowLayout.LEFT)); exportLogLabel = new UILabel(); exportLogLabel.setText(Toolkit.i18nText("Fine-Design_Basic_Carton_Export_Carton_Log")); 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..48f81a2d11 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 @@ -1,6 +1,7 @@ package com.fr.design.data.tabledata.tabledatapane; import com.fine.theme.icon.LazyIcon; +import com.fine.theme.utils.FineUIScale; import com.fr.base.Parameter; import com.fr.base.ParameterHelper; import com.fr.data.core.db.TableProcedure; @@ -44,7 +45,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 +54,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; @@ -247,10 +246,10 @@ public class DBTableDataPane extends AbstractTableDataPane implemen RTextScrollPane sqlTextScrollPane = new RTextScrollPane(this.sqlTextPane); sqlTextScrollPane.setLineNumbersEnabled(true); sqlTextScrollPane.setBorder(new UIRoundedBorder(UIManager.getColor("defaultBorderColor"), 1, UIConstants.ARC)); - sqlTextScrollPane.setPreferredSize(new Dimension(680, 600)); + sqlTextScrollPane.setPreferredSize(FineUIScale.scale(new Dimension(680, 600))); JPanel paraMeanPane = new JPanel(new BorderLayout()); - paraMeanPane.setPreferredSize(new Dimension(680, 90)); + paraMeanPane.setPreferredSize(FineUIScale.scale(new Dimension(680, 90))); UILabel paraMean = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Datasource_Param_DES")); paraMeanPane.add(paraMean, BorderLayout.CENTER); @@ -340,7 +339,7 @@ public class DBTableDataPane extends AbstractTableDataPane implemen this.barErrorTips.setVisible(false); esdSettingsBtn = new UIButton(Toolkit.i18nText("Fine-Design_ESD_Strategy_Config")); - esdSettingsBtn.setPreferredSize(new Dimension(72, 24)); + esdSettingsBtn.setPreferredSize(FineUIScale.scale(new Dimension(72, 24))); esdSettingsBtn.addActionListener(new ActionListener() { @Override @@ -583,7 +582,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 559539d940..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,7 +1,6 @@ package com.fr.design.formula; import com.fine.theme.icon.LazyIcon; -import com.fr.base.svg.IconUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.dialog.BasicDialog; @@ -16,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; @@ -25,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; @@ -35,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 { @@ -102,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"), - new LazyIcon("function_manage"), - 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 ccd7ecb45f..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,19 +3,13 @@ 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); diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java index 49aae6316e..96e8de72f8 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java @@ -37,7 +37,7 @@ public class ObjectProperiesPane extends BasicBeanPane { this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add") + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), new LazyIcon("add")); buttonPane.add(this.addButton, BorderLayout.WEST); - buttonPane.setPreferredSize(new Dimension(0, 24)); + buttonPane.setPreferredSize(FineUIScale.scale(new Dimension(0, 24))); //this.add(buttonPane, BorderLayout.NORTH); this.addButton.addActionListener(new ActionListener() { @@ -63,8 +63,8 @@ public class ObjectProperiesPane extends BasicBeanPane { centerPane.add(selectedItemScrollPane); //this.add(centerPane, BorderLayout.CENTER); this.add(column(4, - cell(buttonPane).weight(92), - cell(centerPane).weight(465) + cell(buttonPane), + cell(centerPane).weight(1.0) ).getComponent()); } diff --git a/designer-base/src/main/java/com/fr/design/gui/isplitpanedivider/UISplitPaneDivider.java b/designer-base/src/main/java/com/fr/design/gui/isplitpanedivider/UISplitPaneDivider.java index b8af71a528..997f2918bd 100644 --- a/designer-base/src/main/java/com/fr/design/gui/isplitpanedivider/UISplitPaneDivider.java +++ b/designer-base/src/main/java/com/fr/design/gui/isplitpanedivider/UISplitPaneDivider.java @@ -1,5 +1,6 @@ package com.fr.design.gui.isplitpanedivider; +import com.formdev.flatlaf.ui.FlatUIUtils; import com.fr.design.utils.ThemeUtils; import javax.swing.*; @@ -49,6 +50,17 @@ public class UISplitPaneDivider extends BasicSplitPaneDivider { } super.paint(g); + paintStyle( g, 0, 0, getWidth(), getHeight() ); + } + + protected void paintStyle( Graphics g, int x, int y, int width, int height ) { + + Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); + + //g.setColor( gripColor ); + //paintGrip( g, x, y, width, height ); + + FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } /** diff --git a/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java b/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java index 6b8e0e65b4..9334cc926d 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java @@ -1,5 +1,6 @@ package com.fr.design.gui.style; +import com.fine.theme.utils.FineUIScale; import com.fr.base.theme.TemplateTheme; import com.fr.design.dialog.BasicPane; import com.fr.design.event.UIObserver; @@ -45,7 +46,7 @@ public class FollowingThemePane extends BasicPane implements UIObserver { public FollowingThemePane(String name) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); followingThemeButtonGroup = new UIButtonGroup<>(FOLLOWING_THEME_STRING_ARRAYS); followingThemeButtonGroup.setAutoFireStateChanged(false); @@ -74,7 +75,7 @@ public class FollowingThemePane extends BasicPane implements UIObserver { double f = TableLayout.FILL; JPanel followingThemePane = TableLayoutHelper.createGapTableLayoutPane( new Component[][]{new Component[] { followingThemeLabel, FRGUIPaneFactory.createBorderLayoutNorthPaneWithComponent(followingThemeButtonGroup)}}, - new double[] { p }, new double[] { SETTING_LABEL_WIDTH, f }, 10, 0); + new double[] { p }, new double[] {FineUIScale.scale(SETTING_LABEL_WIDTH), f }, 10, 0); followingThemePane.setVisible(false); add(followingThemePane, BorderLayout.NORTH); 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 dabf9e44a2..3f3544ddb7 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 @@ -2,6 +2,7 @@ package com.fr.design.hyperlink; import com.fine.theme.utils.FineUIUtils; 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; @@ -119,7 +120,7 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane { this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 10)); tipsPane1 = new UILabel(); tipsPane1.setHorizontalAlignment(SwingConstants.LEFT); - tipsPane1.setForeground(Color.gray); + FineUIStyle.setStyle(tipsPane1, FineUIStyle.LABEL_WARNING_TIP); tipsPane2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Tips")); UILabel mainTextLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Content")); diff --git a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java index 6c2e46e985..9018c1fbc1 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java @@ -1,9 +1,10 @@ package com.fr.design.javascript; +import com.fine.theme.utils.FineUIScale; import com.fr.base.BaseFormula; import com.fr.base.Parameter; import com.fr.base.extension.FileExtension; -import com.fr.design.border.UITitledBorder; +import com.fr.design.constants.LayoutConstants; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; @@ -35,9 +36,12 @@ import com.fr.js.SingleJavaScript; import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.CardLayout; +import java.awt.Component; import javax.swing.AbstractButton; import javax.swing.AbstractCellEditor; -import javax.swing.BorderFactory; import javax.swing.ButtonGroup; import javax.swing.DefaultComboBoxModel; import javax.swing.JList; @@ -51,9 +55,6 @@ import javax.swing.event.TableModelEvent; import javax.swing.event.TableModelListener; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; -import java.awt.BorderLayout; -import java.awt.CardLayout; -import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; @@ -67,6 +68,12 @@ import java.util.HashSet; import java.util.List; import java.util.Map; +import static com.fine.swing.ui.layout.Layouts.cell; +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 ExportJavaScriptPane 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 1160ff1f09..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 @@ -3,7 +3,6 @@ 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; 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/update/ui/dialog/UpdateMainDialog.java b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java index 033e2cb07f..40a386ae30 100644 --- a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java +++ b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java @@ -1,5 +1,6 @@ package com.fr.design.update.ui.dialog; +import com.fine.theme.utils.FineUIScale; import com.fr.decision.update.data.UpdateConstants; import com.fr.decision.update.info.UpdateCallBack; import com.fr.decision.update.info.UpdateProgressCallBack; @@ -295,7 +296,7 @@ public class UpdateMainDialog extends UIDialog { loadingLabel = new LoadingLabel(); loadingLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Checking_Jar_Update")); updateButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Update")); - updateButton.setPreferredSize(UPDATE_BUTTON); + updateButton.setPreferredSize(FineUIScale.scale(UPDATE_BUTTON)); updateButton.setEnabled(false); double[] rowSize = {TableLayout.PREFERRED}; diff --git a/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java b/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java index 91d0421930..d7136660e7 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java @@ -43,16 +43,17 @@ public abstract class CustomJobPane extends BasicBeanPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(); + classNameTextField.setPreferredSize(FineUIScale.scale(new Dimension(0, 24))); UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); browserButton.setPreferredSize(new Dimension( GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40, - classNameTextField.getPreferredSize().height)); + FineUIScale.scale(24))); UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); editButton.setPreferredSize(new Dimension( GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40, - classNameTextField.getPreferredSize().height)); + FineUIScale.scale(24))); UITextArea area = new UITextArea(2, 1); @@ -95,22 +96,21 @@ public abstract class CustomJobPane extends BasicBeanPane { reportletNamePane.setLayout(new BorderLayout()); reportletNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); - reportletNamePane.setPreferredSize(new Dimension(0, FineUIScale.scale(24))); + //reportletNamePane.setPreferredSize(new Dimension(0, FineUIScale.scale(24))); reportletNamePane.add(row(4, - cell(classNameTextField).weight(222), - cell(browserButton).weight(48), - cell(editButton).weight(48), - flex(139) - ).getComponent()); + cell(classNameTextField).weight(1.0), + cell(browserButton), + cell(editButton) + ).getComponent(), BorderLayout.CENTER); objectProperiesPane = new ObjectProperiesPane(); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); dsPane.add(area); this.add(column(20, - cell(FineUIUtils.wrapComponentWithTitle(reportletNamePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"))).weight(55), - cell(FineUIUtils.wrapComponentWithTitle(objectProperiesPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"))).weight(227), - cell(FineUIUtils.wrapComponentWithTitle(dsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description"))).weight(71) + cell(FineUIUtils.wrapComponentWithTitle(reportletNamePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"))), + cell(FineUIUtils.wrapComponentWithTitle(objectProperiesPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"))).weight(1.0), + cell(FineUIUtils.wrapComponentWithTitle(dsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description"))) ).getComponent()); checkAddButtonEnable(); } 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 0629c729e3..5de1d0d052 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,10 +1,11 @@ package com.fr.design.write.submit; import com.fine.swing.ui.layout.Layouts; +import com.fine.theme.icon.LazyIcon; +import com.fine.swing.ui.layout.Spacer; import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIUtils; 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; @@ -17,8 +18,10 @@ import com.fr.design.constants.UIConstants; import com.fr.design.data.datapane.ChoosePaneSupportFormula; import com.fr.design.data.datapane.DataBaseItems; import com.fr.design.data.tabledata.tabledatapane.FormatExplanationPane; +import com.fr.design.dialog.AttrScrollPane; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; +import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.editor.ValueEditorPane; @@ -95,14 +98,14 @@ import java.util.EventObject; import java.util.List; import java.util.stream.Collectors; +import static com.fine.swing.ui.layout.Layouts.fix; 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.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 @@ -160,36 +163,42 @@ public class DBManipulationPane extends BasicBeanPane { cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type"))), cell(dmlConfigComboBox)).getComponent()); chooseTable = new ChoosePaneSupportFormula(); - chooseTable.setTableNameComboBoxPopSize(160, 320); + chooseTable.setTableNameComboBoxPopSize(FineUIScale.scale(160), FineUIScale.scale(320)); // peter:编辑的TablePane JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180)); keyColumnValuesTable = new KeyColumnNameValueTable(); - editTablePane.add(new UIScrollPane(this.keyColumnValuesTable), BorderLayout.CENTER); + editTablePane.add(new UIScrollPane(keyColumnValuesTable), BorderLayout.CENTER); keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); - keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 150)); + keyColumnValuesTable.setPreferredScrollableViewportSize(FineUIScale.scale(new Dimension(280, 150))); keyColumnValuesTable.setShowHorizontalLines(true); DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer(); headerRenderer.setHorizontalAlignment(SwingConstants.LEFT); keyColumnValuesTable.getTableHeader().setDefaultRenderer(headerRenderer); - northPane.add(column(10, true, + northPane.add(column(10, cell(FineUIUtils.wrapComponentWithTitle(typePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))), cell(FineUIUtils.wrapComponentWithTitle(chooseTable, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table")))) .getComponent()); - - this.add(column(10, true, - cell(northPane), - cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value")))) - .getComponent()); + JPanel bottomPane = initBottomPane(); + this.add(new AttrScrollPane() { + @Override + protected JPanel createContentPane() { + JPanel contentPane = new JPanel(new BorderLayout()); + contentPane.add(column(10, + cell(northPane), + cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))), + cell(bottomPane)) + .getComponent(), BorderLayout.CENTER); + return contentPane; + } + }); initJTableColumn(); addButtons(editTablePane); - addBottomPane(); - addListeners(); } @@ -257,18 +266,19 @@ public class DBManipulationPane extends BasicBeanPane { UpdateCheckBox.setEnabled(b); } - private void addBottomPane() { - JPanel eventPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - eventPane.add(addEventButton()); + private JPanel initBottomPane() { + JPanel eventPane = new JPanel(new BorderLayout()); + eventPane.setPreferredSize(createControlBtnPanePreferredSize()); + eventPane.add(addEventButton(), BorderLayout.WEST); JPanel conditionPane = this.createConditionPane(); JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); - btPane.add(column( + btPane.add(column(5, cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))), cell(eventPane) ).getComponent()); - this.add(btPane, BorderLayout.SOUTH); + return btPane; } private UIButton addEventButton() { @@ -296,7 +306,6 @@ public class DBManipulationPane extends BasicBeanPane { private JPanel createConditionPane() { JPanel conditionPane = new JPanel(); - conditionPane.setPreferredSize(createConditionPanePreferredSize()); setBorderAndLayout(conditionPane); @@ -308,7 +317,7 @@ public class DBManipulationPane extends BasicBeanPane { DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer(); cr.setForeground(UIConstants.NORMAL_BACKGROUND); JScrollPane jp = new JScrollPane(conditionsTree); - + jp.setPreferredSize(FineUIScale.scale(new Dimension(0, 40))); UIButton addSubmitConditionButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition")); addSubmitConditionButton.addActionListener(new ActionListener() { @Override @@ -337,12 +346,12 @@ public class DBManipulationPane extends BasicBeanPane { } }); - JPanel controlBtnPane = new JPanel(new GridLayout(1, 1, 4, 4)); - controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize()); - controlBtnPane.add(addSubmitConditionButton); + JPanel controlBtnPane = new JPanel(new BorderLayout()); + controlBtnPane.setPreferredSize(FineUIScale.scale(new Dimension(122, 20))); + controlBtnPane.add(addSubmitConditionButton, BorderLayout.NORTH); conditionPane.add(row( - cell(jp).weight(0.76), - column(cell(controlBtnPane).weight(0.4),cell(new UILabel()).weight(0.6)).weight(0.24) + cell(jp).weight(1.0), + cell(new Spacer(122).add(controlBtnPane)) ).getComponent()); return conditionPane; @@ -358,7 +367,7 @@ public class DBManipulationPane extends BasicBeanPane { protected Dimension createConditionPanePreferredSize() { - return new Dimension(454, 80); + return FineUIScale.scale(new Dimension(454, 80)); } protected Dimension createControlBtnPanePreferredSize() { 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/java/com/fr/env/detect/ui/EnvDetectorDialog.java b/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java index f7ede9f1a0..05f33310ab 100644 --- a/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java +++ b/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java @@ -1,5 +1,9 @@ package com.fr.env.detect.ui; +import com.fine.theme.light.ui.FineRoundBorder; +import com.fine.theme.utils.FineUIStyle; +import com.fine.theme.utils.FineUIUtils; +import com.formdev.flatlaf.ui.FlatUIUtils; import com.fr.base.svg.IconUtils; import com.fr.design.components.notification.NotificationDialog; import com.fr.design.components.notification.NotificationDialogProperties; @@ -9,6 +13,7 @@ import com.fr.design.constants.DesignerColor; import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButtonUI; +import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; @@ -111,7 +116,7 @@ public class EnvDetectorDialog extends JDialog { this.body = FRGUIPaneFactory.createBorderLayout_L_Pane(); Color backgroundColor = new Color(240, 240, 243, 1); - this.body.setBackground( backgroundColor); + //this.body.setBackground( backgroundColor); this.headerPanel = createHeaderPanel(); body.add(headerPanel, BorderLayout.NORTH); @@ -141,7 +146,7 @@ public class EnvDetectorDialog extends JDialog { JPanel headerPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); headerPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 12, 0)); - this.detectButton = new UIButton(buttonStatus.getDesc()) { + this.detectButton = new UIToggleButton(buttonStatus.getDesc()) { @Override public ButtonUI getUI() { @@ -162,7 +167,6 @@ public class EnvDetectorDialog extends JDialog { }; } }; - detectButton.setForeground(Color.WHITE); detectButton.setToolTipText(buttonStatus.getDesc()); detectButton.addActionListener(event -> { if (buttonStatus.isNotExecuting()) { @@ -171,9 +175,9 @@ public class EnvDetectorDialog extends JDialog { stopDetecting(detectButton); } }); - detectButton.setPreferredSize(new Dimension(68, 20)); - detectButton.setBorderPainted(false); - detectButton.setContentAreaFilled(false); + detectButton.setForeground(Color.WHITE); + detectButton.setBackground(new Color(65, 155, 249)); + headerPanel.add(detectButton, BorderLayout.WEST); UILabel openUtilBoxLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Carton_Feedback_ToolBox")); 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 6313715ca7..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", @@ -26,7 +30,6 @@ "time": "time.svg", "logo": "logo.svg", "pages": "pages.svg", - "page": "page.svg", "digitalPlatform": "digitalPlatform.svg", "tables": "tables.svg", "views": "views.svg", @@ -143,12 +146,15 @@ "image": "insert/image.svg", "bias": "insert/bias.svg", "sub_report": "insert/sub_report.svg", - "float_normal": "insert/float_normal.svg", "popup": { "normal": "popup/popup.svg" }, "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", @@ -302,9 +308,15 @@ "widget_tree": "widget/tree.svg", "ds_column_name": "editor/ds_column_name.svg", "ds_column_index": "editor/ds_column_index.svg", - "user_widget": "widget/user_widget.svg", - "advanced_editor": "param/advanced_editor.svg", - "function_manage": "function_manage.svg", - "newline": "newline.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 88a691423b..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"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), 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 b1f0caadbf..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 @@ -186,7 +186,7 @@ public class ElementCasePaneDelegate extends ElementCasePane { private void addInsertFloatMenuDef(MenuDef menuDef) { // 悬浮元素菜单 MenuDef subMenuDef = new MenuDef(KeySetUtils.INSERT_FLOAT.getMenuName()); - subMenuDef.setIcon(new LazyIcon("float_normal")); + 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/NewReportBackgroundPane.java b/designer-realize/src/main/java/com/fr/design/report/NewReportBackgroundPane.java index d1ab8dbc5c..633b9aa699 100644 --- a/designer-realize/src/main/java/com/fr/design/report/NewReportBackgroundPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/NewReportBackgroundPane.java @@ -118,14 +118,14 @@ public class NewReportBackgroundPane extends BasicPane { JPanel uiLabelPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Background_Fill")); - uiLabel.setPreferredSize(new Dimension(24,24)); + uiLabel.setPreferredSize(FineUIScale.scale(new Dimension(24,24))); uiLabelPane.add(uiLabel, BorderLayout.NORTH); uiLabelPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); backgroundPane = new ReportBackgroundSpecialPane(); - backgroundPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0)); + backgroundPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 10)); backgroundLabeledPane = TableLayoutHelper.createCommonTableLayoutPane( new Component[][]{ new Component[] { uiLabelPane, backgroundPane } }, - new double[] { p }, new double[] { SETTING_LABEL_WIDTH, f}, IntervalConstants.INTERVAL_L1 + new double[] { p }, new double[] { FineUIScale.scale(SETTING_LABEL_WIDTH), f}, IntervalConstants.INTERVAL_L1 ); themePane.addFollowThemePane(backgroundLabeledPane, new FollowingThemePane.FollowingThemeActionChangeListener() { @Override @@ -148,7 +148,7 @@ public class NewReportBackgroundPane extends BasicPane { 10, Layouts.row(10, Layouts.cell(createLeftPane()), Layouts.cell(createRightPane())) ).getComponent(); - contentContainer.setPreferredSize(new Dimension(600, 540)); + contentContainer.setPreferredSize(FineUIScale.scale(new Dimension(600, 540))); addAttributeChangeListener(new AttributeChangeListener() { @Override diff --git a/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java b/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java index ef4c2966b7..55ec0a9887 100644 --- a/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java @@ -26,6 +26,8 @@ import javax.swing.ButtonGroup; import javax.swing.JSpinner; import javax.swing.SpinnerNumberModel; import javax.swing.JFormattedTextField; + +import com.fine.theme.utils.FineUIScale; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.constants.LayoutConstants; import com.fr.design.gui.frpane.FineTabbedPane; @@ -683,7 +685,7 @@ public class PageSetupPane extends BasicPane { public ShowPagePane() { this.setSize(pane_width, pane_height); - this.setPreferredSize(new Dimension(pane_width, pane_height)); + this.setPreferredSize(FineUIScale.scale(new Dimension(pane_width, pane_height))); this.setBackground(new Color(128, 128, 128));// background // color. this.setOpaque(false); 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 b896fd4cbe..232ebc2e1d 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 @@ -3,6 +3,7 @@ package com.fr.design.report; import com.fine.theme.utils.FineUIUtils; 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; @@ -85,11 +86,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 456e01be73..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 @@ -43,7 +43,7 @@ public class WidgetConfigPane extends JListControlPane { */ public NameableCreator[] createNameableCreators() { NameableCreator defaultWidget = new NameObjectCreator(WidgetConstants.USER_DEFINED_WIDGETCONFIG, - new LazyIcon("user_widget"), 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 ceb90d5d51..ff46e08971 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.fine.theme.utils.FineUIUtils; import com.fr.data.SubmitJob; import com.fr.design.ExtraDesignClassManager; @@ -53,12 +54,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 7ff9797069..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 @@ -144,7 +144,7 @@ public class ECBlockPane extends PolyElementCasePane { private void addInsertFloatMenuDef(MenuDef menuDef) { // 悬浮元素菜单 MenuDef subMenuDef = new MenuDef(KeySetUtils.INSERT_FLOAT.getMenuName()); - subMenuDef.setIcon(new LazyIcon("float_normal")); + 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), }; }