From 3450bc55e0a54c865e02062fed12203dbf16b93c Mon Sep 17 00:00:00 2001 From: "Richard.Fang" Date: Wed, 7 Aug 2024 17:00:49 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-127436=E3=80=90NewUI=E3=80=91fix:?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF/=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F/editor=E7=9B=B8=E5=85=B3=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2&=E6=9C=AA=E7=BD=AE=E9=A1=B6=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E4=BF=AE=E5=A4=8D&=E9=A2=84=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=9B=BE=E6=A0=87=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../preview/sql/PreviewPerformedSqlPane.java | 4 + .../tabledatapane/DBTableDataPane.java | 8 ++ .../com/fr/design/editor/ValueEditorPane.java | 1 + .../design/editor/editor/BooleanEditor.java | 2 +- .../editor/editor/ColumnIndexEditor.java | 2 +- .../editor/editor/ColumnNameEditor.java | 2 +- .../design/editor/editor/ColumnRowEditor.java | 2 +- .../editor/editor/ColumnSelectedEditor.java | 2 +- .../fr/design/editor/editor/DateEditor.java | 2 +- .../design/editor/editor/FormulaEditor.java | 2 +- .../design/editor/editor/IntegerEditor.java | 2 +- .../fr/design/editor/editor/NumberEditor.java | 2 +- .../editor/editor/OldColumnIndexEditor.java | 2 +- .../design/editor/editor/ParameterEditor.java | 2 +- .../editor/editor/SpinnerIntegerEditor.java | 2 +- .../fr/design/editor/editor/TextEditor.java | 2 +- .../gui/core/UserDefinedWidgetOption.java | 4 +- .../com/fr/design/gui/core/WidgetOption.java | 3 +- .../design/gui/core/WidgetOptionFactory.java | 3 +- .../widget/editors/DataBindingEditor.java | 2 +- .../widget/editors/DataTableEditor.java | 2 +- .../com/fr/design/widget/IconDefinePane.java | 8 ++ .../write/submit/DBManipulationPane.java | 14 +-- .../theme/icon/editor/bind_column_popup.svg | 16 ++++ .../icon/editor/bind_column_popup_diable.svg | 16 ++++ .../theme/icon/editor/cellelement_popup.svg | 11 +++ .../icon/editor/cellelement_popup_disable.svg | 11 +++ .../com/fine/theme/icon/editor/date_popup.svg | 16 ++++ .../theme/icon/editor/date_popup_disable.svg | 16 ++++ ...{ds_column_index.svg => dsColumnIndex.svg} | 0 ..._disable.svg => dsColumnIndex_disable.svg} | 0 .../theme/icon/editor/dsColumnIndex_popup.svg | 11 +++ .../editor/dsColumnIndex_popup_disable.svg | 11 +++ .../{ds_column_name.svg => dsColumnName.svg} | 0 ...e_disable.svg => dsColumnName_disable.svg} | 0 .../theme/icon/editor/dsColumnName_popup.svg | 11 +++ .../editor/dsColumnName_popup_disable.svg | 11 +++ .../fine/theme/icon/editor/param_popup.svg | 12 +++ .../theme/icon/editor/param_popup_disable.svg | 12 +++ .../theme/icon/editor/type_boolean_popup.svg | 12 +++ .../editor/type_boolean_popup_disable.svg | 12 +++ .../theme/icon/editor/type_double_popup.svg | 19 ++++ .../icon/editor/type_double_popup_disable.svg | 19 ++++ .../theme/icon/filetree/filetype/svgFile.svg | 9 ++ .../filetree/filetype/svgFile_disable.svg | 9 ++ .../fine/theme/icon/insert/formula_popup.svg | 12 +++ .../icon/insert/formula_popup_disable.svg | 12 +++ .../icon/propertiestab/floatelement_popup.svg | 18 ++++ .../floatelement_popup_disable.svg | 18 ++++ .../com/fine/theme/icon/saveFile.svg | 3 + .../com/fine/theme/icon/saveFile_disable.svg | 3 + .../fine/theme/icon/toolbar/filter_popup.svg | 13 ++- .../icon/toolbar/filter_popup_disable.svg | 11 +++ .../com/fine/theme/icon/toolbar/saveAs.svg | 6 +- .../theme/icon/toolbar/saveAs_disable.svg | 6 +- .../theme/icon/widget/prewidget_popup.svg | 16 ++++ .../icon/widget/prewidget_popup_disable.svg | 16 ++++ .../fine/theme/light/ui/fine_light.icon.json | 19 +++- .../fr/design/designer/creator/XButton.java | 5 ++ .../fr/design/designer/creator/XCheckBox.java | 5 ++ .../designer/creator/XCheckBoxGroup.java | 5 ++ .../fr/design/designer/creator/XComboBox.java | 7 +- .../designer/creator/XComboCheckBox.java | 5 ++ .../fr/design/designer/creator/XCreator.java | 4 + .../designer/creator/XCreatorUtils.java | 4 + .../design/designer/creator/XDateEditor.java | 7 +- .../fr/design/designer/creator/XLabel.java | 5 ++ .../design/designer/creator/XNameWidget.java | 14 ++- .../designer/creator/XNumberEditor.java | 5 ++ .../fr/design/designer/creator/XPassword.java | 5 ++ .../design/designer/creator/XRadioGroup.java | 5 ++ .../fr/design/designer/creator/XTextArea.java | 5 ++ .../design/designer/creator/XTextEditor.java | 5 ++ .../designer/creator/XTreeComboBoxEditor.java | 7 +- .../design/designer/creator/XTreeEditor.java | 6 +- .../designer/creator/XWidgetCreator.java | 89 ++++++++++++------- .../fr/design/form/parameter/XFormSubmit.java | 2 +- .../com/fr/design/mainframe/FormParaPane.java | 4 +- .../actions/file/export/CSVExportAction.java | 4 +- .../export/EmbeddedExportExportAction.java | 4 +- .../actions/file/export/SVGExportAction.java | 4 +- .../fr/design/mainframe/ElementCasePane.java | 3 +- .../com/fr/design/webattr/EditToolBar.java | 8 ++ .../com/fr/design/webattr/SettingToolBar.java | 8 ++ 84 files changed, 603 insertions(+), 84 deletions(-) create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/bind_column_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/bind_column_popup_diable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/cellelement_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/cellelement_popup_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/date_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/date_popup_disable.svg rename designer-base/src/main/resources/com/fine/theme/icon/editor/{ds_column_index.svg => dsColumnIndex.svg} (100%) rename designer-base/src/main/resources/com/fine/theme/icon/editor/{ds_column_index_disable.svg => dsColumnIndex_disable.svg} (100%) create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex_popup_disable.svg rename designer-base/src/main/resources/com/fine/theme/icon/editor/{ds_column_name.svg => dsColumnName.svg} (100%) rename designer-base/src/main/resources/com/fine/theme/icon/editor/{ds_column_name_disable.svg => dsColumnName_disable.svg} (100%) create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName_popup_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/param_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/param_popup_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_popup_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_popup_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/filetree/filetype/svgFile.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/filetree/filetype/svgFile_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/insert/formula_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/insert/formula_popup_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/propertiestab/floatelement_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/propertiestab/floatelement_popup_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/saveFile.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/saveFile_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/toolbar/filter_popup_disable.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/widget/prewidget_popup.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/widget/prewidget_popup_disable.svg diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java index b4218705dc..96a7f12a9b 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java @@ -162,6 +162,10 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener { public void windowClosing(WindowEvent e) { close(); } + @Override + public void windowActivated(WindowEvent e) { + toFront(); + } }); GUICoreUtils.centerWindow(this); 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 480ba20aad..cf0b739337 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 @@ -62,6 +62,8 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import org.jetbrains.annotations.NotNull; import javax.swing.BorderFactory; @@ -647,6 +649,12 @@ public class DBTableDataPane extends AbstractTableDataPane implemen checkParameter(); } }); + dialog.addWindowListener(new WindowAdapter() { + @Override + public void windowActivated(WindowEvent e) { + dialog.toFront(); + } + }); dialog.setVisible(true); } } diff --git a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java index b19e243850..354dc0313e 100644 --- a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java @@ -129,6 +129,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName if (this.cards.length == 1) { this.remove(arrowButton); } + } public void setCurrentEditor(Class editorClass) { 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 902a45d31d..1ce1b369a6 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 @@ -108,7 +108,7 @@ public class BooleanEditor extends Editor { @Override public String getIconId() { - return "type_boolean"; + return "type_boolean_popup"; } @Override 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 d9b2f1a2f7..ebd16e5d60 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 @@ -59,7 +59,7 @@ public class ColumnIndexEditor extends Editor { @Override public String getIconId(){ - return "ds_column_index"; + return "dsColumnIndex_popup"; } /** 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 54f833b279..06dcca4ae5 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 @@ -78,7 +78,7 @@ public class ColumnNameEditor extends ColumnIndexEditor { @Override public String getIconId() { - return "ds_column_name"; + return "dsColumnName_popup"; } } \ 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 1fe29722f0..baa55e6b40 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 @@ -70,7 +70,7 @@ public class ColumnRowEditor extends Editor { @Override public String getIconId() { - return "cellelement"; + return "cellelement_popup"; } @Override 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 00b92731b8..e6ffbadd66 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 @@ -89,7 +89,7 @@ public class ColumnSelectedEditor extends Editor implements Prep @Override public String getIconId() { - return "ds_column"; + return "bind_column_popup"; } @Override 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 c2ca7f3a9b..00e75b9e51 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 @@ -171,7 +171,7 @@ public class DateEditor extends Editor { @Override public String getIconId() { - return "date"; + return "date_popup"; } public void setUIDatePickerStyle(int style){ 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 207562146f..860534cb5c 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 @@ -142,7 +142,7 @@ public class FormulaEditor extends Editor { @Override public String getIconId() { - return "formula"; + return "formula_popup"; } /** 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 1c956719bb..db72713eb7 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 @@ -37,7 +37,7 @@ public class IntegerEditor extends NumberEditor { @Override public String getIconId(){ - return "ds_column_index"; + return "dsColumnIndex_popup"; } @Override 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 9d049b08f0..632beff71f 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 @@ -112,7 +112,7 @@ public abstract class NumberEditor extends Editor { @Override public String getIconId(){ - return "type_double"; + return "type_double_popup"; } /** 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 e0361a7971..31a194d4c2 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 @@ -107,7 +107,7 @@ public class OldColumnIndexEditor extends Editor { @Override public String getIconId() { - return "ds_column"; + return "bind_column_popup"; } @Override 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 3f399d1c98..cc02ceea50 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 @@ -58,7 +58,7 @@ public class ParameterEditor extends Editor { @Override public String getIconId() { - return "param"; + return "param_popup"; } @Override 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 c3eb305a50..03ba990b42 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 @@ -49,7 +49,7 @@ public class SpinnerIntegerEditor extends Editor { @Override public String getIconId(){ - return "ds_column_index"; + return "dsColumnIndex_popup"; } KeyListener textKeyListener = new KeyAdapter() { 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 3108bbdd19..e3d0300bd9 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 @@ -149,7 +149,7 @@ public class TextEditor extends Editor { @Override public String getIconId() { - return "ds_column_name"; + return "dsColumnName_popup"; } /** diff --git a/designer-base/src/main/java/com/fr/design/gui/core/UserDefinedWidgetOption.java b/designer-base/src/main/java/com/fr/design/gui/core/UserDefinedWidgetOption.java index 40490702de..301c518355 100644 --- a/designer-base/src/main/java/com/fr/design/gui/core/UserDefinedWidgetOption.java +++ b/designer-base/src/main/java/com/fr/design/gui/core/UserDefinedWidgetOption.java @@ -1,8 +1,8 @@ package com.fr.design.gui.core; +import com.fine.theme.icon.LazyIcon; import javax.swing.Icon; -import com.fr.base.BaseUtils; import com.fr.form.ui.NameWidget; import com.fr.form.ui.Widget; @@ -21,7 +21,7 @@ public class UserDefinedWidgetOption extends WidgetOption { @Override public Icon optionIcon() { - return BaseUtils.readIcon("/com/fr/design/images/data/user_widget.png"); + return new LazyIcon("customButton"); } @Override diff --git a/designer-base/src/main/java/com/fr/design/gui/core/WidgetOption.java b/designer-base/src/main/java/com/fr/design/gui/core/WidgetOption.java index 5c6babf640..2dc0d630fc 100644 --- a/designer-base/src/main/java/com/fr/design/gui/core/WidgetOption.java +++ b/designer-base/src/main/java/com/fr/design/gui/core/WidgetOption.java @@ -1,5 +1,6 @@ package com.fr.design.gui.core; +import com.fine.theme.icon.LazyIcon; import com.fr.base.BaseUtils; import com.fr.form.ui.Button; import com.fr.form.ui.CheckBox; @@ -113,7 +114,7 @@ public abstract class WidgetOption implements Serializable { String name = nameIt.next(); WidgetConfig widgetConfig = mgr.getWidgetConfig(name); if (widgetConfig instanceof UserDefinedWidgetConfig) { - list.add(WidgetOptionFactory.createByWidgetClass(name, BaseUtils.readIcon("/com/fr/design/images/data/user_widget.png"), + list.add(WidgetOptionFactory.createByWidgetClass(name, new LazyIcon("customButton"), ((UserDefinedWidgetConfig) widgetConfig).getWidget().getClass())); } } diff --git a/designer-base/src/main/java/com/fr/design/gui/core/WidgetOptionFactory.java b/designer-base/src/main/java/com/fr/design/gui/core/WidgetOptionFactory.java index 9834d995a2..e58e9a4edf 100644 --- a/designer-base/src/main/java/com/fr/design/gui/core/WidgetOptionFactory.java +++ b/designer-base/src/main/java/com/fr/design/gui/core/WidgetOptionFactory.java @@ -1,7 +1,6 @@ package com.fr.design.gui.core; import com.fine.theme.icon.LazyIcon; -import com.fr.base.BaseUtils; import com.fr.base.svg.IconUtils; import com.fr.form.ui.Widget; @@ -10,7 +9,7 @@ import javax.swing.Icon; public class WidgetOptionFactory { public static WidgetOption createByWidgetClass(String optionName, Class widgetClass) { - return new CustomWidgetOption(optionName, BaseUtils.readIcon("/com/fr/design/images/data/user_widget.png"), widgetClass); + return new CustomWidgetOption(optionName, new LazyIcon("customButton"), widgetClass); } public static WidgetOption createByWidgetClass(String optionName, Icon optionIcon, Class widgetClass) { 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 1a56928251..829292bf40 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 @@ -159,6 +159,6 @@ public class DataBindingEditor extends Editor { @Override public String getIconId() { - return "bind_column"; + return "bind_column_popup"; } } 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 d52d600a31..76ba836ca1 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 @@ -83,7 +83,7 @@ public class DataTableEditor extends Editor { @Override public String getIconId() { - return "bind_column"; + return "bind_column_popup"; } } diff --git a/designer-base/src/main/java/com/fr/design/widget/IconDefinePane.java b/designer-base/src/main/java/com/fr/design/widget/IconDefinePane.java index cface962b6..f22f1eb0a6 100644 --- a/designer-base/src/main/java/com/fr/design/widget/IconDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/widget/IconDefinePane.java @@ -11,6 +11,8 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.web.CustomIconPane; import com.fr.form.ui.WidgetInfoConfig; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import javax.swing.Icon; import javax.swing.JPanel; import javax.swing.ImageIcon; @@ -47,6 +49,12 @@ public class IconDefinePane extends BasicPane { IconDefinePane.this.repaint(); } }); + editDialog.addWindowFocusListener(new WindowAdapter() { + @Override + public void windowGainedFocus(WindowEvent e) { + editDialog.toFront(); + } + }); editDialog.setVisible(true); } }); 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 b9aad8551e..605d84b40e 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 @@ -21,7 +21,6 @@ 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; @@ -39,7 +38,6 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.javascript.JavaScriptActionPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; -import com.fr.design.scrollruler.ModLineBorder; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.general.DateUtils; @@ -56,8 +54,9 @@ import com.fr.write.config.InsertConfig; import com.fr.write.config.IntelliDMLConfig; import com.fr.write.config.UpdateConfig; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import javax.swing.AbstractCellEditor; -import javax.swing.BorderFactory; import javax.swing.DefaultCellEditor; import javax.swing.DefaultComboBoxModel; import javax.swing.Icon; @@ -80,8 +79,6 @@ import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; import java.awt.FlowLayout; -import java.awt.GridLayout; -import java.awt.Image; import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -98,7 +95,6 @@ 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; @@ -345,6 +341,12 @@ public class DBManipulationPane extends BasicBeanPane { refreshConditionList(); } }); + dialog.addWindowFocusListener(new WindowAdapter() { + @Override + public void windowGainedFocus(WindowEvent e) { + dialog.toFront(); + } + }); dialog.setVisible(true); } }); diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/bind_column_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/bind_column_popup.svg new file mode 100644 index 0000000000..bcd71fb0f2 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/bind_column_popup.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/bind_column_popup_diable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/bind_column_popup_diable.svg new file mode 100644 index 0000000000..fc9d1026f1 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/bind_column_popup_diable.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/cellelement_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/cellelement_popup.svg new file mode 100644 index 0000000000..c127f55106 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/cellelement_popup.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/cellelement_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/cellelement_popup_disable.svg new file mode 100644 index 0000000000..ebb08ad44a --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/cellelement_popup_disable.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/date_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/date_popup.svg new file mode 100644 index 0000000000..a2eb69bb6e --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/date_popup.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/date_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/date_popup_disable.svg new file mode 100644 index 0000000000..e23f132741 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/date_popup_disable.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_index.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex.svg similarity index 100% rename from designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_index.svg rename to designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex.svg diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_index_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex_disable.svg similarity index 100% rename from designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_index_disable.svg rename to designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex_disable.svg diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex_popup.svg new file mode 100644 index 0000000000..a33796e5b2 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex_popup.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex_popup_disable.svg new file mode 100644 index 0000000000..ce15b5e060 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnIndex_popup_disable.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_name.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName.svg similarity index 100% rename from designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_name.svg rename to designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName.svg diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_name_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName_disable.svg similarity index 100% rename from designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_name_disable.svg rename to designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName_disable.svg diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName_popup.svg new file mode 100644 index 0000000000..c3fc1f8340 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName_popup.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName_popup_disable.svg new file mode 100644 index 0000000000..979d386e8b --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/dsColumnName_popup_disable.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/param_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/param_popup.svg new file mode 100644 index 0000000000..c9b5eb0be4 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/param_popup.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/param_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/param_popup_disable.svg new file mode 100644 index 0000000000..d149d239e3 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/param_popup_disable.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_popup.svg new file mode 100644 index 0000000000..ee6835ce2e --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_popup.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_popup_disable.svg new file mode 100644 index 0000000000..ac36746fb4 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_boolean_popup_disable.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_popup.svg new file mode 100644 index 0000000000..0beab4511b --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_popup.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_popup_disable.svg new file mode 100644 index 0000000000..460ea67827 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/editor/type_double_popup_disable.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/filetree/filetype/svgFile.svg b/designer-base/src/main/resources/com/fine/theme/icon/filetree/filetype/svgFile.svg new file mode 100644 index 0000000000..639a7cea91 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/filetree/filetype/svgFile.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/filetree/filetype/svgFile_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/filetree/filetype/svgFile_disable.svg new file mode 100644 index 0000000000..0ac3765b6d --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/filetree/filetype/svgFile_disable.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/insert/formula_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/insert/formula_popup.svg new file mode 100644 index 0000000000..f3a13f1e43 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/insert/formula_popup.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/insert/formula_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/insert/formula_popup_disable.svg new file mode 100644 index 0000000000..2516806535 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/insert/formula_popup_disable.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/propertiestab/floatelement_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/propertiestab/floatelement_popup.svg new file mode 100644 index 0000000000..c5febced52 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/propertiestab/floatelement_popup.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/propertiestab/floatelement_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/propertiestab/floatelement_popup_disable.svg new file mode 100644 index 0000000000..e0d55fca02 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/propertiestab/floatelement_popup_disable.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/saveFile.svg b/designer-base/src/main/resources/com/fine/theme/icon/saveFile.svg new file mode 100644 index 0000000000..6da83ea77d --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/saveFile.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/saveFile_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/saveFile_disable.svg new file mode 100644 index 0000000000..cdc9c4b08d --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/saveFile_disable.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/filter_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/filter_popup.svg index f5dec3450d..e294913b77 100644 --- a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/filter_popup.svg +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/filter_popup.svg @@ -1,4 +1,11 @@ - - - + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/filter_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/filter_popup_disable.svg new file mode 100644 index 0000000000..2b0ef959ff --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/filter_popup_disable.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/saveAs.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/saveAs.svg index 059e2e6b42..c3a40df4e7 100644 --- a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/saveAs.svg +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/saveAs.svg @@ -1,5 +1,5 @@ - + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/saveAs_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/saveAs_disable.svg index fcfb30eaa4..4b78d6919d 100644 --- a/designer-base/src/main/resources/com/fine/theme/icon/toolbar/saveAs_disable.svg +++ b/designer-base/src/main/resources/com/fine/theme/icon/toolbar/saveAs_disable.svg @@ -1,5 +1,5 @@ - + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/widget/prewidget_popup.svg b/designer-base/src/main/resources/com/fine/theme/icon/widget/prewidget_popup.svg new file mode 100644 index 0000000000..82e36dce39 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/widget/prewidget_popup.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/widget/prewidget_popup_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/widget/prewidget_popup_disable.svg new file mode 100644 index 0000000000..6fe7b6b711 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/widget/prewidget_popup_disable.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + 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 5353466cbf..f80479a974 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 @@ -6,6 +6,7 @@ "icons": { "cut": "cut.svg", "save": "save.svg", + "saveFile": "saveFile.svg", "copy": "copy.svg", "formatBrush": "formatBrush.svg", "paste": "paste.svg", @@ -90,6 +91,8 @@ "wordFile": "filetree/filetype/wordFile.svg", "xlsFile": "filetree/filetype/xlsFile.svg", "xmlFile": "filetree/filetype/xmlFile.svg", + "csvFile": "filetree/filetype/csvFile.svg", + "svgFile": "filetree/filetype/svgFile.svg", "cellattr": "propertiestab/cellattr.svg", "cellattr_disabled": "propertiestab/cellattr_disabled.svg", "cellattr_selected": "propertiestab/cellattr_selected.svg", @@ -100,7 +103,7 @@ "conditionattr_disabled": "propertiestab/conditionattr_disabled.svg", "conditionattr_selected": "propertiestab/conditionattr_selected.svg", "floatelement": "propertiestab/floatelement.svg", - "floatelement_disabled": "propertiestab/floatelement_disabled.svg", + "floatelement_popup": "propertiestab/floatelement_popup.svg", "floatelement_selected": "propertiestab/floatelement_selected.svg", "hyperlink": "propertiestab/hyperlink.svg", "hyperlink_disabled": "propertiestab/hyperlink_disabled.svg", @@ -145,6 +148,7 @@ "text": "insert/text.svg", "richtext": "insert/richtext.svg", "formula": "insert/formula.svg", + "formula_popup": "insert/formula_popup.svg", "chart": "insert/chart.svg", "image": "insert/image.svg", "bias": "insert/bias.svg", @@ -313,15 +317,24 @@ "widget_preview": "widget/preview.svg", "apply_components": "widget/apply_components.svg", "prewidget": "widget/prewidget.svg", + "prewidget_popup": "widget/prewidget_popup.svg", "tab": "widget/tab.svg", "text_area": "widget/text_area.svg", "text_field": "widget/text_field.svg", "widget_tree": "widget/tree.svg", - "ds_column_name": "editor/ds_column_name.svg", - "ds_column_index": "editor/ds_column_index.svg", + "dsColumnName": "editor/dsColumnName.svg", + "dsColumnName_popup": "editor/dsColumnName_popup.svg", + "dsColumnIndex": "editor/dsColumnIndex.svg", + "dsColumnIndex_popup": "editor/dsColumnIndex_popup.svg", "ds_column": "editor/ds_column.svg", "type_double": "editor/type_double.svg", + "type_double_popup": "editor/type_double_popup.svg", "type_boolean": "editor/type_boolean.svg", + "type_boolean_popup": "editor/type_boolean_popup.svg", + "date_popup": "editor/date_popup.svg", + "param_popup": "editor/param_popup.svg", + "cellelement_popup": "editor/cellelement_popup.svg", + "bind_column_popup": "editor/bind_column_popup.svg", "preview_mobile": "preview/preview_mobile.svg", "preview_paging": "preview/preview_paging.svg", "preview_write": "preview/preview_write.svg", diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XButton.java b/designer-form/src/main/java/com/fr/design/designer/creator/XButton.java index 894a8ebdad..fa41aaa270 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XButton.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XButton.java @@ -298,6 +298,11 @@ public class XButton extends XWidgetCreator { return "button_16.png"; } + @Override + public String getIconId() { + return "button"; + } + /** * data属性改变触发其他操作 */ diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBox.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBox.java index da9b7c9552..07c4a1ee50 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBox.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBox.java @@ -81,6 +81,11 @@ public class XCheckBox extends XWidgetCreator { return "check_box_16.png"; } + @Override + public String getIconId() { + return "check_box"; + } + public void firePropertyChange() { ((UICheckBox) editor).setText(((CheckBox) data).getText()); ValueInitializer value = ((CheckBox) data).getWidgetValue(); diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBoxGroup.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBoxGroup.java index 086b8c3e71..71cdb8e42d 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBoxGroup.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBoxGroup.java @@ -90,6 +90,11 @@ public class XCheckBoxGroup extends XFieldEditor { return "checkbox_group_16.png"; } + @Override + public String getIconId() { + return "checkbox_group"; + } + @Override public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { return new WidgetPropertyUIProvider[] {new ButtonGroupPropertyUI(this)}; diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XComboBox.java b/designer-form/src/main/java/com/fr/design/designer/creator/XComboBox.java index 22393ca847..71ca85cf87 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XComboBox.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XComboBox.java @@ -53,7 +53,7 @@ public class XComboBox extends XCustomWriteAbleRepeatEditor { UITextField textField = new UITextField(5); textField.setOpaque(false); editor.add(textField, BorderLayout.CENTER); - btn = new LimpidButton("", this.getIconPath(), toData().isVisible() ? FULL_OPACITY : HALF_OPACITY); + btn = new LimpidButton("", this.getIconPath(), this.getIconId(), toData().isVisible() ? FULL_OPACITY : HALF_OPACITY); btn.setPreferredSize(new Dimension(21, 21)); btn.setOpaque(true); editor.add(btn, BorderLayout.EAST); @@ -67,6 +67,11 @@ public class XComboBox extends XCustomWriteAbleRepeatEditor { return "combo_box_16.png"; } + @Override + public String getIconId() { + return "combo_box"; + } + protected void makeVisible(boolean visible) { btn.makeVisible(visible); } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XComboCheckBox.java b/designer-form/src/main/java/com/fr/design/designer/creator/XComboCheckBox.java index 241c11bb94..46eca1254d 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XComboCheckBox.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XComboCheckBox.java @@ -52,4 +52,9 @@ public class XComboCheckBox extends XComboBox { protected String getIconName() { return "combo_check_16.png"; } + + @Override + public String getIconId() { + return "combo_check"; + } } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index 792e97045e..4b84b90399 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -281,6 +281,10 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo return "/com/fr/web/images/form/resources/" + getIconName(); } + public String getIconId() { + return StringUtils.EMPTY; + } + /** * 返回组件默认名 * @return 组件类名(小写) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java index 4cb42a04ce..b0a1bc53b6 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java @@ -3,6 +3,7 @@ */ package com.fr.design.designer.creator; +import com.fine.theme.icon.LazyIcon; import com.fr.base.chart.BaseChartCollection; import com.fr.base.svg.IconUtils; import com.fr.base.theme.FineColorSynchronizer; @@ -381,6 +382,9 @@ public class XCreatorUtils { * @return 组件icon */ public static Icon getCreatorIcon(XCreator creator) { + if (StringUtils.isNotEmpty(creator.getIconId())) { + return new LazyIcon(creator.getIconId()); + } String iconPath = creator.getIconPath(); if (StringUtils.isEmpty(iconPath)) { return null; diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XDateEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XDateEditor.java index 38da20da62..2784af891f 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XDateEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XDateEditor.java @@ -116,7 +116,7 @@ public class XDateEditor extends XDirectWriteEditor { if (editor == null) { editor = FRGUIPaneFactory.createBorderLayout_S_Pane(); editor.add(textField = new UITextField(5), BorderLayout.CENTER); - btn = new LimpidButton(StringUtils.EMPTY, this.getIconPath(), toData().isVisible() ? FULL_OPACITY : HALF_OPACITY); + btn = new LimpidButton(StringUtils.EMPTY, this.getIconPath(), this.getIconId(), toData().isVisible() ? FULL_OPACITY : HALF_OPACITY); btn.setPreferredSize(new Dimension(21, 21)); editor.add(btn, BorderLayout.EAST); textField.setOpaque(false); @@ -130,6 +130,11 @@ public class XDateEditor extends XDirectWriteEditor { return "date_16.png"; } + @Override + public String getIconId() { + return "date"; + } + protected void makeVisible(boolean visible) { btn.makeVisible(visible); } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XLabel.java b/designer-form/src/main/java/com/fr/design/designer/creator/XLabel.java index 3993c4daa7..c6638e129b 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XLabel.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XLabel.java @@ -146,4 +146,9 @@ public class XLabel extends XWidgetCreator { return "label_16.png"; } + @Override + public String getIconId() { + return "label"; + } + } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XNameWidget.java b/designer-form/src/main/java/com/fr/design/designer/creator/XNameWidget.java index 2cc20e111a..3b9e81a970 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XNameWidget.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XNameWidget.java @@ -13,8 +13,13 @@ import com.fr.form.ui.WidgetInfoConfig; import com.fr.general.FRFont; import com.fr.stable.core.PropertyChangeAdapter; -import javax.swing.*; -import java.awt.*; +import javax.swing.SwingConstants; +import javax.swing.JComponent; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Color; +import java.awt.BorderLayout; import java.beans.IntrospectionException; public class XNameWidget extends XWidgetCreator { @@ -81,6 +86,11 @@ public class XNameWidget extends XWidgetCreator { return "user_widget.png"; } + @Override + public String getIconId() { + return "customButton"; + } + /** * 属性改变后,重新构建控件 */ diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java index 8861d6fcbc..bf87480137 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java @@ -104,6 +104,11 @@ public class XNumberEditor extends XWrapperedFieldEditor { return "number_field_16.png"; } + @Override + public String getIconId() { + return "number_field"; + } + @Override public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { return new WidgetPropertyUIProvider[]{new NumberEditorMobilePropertyUI(this)}; diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XPassword.java b/designer-form/src/main/java/com/fr/design/designer/creator/XPassword.java index 29de6c9d05..8c53749b85 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XPassword.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XPassword.java @@ -40,6 +40,11 @@ public class XPassword extends XWrapperedFieldEditor { return "password_field_16.png"; } + @Override + public String getIconId() { + return "password_field"; + } + /** * 控件的属性列表 * diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XRadioGroup.java b/designer-form/src/main/java/com/fr/design/designer/creator/XRadioGroup.java index 879c833996..7ca44bdff3 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XRadioGroup.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XRadioGroup.java @@ -86,6 +86,11 @@ public class XRadioGroup extends XFieldEditor { return "button_group_16.png"; } + @Override + public String getIconId() { + return "button_group"; + } + @Override public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { return new WidgetPropertyUIProvider[] {new ButtonGroupPropertyUI(this)}; diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java b/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java index 88d0391ceb..b3ceff4e3e 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java @@ -85,6 +85,11 @@ public class XTextArea extends XWrapperedFieldEditor { return "text_area_16.png"; } + @Override + public String getIconId() { + return "text_area"; + } + @Override public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { return new WidgetPropertyUIProvider[]{new TextAreaMobilePropertyUI(this)}; diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java index a1aca00ed0..1d123f2307 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java @@ -84,6 +84,11 @@ public class XTextEditor extends XWrapperedFieldEditor { return "text_field_16.png"; } + @Override + public String getIconId() { + return "text_field"; + } + @Override public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { return new WidgetPropertyUIProvider[]{new TextEditorMobilePropertyUI(this)}; diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XTreeComboBoxEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XTreeComboBoxEditor.java index d7e1c2d37b..cd5fffbb22 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XTreeComboBoxEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XTreeComboBoxEditor.java @@ -33,7 +33,7 @@ public class XTreeComboBoxEditor extends XTreeEditor { UITextField textField = new UITextField(5); textField.setOpaque(false); editor.add(textField, BorderLayout.CENTER); - btn = new LimpidButton("", this.getIconPath(), toData().isVisible() ? FULL_OPACITY : HALF_OPACITY); + btn = new LimpidButton("", this.getIconPath(), this.getIconId(), toData().isVisible() ? FULL_OPACITY : HALF_OPACITY); btn.setPreferredSize(new Dimension(21, 21)); btn.setOpaque(true); editor.add(btn, BorderLayout.EAST); @@ -65,6 +65,11 @@ public class XTreeComboBoxEditor extends XTreeEditor { return "comboboxtree.png"; } + @Override + public String getIconId() { + return "comboboxtree"; + } + protected void makeVisible(boolean visible) { btn.makeVisible(visible); } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XTreeEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XTreeEditor.java index 872a1e97d2..c2f2e3d0d7 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XTreeEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XTreeEditor.java @@ -123,5 +123,9 @@ public class XTreeEditor extends XWidgetCreator { protected String getIconName() { return "tree_16.png"; } - + + @Override + public String getIconId() { + return "widget_tree"; + } } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java index 590aea3395..5a7c926b76 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java @@ -3,6 +3,7 @@ */ package com.fr.design.designer.creator; +import com.fine.theme.icon.LazyIcon; import com.fr.base.BaseUtils; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.form.util.XCreatorConstants; @@ -10,12 +11,14 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.Widget; import com.fr.log.FineLoggerFactory; +import com.fr.stable.StringUtils; import com.fr.stable.core.PropertyChangeAdapter; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; -import javax.swing.JOptionPane; +import javax.swing.Icon; +import java.awt.image.BufferedImage; import java.awt.AlphaComposite; import java.awt.Color; import java.awt.Composite; @@ -105,6 +108,7 @@ public abstract class XWidgetCreator extends XCreator { private String name; private String imagePath; private float opacity = 0.4f; + private String iconId; public LimpidButton(String name, String imagePath, float opacity) { this.name = name; @@ -113,48 +117,71 @@ public abstract class XWidgetCreator extends XCreator { this.draw(); } + public LimpidButton(String name, String imagePath, String iconId, float opacity) { + this.name = name; + this.imagePath = imagePath; + this.opacity = opacity; + this.iconId = iconId; + this.draw(); + } + public void draw() { try { - ImageIcon imageIcon = (ImageIcon) BaseUtils.readIcon(imagePath); - Image img = imageIcon.getImage(); - MediaTracker mt = new MediaTracker(this); - int w = 21; - int h = 21; - mt.addImage(img, 0); - mt.waitForAll(); - GraphicsConfiguration gc = new JFrame().getGraphicsConfiguration(); // 本地图形设备 - Image image = gc.createCompatibleImage(w, h, Transparency.TRANSLUCENT);//建立透明画布 - Graphics2D g = (Graphics2D) image.getGraphics(); //在画布上创建画笔 - - Composite alpha = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f); //指定透明度为半透明90% - g.setComposite(alpha); - g.drawImage(img, 0, 0, this); //注意是,将image画到g画笔所在的画布上 - g.setColor(Color.black);//设置颜色为黑色 - g.drawString(name, 25, 20);//写字 - g.dispose(); //释放内存 - - Composite alpha2 = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity); - Image image1 = gc.createCompatibleImage(w, h, Transparency.TRANSLUCENT); - g = (Graphics2D) image1.getGraphics(); - g.setComposite(alpha2); - g.drawImage(img, 2, 2, this); //改变图像起始位置,产生动态效果 - g.setColor(Color.black); - g.drawString(name, 25, 20); - g.dispose(); - this.setIgnoreRepaint(true); this.setFocusable(false);//设置没有焦点 this.setBorder(null);//设置不画按钮边框 this.setContentAreaFilled(false);//设置不画按钮背景 - this.setIcon(new ImageIcon(image1)); //把刚才生成的半透明image变成ImageIcon,贴到按钮上去 - this.setRolloverIcon(new ImageIcon(image1)); - this.setPressedIcon(new ImageIcon(image));//按下去的图标 + + if (StringUtils.isEmpty(iconId)){ + ImageIcon imageIcon = (ImageIcon) BaseUtils.readIcon(imagePath); + Image img = imageIcon.getImage(); + MediaTracker mt = new MediaTracker(this); + mt.addImage(img, 0); + mt.waitForAll(); + Image originalImage = createImageWithTransparency(gc, img, 1.0f, 0, 0); + this.setPressedIcon(new ImageIcon(originalImage));//按下去的图标 + // 半透明图像 + Image transparentImage = createImageWithTransparency(gc, img, opacity, 2, 2); + this.setIcon(new ImageIcon(transparentImage)); //把刚才生成的半透明image变成ImageIcon,贴到按钮上去 + this.setRolloverIcon(new ImageIcon(transparentImage)); + } else { + Icon originalIcon = createIconWithTransparency(gc, 1.0f, 0, 0); + Icon transparentIcon = createIconWithTransparency(gc, opacity, 2, 2); + this.setIcon(transparentIcon); + this.setRolloverIcon(transparentIcon); + this.setPressedIcon(originalIcon); + } } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } } + private Image createImageWithTransparency(GraphicsConfiguration gc, Image img, float alphaValue, int x, int y) { + BufferedImage image = gc.createCompatibleImage(21, 21, Transparency.TRANSLUCENT); + Graphics2D g2d = image.createGraphics(); //在画布上创建画笔 + Composite alpha = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alphaValue); + g2d.setComposite(alpha); + g2d.drawImage(img, x, y, this); //改变图像起始位置,产生动态效果 + g2d.setColor(Color.black); //设置颜色为黑色 + g2d.drawString(name, 25, 20);//写字 + g2d.dispose();//释放内存 + return image; + } + + private Icon createIconWithTransparency(GraphicsConfiguration gc, float alphaValue, int x, int y) { + BufferedImage image = gc.createCompatibleImage(21, 21, Transparency.TRANSLUCENT); + Graphics2D g2d = image.createGraphics(); + Composite alpha = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alphaValue); + g2d.setComposite(alpha); + g2d.setColor(Color.black); + g2d.drawString(name, 25, 20); + Icon icon = new LazyIcon(iconId); + icon.paintIcon(this, g2d, x, y); + g2d.dispose(); + return icon; + } + /** * 待说明 * diff --git a/designer-form/src/main/java/com/fr/design/form/parameter/XFormSubmit.java b/designer-form/src/main/java/com/fr/design/form/parameter/XFormSubmit.java index 3d8f3d9146..33a37111ce 100644 --- a/designer-form/src/main/java/com/fr/design/form/parameter/XFormSubmit.java +++ b/designer-form/src/main/java/com/fr/design/form/parameter/XFormSubmit.java @@ -1 +1 @@ -package com.fr.design.form.parameter; import com.fr.design.designer.creator.XButton; import com.fr.design.designer.creator.XCreator; import com.fr.form.parameter.FormSubmitButton; import java.awt.*; /** * 提交按钮 * @editor zhou * @since 2012-3-23下午3:36:00 */ public class XFormSubmit extends XButton { public XFormSubmit(FormSubmitButton widget, Dimension initSize) { super(widget, initSize); } /** * 是否有查询按钮 * @param xCreator 控件或容器 * @return 有无查询按钮 */ public boolean SearchQueryCreators(XCreator xCreator) { return true; } /** * 该组件是否可以拖入表单主体 * @return 是则返回true */ public boolean canEnterIntoAdaptPane(){ return false; } /** * 该组件是否可以拖入绝对布局 * * @return 是则返回true */ @Override public boolean canEnterIntoAbsolutePane() { return false; } @Override protected String getIconName() { return "preview_16.png"; } } \ No newline at end of file +package com.fr.design.form.parameter; import com.fr.design.designer.creator.XButton; import com.fr.design.designer.creator.XCreator; import com.fr.form.parameter.FormSubmitButton; import java.awt.*; /** * 提交按钮 * @editor zhou * @since 2012-3-23下午3:36:00 */ public class XFormSubmit extends XButton { public XFormSubmit(FormSubmitButton widget, Dimension initSize) { super(widget, initSize); } /** * 是否有查询按钮 * @param xCreator 控件或容器 * @return 有无查询按钮 */ public boolean SearchQueryCreators(XCreator xCreator) { return true; } /** * 该组件是否可以拖入表单主体 * @return 是则返回true */ public boolean canEnterIntoAdaptPane(){ return false; } /** * 该组件是否可以拖入绝对布局 * * @return 是则返回true */ @Override public boolean canEnterIntoAbsolutePane() { return false; } @Override protected String getIconName() { return "preview_16.png"; } @Override public String getIconId() { return "preview"; } } \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormParaPane.java b/designer-form/src/main/java/com/fr/design/mainframe/FormParaPane.java index 8677b27096..b2533664c6 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormParaPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormParaPane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe; +import com.fine.theme.icon.LazyIcon; import com.fr.design.ExtraDesignClassManager; import com.fr.design.constants.UIConstants; import com.fr.design.designer.creator.XCreatorUtils; @@ -19,6 +20,7 @@ import com.fr.plugin.observer.PluginEvent; import com.fr.plugin.observer.PluginEventListener; import com.fr.stable.ArrayUtils; +import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; @@ -70,7 +72,7 @@ public class FormParaPane extends UIToolbar { } public FormParaPane() { - predefineButton = new UIButton(UIConstants.PRE_WIDGET_NORMAL_ICON); + predefineButton = new UIButton(new LazyIcon("prewidget_popup", new Dimension(25, 21))); predefineButton.set4ToolbarButton(); predefineButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Widget_User_Defined_Widget_Config")); predefineButton.addMouseListener(new MouseAdapter() { diff --git a/designer-realize/src/main/java/com/fr/design/actions/file/export/CSVExportAction.java b/designer-realize/src/main/java/com/fr/design/actions/file/export/CSVExportAction.java index cc6bdaf392..b204f40c32 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/file/export/CSVExportAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/file/export/CSVExportAction.java @@ -3,7 +3,7 @@ */ package com.fr.design.actions.file.export; -import com.fr.base.BaseUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.base.extension.FileExtension; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.JWorkBook; @@ -25,7 +25,7 @@ public class CSVExportAction extends AbstractWorkBookExportAction { this.setMenuKeySet(KeySetUtils.CSV_EXPORT); this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/csv.png")); + this.setSmallIcon(new LazyIcon("csvFile")); } @Override diff --git a/designer-realize/src/main/java/com/fr/design/actions/file/export/EmbeddedExportExportAction.java b/designer-realize/src/main/java/com/fr/design/actions/file/export/EmbeddedExportExportAction.java index 25a6da3ad2..006b1d4a61 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/file/export/EmbeddedExportExportAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/file/export/EmbeddedExportExportAction.java @@ -1,6 +1,6 @@ package com.fr.design.actions.file.export; -import com.fr.base.BaseUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.base.extension.FileExtension; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.JWorkBook; @@ -22,7 +22,7 @@ public class EmbeddedExportExportAction extends AbstractWorkBookExportAction { this.setMenuKeySet(KeySetUtils.EMBEDDED_EXPORT); this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/oem/logo.png")); + this.setSmallIcon(new LazyIcon("logo")); } @Override diff --git a/designer-realize/src/main/java/com/fr/design/actions/file/export/SVGExportAction.java b/designer-realize/src/main/java/com/fr/design/actions/file/export/SVGExportAction.java index 4a7862e9d4..5319069326 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/file/export/SVGExportAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/file/export/SVGExportAction.java @@ -3,7 +3,7 @@ */ package com.fr.design.actions.file.export; -import com.fr.base.BaseUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.base.extension.FileExtension; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.JWorkBook; @@ -24,7 +24,7 @@ public class SVGExportAction extends AbstractWorkBookExportAction { this.setMenuKeySet(KeySetUtils.SVG_EXPORT); this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/svg.png")); + this.setSmallIcon(new LazyIcon("svgFile")); } @Override diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java index 163a5be638..01557672fc 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java @@ -3,6 +3,7 @@ */ package com.fr.design.mainframe; +import com.fine.theme.icon.LazyIcon; import com.formdev.flatlaf.ui.FlatUIUtils; import com.fr.base.BaseFormula; import com.fr.base.DynamicUnitList; @@ -1345,7 +1346,7 @@ public abstract class ElementCasePane extends Tar MenuDef insertFloatMenu = new MenuDef(); insertFloatMenu.setName(KeySetUtils.INSERT_FLOAT.getMenuKeySetName()); insertFloatMenu.setTooltip(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_T_Insert_Float")); - insertFloatMenu.setIconPath("/com/fr/design/standard/floatpop"); + insertFloatMenu.setIcon(new LazyIcon("floatelement_popup", new Dimension(25, 21))); 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/webattr/EditToolBar.java b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java index 03452d97e9..336f1e8d9f 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 @@ -47,6 +47,8 @@ import com.fr.stable.StringUtils; import com.fr.widgettheme.util.WidgetThemeDesignerUtils; import com.fr.write.JavaScriptResourceInfo; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import javax.swing.DefaultListModel; import javax.swing.Icon; import javax.swing.ImageIcon; @@ -136,6 +138,12 @@ public class EditToolBar extends BasicPane { } } }); + dialog.addWindowFocusListener(new WindowAdapter() { + @Override + public void windowGainedFocus(WindowEvent e) { + dialog.toFront(); + } + }); dialog.setVisible(true); } }; 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 dbbc06ed20..6a669a22d6 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,6 +12,8 @@ import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.Icon; import javax.swing.JPanel; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -73,6 +75,12 @@ public class SettingToolBar extends JPanel { toolBarPane.setFToolBar(tb.update()); } }); + dialog.addWindowFocusListener(new WindowAdapter() { + @Override + public void windowGainedFocus(WindowEvent e) { + dialog.toFront(); + } + }); dialog.setVisible(true); } }