diff --git a/designer-base/src/main/java/com/fine/theme/light/ui/FineLightIconSet.java b/designer-base/src/main/java/com/fine/theme/light/ui/FineLightIconSet.java index d02166ad3e..e4957b9bdb 100644 --- a/designer-base/src/main/java/com/fine/theme/light/ui/FineLightIconSet.java +++ b/designer-base/src/main/java/com/fine/theme/light/ui/FineLightIconSet.java @@ -28,7 +28,23 @@ public class FineLightIconSet extends AbstractIconSet { new SvgIconSource("redo", "com/fine/theme/icon/redo.svg", true), new SvgIconSource("version_save", "com/fine/theme/icon/version_save.svg", true), new SvgIconSource("font_miss_check", "com/fine/theme/icon/font_miss_check.svg", true), - new SvgIconSource("template_theme", "com/fine/theme/icon/template_theme.svg", true) + new SvgIconSource("template_theme", "com/fine/theme/icon/template_theme.svg", true), + new SvgIconSource("database", "com/fr/design/standard/database.svg", true), + new SvgIconSource("preview", "com/fr/design/standard/previewdateset/preview.svg", false), + new SvgIconSource("connection", "com/fr/design/standard/connection.svg", true), + new SvgIconSource("class_table_data", "com/fr/design/standard/class_table_data.svg", true), + new SvgIconSource("data_table", "com/fr/design/standard/data_table.svg", true), + new SvgIconSource("multi", "com/fr/design/standard/multi.svg", true), + new SvgIconSource("file", "com/fr/design/standard/file.svg", true), + new SvgIconSource("tree", "com/fr/design/standard/tree.svg", true), + new SvgIconSource("store_procedure", "/com/fr/design/standard/store_procedure.svg", true), + new SvgIconSource("batch_esd_on", "com/fr/design/standard/batchesdon/batch_esd_on.svg", true), + new SvgIconSource("batch_esd_off", "com/fr/design/standard/batchesdoff/batch_esd_off.svg", true), + new SvgIconSource("edit", "com/fr/design/standard/editdataset/edit.svg", true), + new SvgIconSource("remove", "com/fr/design/standard/remove/remove.svg", true), + new SvgIconSource("search", "/com/fr/design/standard/search.svg", true), + new SvgIconSource("server_database", "com/fr/design/standard/server_database.svg", true), + new SvgIconSource("field", "com/fr/design/standard/field.svg", true) ); } } diff --git a/designer-base/src/main/java/com/fr/design/actions/file/DelFileAction.java b/designer-base/src/main/java/com/fr/design/actions/file/DelFileAction.java index f7851d7af6..b1c66a75bb 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/DelFileAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/DelFileAction.java @@ -1,5 +1,6 @@ package com.fr.design.actions.file; +import com.fine.theme.icon.LazyIcon; import com.fr.design.actions.UpdateAction; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.file.FileOperations; @@ -22,7 +23,7 @@ public class DelFileAction extends UpdateAction { public DelFileAction() { this.setName(Toolkit.i18nText("Fine-Design_Basic_Remove")); - this.setSmallIcon("/com/fr/design/standard/remove/remove"); + this.setSmallIcon(new LazyIcon("remove")); } @Override diff --git a/designer-base/src/main/java/com/fr/design/actions/server/ProcedureListAction.java b/designer-base/src/main/java/com/fr/design/actions/server/ProcedureListAction.java index 9989182d48..c94044e9a1 100644 --- a/designer-base/src/main/java/com/fr/design/actions/server/ProcedureListAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/server/ProcedureListAction.java @@ -1,6 +1,6 @@ package com.fr.design.actions.server; -import com.fr.base.BaseUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.design.DesignModelAdapter; import com.fr.design.actions.UpdateAction; import com.fr.design.data.DesignTableDataManager; @@ -11,7 +11,6 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerFrame; import com.fr.file.ProcedureConfig; - import com.fr.transaction.CallBackAdaptor; import com.fr.transaction.Configurations; import com.fr.transaction.WorkerFacade; @@ -22,7 +21,7 @@ public class ProcedureListAction extends UpdateAction { public ProcedureListAction() { this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Stored_Procedure") + "(P)" + "..."); this.setMnemonic('P'); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png")); + this.setSmallIcon(new LazyIcon("store_procedure")); } /** diff --git a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java index af9850172b..8c1252651a 100644 --- a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java @@ -1,6 +1,6 @@ package com.fr.design.data; -import com.fr.base.BaseUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.base.TableData; import com.fr.base.svg.IconUtils; import com.fr.data.MultiResultTableData; @@ -431,7 +431,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp public PreviewTableDataAction(TableDataTree dataTree) { this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview")); this.setMnemonic('p'); - this.setSmallIcon("/com/fr/design/standard/previewdateset/preview"); + this.setSmallIcon(new LazyIcon("preview")); this.dataTree = dataTree; } @@ -508,7 +508,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp public ConnectionTableAction() { this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Define_Data_Connection")); this.setMnemonic('D'); - this.setSmallIcon("/com/fr/design/standard/connection", false); + this.setSmallIcon(new LazyIcon("connection")); } @Override diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java index 8db517d614..f452784acc 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java @@ -4,11 +4,25 @@ package com.fr.design.data.datapane; -import com.fr.data.impl.*; +import com.fine.theme.icon.LazyIcon; +import com.fr.data.impl.ClassTableData; +import com.fr.data.impl.ConditionTableData; +import com.fr.data.impl.DBTableData; +import com.fr.data.impl.EmbeddedTableData; +import com.fr.data.impl.FileTableData; +import com.fr.data.impl.RecursionTableData; import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.design.ExtraDesignClassManager; -import com.fr.design.data.tabledata.tabledatapane.*; - +import com.fr.design.data.tabledata.tabledatapane.ClassTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.DBTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.EmbeddedTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.FileTableDataSmallHeightPane; +import com.fr.design.data.tabledata.tabledatapane.FileTableDataSmallPane; +import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.ProcedureDataPane; +import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane; import com.fr.stable.ArrayUtils; import java.util.ArrayList; @@ -33,33 +47,33 @@ public class TableDataCreatorProducer { public TableDataNameObjectCreator[] createReportTableDataCreator() { TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Database_Query"), "ds", - "/com/fr/design/standard/database_normal.svg", DBTableData.class, DBTableDataPane.class); + new LazyIcon("database"), DBTableData.class, DBTableDataPane.class); TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Class"), "Class", - "/com/fr/design/standard/class_table_data_normal.svg", ClassTableData.class, ClassTableDataPane.class); + new LazyIcon("class_table_data"), ClassTableData.class, ClassTableDataPane.class); TableDataNameObjectCreator table = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Embedded"), "Embedded", - "/com/fr/design/standard/data_table_normal.svg", EmbeddedTableData.class, EmbeddedTableDataPane.class); + new LazyIcon("data_table"), EmbeddedTableData.class, EmbeddedTableDataPane.class); TableDataNameObjectCreator multiTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Relation"), "Multi", - "/com/fr/design/standard/multi_normal.svg", ConditionTableData.class, MultiTDTableDataPane.class) { + new LazyIcon("multi"), ConditionTableData.class, MultiTDTableDataPane.class) { public boolean isNeedParameterWhenPopulateJControlPane() { return true; } }; TableDataNameObjectCreator fileTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_File"), "File", - "/com/fr/design/standard/file_normal.svg", FileTableData.class, FileTableDataSmallHeightPane.class); + new LazyIcon("file"), FileTableData.class, FileTableDataSmallHeightPane.class); TableDataNameObjectCreator treeTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Tree"), "Tree", - "/com/fr/design/standard/tree_normal.svg", RecursionTableData.class, TreeTableDataPane.class) { + new LazyIcon("tree"), RecursionTableData.class, TreeTableDataPane.class) { public boolean isNeedParameterWhenPopulateJControlPane() { return true; } }; TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Stored_Procedure"), "Proc", - "/com/fr/design/standard/store_procedure_normal.svg", + new LazyIcon("store_procedure"), StoreProcedure.class, ProcedureDataPane.class) { @Override public boolean shouldInsertSeparator() { @@ -72,33 +86,33 @@ public class TableDataCreatorProducer { public TableDataNameObjectCreator[] createServerTableDataCreator() { TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Database_Query"), - "/com/fr/design/standard/server_database_normal.svg", DBTableData.class, + new LazyIcon("server_database"), DBTableData.class, DBTableDataPane.class); TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Class"), - "/com/fr/design/standard/class_table_data_normal.svg", ClassTableData.class, + new LazyIcon("class_table_data"), ClassTableData.class, ClassTableDataPane.class); TableDataNameObjectCreator table = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Embedded"), - "/com/fr/design/standard/data_table_normal.svg", EmbeddedTableData.class, + new LazyIcon("data_table"), EmbeddedTableData.class, EmbeddedTableDataPane.class); TableDataNameObjectCreator fileTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_File"), - "/com/fr/design/standard/file_normal.svg", FileTableData.class, + new LazyIcon("file"), FileTableData.class, FileTableDataSmallPane.class); TableDataNameObjectCreator treeTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Tree"), - "/com/fr/design/standard/tree_normal.svg", + new LazyIcon("tree"), RecursionTableData.class, GlobalTreeTableDataPane.class) { public boolean isNeedParameterWhenPopulateJControlPane() { return true; } }; TableDataNameObjectCreator multiTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Relation"), - "/com/fr/design/standard/multi_normal.svg", + new LazyIcon("multi"), ConditionTableData.class, GlobalMultiTDTableDataPane.class) { public boolean isNeedParameterWhenPopulateJControlPane() { return true; } }; TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Stored_Procedure"), - "/com/fr/design/standard/store_procedure_normal.svg", + new LazyIcon("store_procedure"), StoreProcedure.class, ProcedureDataPane.class) { @Override public boolean shouldInsertSeparator() { diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java index 0ee4599159..84fe9d6609 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java @@ -1,7 +1,5 @@ package com.fr.design.data.datapane; -import com.fr.base.BaseUtils; -import com.fr.base.svg.IconUtils; import com.fr.base.svg.SVGLoader; import com.fr.data.impl.DBTableData; import com.fr.design.actions.tabledata.TableDataAction; @@ -52,6 +50,9 @@ public class TableDataNameObjectCreator extends NameObjectCreator { prefix = action.getPrefix(); } + /** + * 改用{@link TableDataNameObjectCreator#TableDataNameObjectCreator(String, Icon, Class, Class)} + */ public TableDataNameObjectCreator(String menuName, String iconPath, Class clazz, Class updatePane) { super(menuName, iconPath, clazz, updatePane); if (iconPath != null) { @@ -60,6 +61,14 @@ public class TableDataNameObjectCreator extends NameObjectCreator { } } + public TableDataNameObjectCreator(String menuName, Icon icon, Class clazz, Class updatePane) { + super(menuName, icon, clazz, updatePane); + } + + /** + * 改用{@link TableDataNameObjectCreator#TableDataNameObjectCreator(String, String, Icon, Class, Class)} + */ + @Deprecated public TableDataNameObjectCreator(String menuName, String prefix, String iconPath, Class clazz, Class updatePane) { super(menuName, iconPath, clazz, updatePane); if (iconPath != null) { @@ -69,6 +78,15 @@ public class TableDataNameObjectCreator extends NameObjectCreator { this.prefix = prefix; } + public TableDataNameObjectCreator(String menuName, String prefix, Icon icon, Class clazz, Class updatePane) { + super(menuName, icon, clazz, updatePane); + this.prefix = prefix; + } + + /** + * 改用{@link TableDataNameObjectCreator#TableDataNameObjectCreator(String, Icon, Class, Class, Class)} + */ + @Deprecated public TableDataNameObjectCreator(String menuName, String iconPath, Class clazz, Class clazz4Init, Class updatePane) { super(menuName, iconPath, clazz, clazz4Init, updatePane); if (iconPath != null) { @@ -77,6 +95,14 @@ public class TableDataNameObjectCreator extends NameObjectCreator { } } + public TableDataNameObjectCreator(String menuName, Icon icon, Class clazz, Class clazz4Init, Class updatePane) { + super(menuName, icon, clazz, clazz4Init, updatePane); + } + + /** + * 改用{@link TableDataNameObjectCreator#TableDataNameObjectCreator(String, String, Icon, Class, Class, Class)} + */ + @Deprecated public TableDataNameObjectCreator(String menuName, String prefix, String iconPath, Class clazz, Class clazz4Init, Class updatePane) { super(menuName, iconPath, clazz, clazz4Init, updatePane); if (iconPath != null) { @@ -86,6 +112,11 @@ public class TableDataNameObjectCreator extends NameObjectCreator { this.prefix = prefix; } + public TableDataNameObjectCreator(String menuName, String prefix, Icon icon, Class clazz, Class clazz4Init, Class updatePane) { + super(menuName, icon, clazz, clazz4Init, updatePane); + this.prefix = prefix; + } + @Override protected void doSthChanged4Icon(Object ob) { diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTree.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTree.java index c19b4b2740..cc267aceff 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTree.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTree.java @@ -1,5 +1,6 @@ package com.fr.design.data.datapane; +import com.fine.theme.icon.LazyIcon; import com.fr.base.svg.IconUtils; import com.fr.data.MultiResultTableData; import com.fr.design.data.datapane.management.search.TableDataTreeSearchManager; @@ -52,7 +53,7 @@ public class TableDataTree extends UserObjectRefreshJTree { Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. - this.setIcon(IconUtils.readIcon("/com/fr/design/standard/field")); + this.setIcon(new LazyIcon("field")); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; @@ -70,7 +71,7 @@ public class TableDataTree extends UserObjectRefreshJTree { this.setIcon(IconUtils.readIcon(IconPathConstants.DS_QUERY_ICON_PATH)); } } else { - this.setIcon(IconUtils.readIcon("/com/fr/design/images/data/store_procedure.png")); + this.setIcon(new LazyIcon("store_procedure")); } } else if (userObj == PENDING) { this.setIcon(null); diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java index 83078a2f19..ff514af9ca 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java @@ -1,5 +1,6 @@ package com.fr.design.data.datapane; +import com.fine.theme.icon.LazyIcon; import com.fr.base.TableData; import com.fr.data.MultiResultTableData; import com.fr.data.TableDataSource; @@ -896,7 +897,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { @Override public String getIconResource() { - return "/com/fr/design/standard/batchesdon/batch_esd_on"; + return "batch_esd_on"; } @Override @@ -943,7 +944,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { @Override public String getIconResource() { - return "/com/fr/design/standard/batchesdoff/batch_esd_off"; + return "batch_esd_off"; } @Override @@ -971,7 +972,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { public AbstractESDAction() { this.setName(getName()); this.setMnemonic('R'); - this.setSmallIcon(getIconResource()); + this.setSmallIcon(new LazyIcon(getIconResource())); } @Override @@ -1037,7 +1038,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { public EditAction() { this.setName(Toolkit.i18nText("Fine-Design_Basic_Edit")); this.setMnemonic('E'); - this.setSmallIcon("/com/fr/design/standard/editdataset/edit"); + this.setSmallIcon(new LazyIcon("edit")); } @Override @@ -1102,7 +1103,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { public RemoveAction() { this.setName(Toolkit.i18nText("Fine-Design_Basic_Remove")); this.setMnemonic('R'); - this.setSmallIcon("/com/fr/design/standard/remove/remove"); + this.setSmallIcon(new LazyIcon("remove")); } @Override @@ -1178,7 +1179,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { public CopyAction() { this.setName(Toolkit.i18nText("Fine-Design_Basic_Copy")); this.setMnemonic('C'); - this.setSmallIcon("/com/fr/design/standard/copy/copy"); + this.setSmallIcon(new LazyIcon("copy")); } @Override @@ -1194,7 +1195,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { public PasteAction() { this.setName(Toolkit.i18nText("Fine-Design_Basic_Action_Paste_Name")); this.setMnemonic('P'); - this.setSmallIcon("/com/fr/design/images/m_edit/paste"); + this.setSmallIcon(new LazyIcon("paste")); } @Override @@ -1228,7 +1229,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { public SwitchAction() { this.setName(Toolkit.i18nText("Fine-Design_Basic_Search")); this.setMnemonic('S'); - this.setSmallIcon("/com/fr/design/standard/search", false); + this.setSmallIcon(new LazyIcon("search")); } @Override diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java index f5266c9b6d..75b6bd77a5 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java @@ -1,18 +1,19 @@ package com.fr.design.data.datapane.management.search.pane; +import com.fine.theme.icon.LazyIcon; import com.fr.base.svg.IconUtils; import com.fr.design.DesignModelAdapter; import com.fr.design.constants.UIConstants; import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.management.search.TableDataTreeSearchManager; -import com.fr.design.search.event.TreeSearchStatusChangeEvent; -import com.fr.design.search.event.TreeSearchStatusChangeListener; -import com.fr.design.search.TreeSearchStatus; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.search.TreeSearchStatus; +import com.fr.design.search.event.TreeSearchStatusChangeEvent; +import com.fr.design.search.event.TreeSearchStatusChangeListener; import com.fr.stable.StringUtils; import javax.swing.BorderFactory; @@ -103,7 +104,7 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.TOOLBAR_BORDER_COLOR)); searchPane.setBackground(Color.WHITE); // 左侧搜索图标 - UILabel searchLabel = new UILabel(IconUtils.readIcon("/com/fr/design/standard/search")); + UILabel searchLabel = new UILabel(new LazyIcon("search")); searchLabel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); searchLabel.addMouseListener(new MouseAdapter() { @Override diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureListPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureListPane.java index 804f9a22a5..7a21185511 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureListPane.java @@ -1,5 +1,6 @@ package com.fr.design.data.tabledata.tabledatapane; +import com.fine.theme.icon.LazyIcon; import com.fr.data.TableDataSource; import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.design.data.DesignTableDataManager; @@ -14,7 +15,7 @@ import com.fr.stable.Nameable; import com.fr.stable.StringUtils; import com.fr.stable.core.PropertyChangeAdapter; -import javax.swing.*; +import javax.swing.DefaultListModel; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -101,7 +102,7 @@ public class ProcedureListPane extends JListControlPane { * @return 面板组件 */ public NameableCreator[] createNameableCreators() { - return new NameableCreator[] { new NameObjectCreator("Proc", "/com/fr/design/images/data/store_procedure.png", StoreProcedure.class, + return new NameableCreator[]{new NameObjectCreator("Proc", new LazyIcon("store_procedure"), StoreProcedure.class, ProcedureDataPane.class) }; } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapperHelper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapperHelper.java index 45211c095f..e64e5eb6ac 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapperHelper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapperHelper.java @@ -1,7 +1,7 @@ package com.fr.design.data.tabledata.wrapper; +import com.fine.theme.icon.LazyIcon; import com.fr.base.TableData; -import com.fr.base.svg.IconUtils; import com.fr.design.data.datapane.TableDataCreatorProducer; import com.fr.design.data.datapane.TableDataNameObjectCreator; import com.fr.design.fun.ServerTableDataDefineProvider; @@ -25,7 +25,7 @@ import java.util.Map; */ class MultiResultTableDataWrapperHelper { private static final Map, Icon> TABLE_DATA_ICON_PATHS = new HashMap<>(); - private static final String DEFAULT_MULTI_RESULT_TD_ICON = "/com/fr/design/standard/multi"; + private static final String DEFAULT_MULTI_RESULT_TD_ICON = "multi"; static { @@ -45,10 +45,10 @@ class MultiResultTableDataWrapperHelper { return TABLE_DATA_ICON_PATHS.computeIfAbsent(tableDataClass, cls -> { for (TableDataNameObjectCreator creator : TableDataCreatorProducer.getInstance().createReportTableDataCreator()) { if (creator.createObject().getClass().isAssignableFrom(tableDataClass)) { - return IconUtils.readIcon(creator.getIconPath()); + return creator.menuIcon(); } } - return IconUtils.readIcon(DEFAULT_MULTI_RESULT_TD_ICON); + return new LazyIcon(DEFAULT_MULTI_RESULT_TD_ICON); }); } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java index cf66d9700e..df20f0d07a 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java @@ -1,8 +1,7 @@ package com.fr.design.data.tabledata.wrapper; -import com.fr.base.BaseUtils; +import com.fine.theme.icon.LazyIcon; import com.fr.base.TableData; -import com.fr.base.svg.IconUtils; import com.fr.base.svg.SVGLoader; import com.fr.data.impl.ClassTableData; import com.fr.data.impl.DBTableData; @@ -12,7 +11,7 @@ import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.design.icon.WarningIcon; import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.Icon; public final class ServerTableDataWrapper extends AbstractTableDataWrapper { public ServerTableDataWrapper(TableData tabledata) { @@ -27,21 +26,21 @@ public final class ServerTableDataWrapper extends AbstractTableDataWrapper { public Icon getIcon() { if (tabledata instanceof DBTableData) { if (StringUtils.isBlank(((DBTableData) tabledata).getQuery())) { - return new WarningIcon(SVGLoader.load("/com/fr/design/standard/server_database_normal.svg")); + return new WarningIcon(SVGLoader.load("/com/fr/design/standard/server_database.svg")); } else { - return IconUtils.readIcon("/com/fr/design/standard/server_database"); + return new LazyIcon("server_database"); } } else if (tabledata instanceof ClassTableData) { - return IconUtils.readIcon("/com/fr/design/standard/class_table_data"); + return new LazyIcon("class_table_data"); } else if (tabledata instanceof EmbeddedTableData) { - return IconUtils.readIcon("/com/fr/design/standard/data_table"); + return new LazyIcon("data_table"); }else if(tabledata instanceof RecursionTableData){ - return IconUtils.readIcon("/com/fr/design/standard/tree"); + return new LazyIcon("tree"); } else if (tabledata instanceof StoreProcedure) { - return IconUtils.readIcon("/com/fr/design/standard/store_procedure"); + return new LazyIcon("store_procedure"); } - return IconUtils.readIcon("/com/fr/design/standard/server_database"); + return new LazyIcon("server_database"); } /** diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java index 6c9af4827f..2de4132b47 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java @@ -1,7 +1,7 @@ package com.fr.design.data.tabledata.wrapper; +import com.fine.theme.icon.LazyIcon; import com.fr.base.TableData; -import com.fr.base.svg.IconUtils; import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.operator.DataOperator; @@ -150,7 +150,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper { @Override public Icon getIcon() { - return IconUtils.readIcon("/com/fr/design/standard/store_procedure"); + return new LazyIcon("store_procedure"); } /** diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java index c2c815e8a8..f13be4a0be 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java @@ -1,7 +1,7 @@ package com.fr.design.data.tabledata.wrapper; +import com.fine.theme.icon.LazyIcon; import com.fr.base.TableData; -import com.fr.base.svg.IconUtils; import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.design.data.DesignTableDataManager; @@ -71,7 +71,7 @@ public final class StoreProcedureNameWrapper implements TableDataWrapper { @Override public Icon getIcon() { - return IconUtils.readIcon("/com/fr/design/standard/store_procedure"); + return new LazyIcon("store_procedure"); } private void createStore(boolean needLoadingBar) { diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java index 8345bde944..09586a6bca 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java @@ -1,5 +1,6 @@ package com.fr.design.data.tabledata.wrapper; +import com.fine.theme.icon.LazyIcon; import com.fr.base.TableData; import com.fr.data.TableDataSource; import com.fr.data.impl.ClassTableData; @@ -29,6 +30,7 @@ import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.server.authority.user.UserAuthority; +import javax.swing.Icon; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Iterator; @@ -55,15 +57,15 @@ public abstract class TableDataFactory { * 同一类型的只能加一次,就加最上层的类,因为要排序。如果将所有的 FileTableData都加进来,那么FileTableData的排序就不正确了 */ static { - defaultMap.put(DBTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/database_normal.svg", DBTableData.class, DBTableDataPane.class)); - defaultMap.put(ClassTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/class_table_data_normal.svg", ClassTableData.class, ClassTableDataPane.class)); - defaultMap.put(EmbeddedTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/data_table_normal.svg", EmbeddedTableData.class, EmbeddedTableDataPane.class)); - defaultMap.put(DecoratedTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/multi_normal.svg", DecoratedTableData.class, DecoratedTableDataPane.class)); - defaultMap.put(StoreProcedure.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/store_procedure_normal.svg", StoreProcedure.class, ProcedureDataPane.class)); - defaultMap.put(MultiTDTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/multi_normal.svg", MultiTDTableData.class, MultiTDTableDataPane.class)); - defaultMap.put(FileTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/file_normal.svg", FileTableData.class, FileTableDataPane.class)); - defaultMap.put(RecursionTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/tree_normal.svg", RecursionTableData.class, TreeTableDataPane.class)); - defaultMap.put(MultiFieldTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/database_normal.svg", MultiFieldTableData.class, null)); + defaultMap.put(DBTableData.class.getName(), new TableDataNameObjectCreator(null, new LazyIcon("database"), DBTableData.class, DBTableDataPane.class)); + defaultMap.put(ClassTableData.class.getName(), new TableDataNameObjectCreator(null, new LazyIcon("class_table_data"), ClassTableData.class, ClassTableDataPane.class)); + defaultMap.put(EmbeddedTableData.class.getName(), new TableDataNameObjectCreator(null, new LazyIcon("data_table"), EmbeddedTableData.class, EmbeddedTableDataPane.class)); + defaultMap.put(DecoratedTableData.class.getName(), new TableDataNameObjectCreator(null, new LazyIcon("multi"), DecoratedTableData.class, DecoratedTableDataPane.class)); + defaultMap.put(StoreProcedure.class.getName(), new TableDataNameObjectCreator(null, new LazyIcon("store_procedure"), StoreProcedure.class, ProcedureDataPane.class)); + defaultMap.put(MultiTDTableData.class.getName(), new TableDataNameObjectCreator(null, new LazyIcon("multi"), MultiTDTableData.class, MultiTDTableDataPane.class)); + defaultMap.put(FileTableData.class.getName(), new TableDataNameObjectCreator(null, new LazyIcon("file"), FileTableData.class, FileTableDataPane.class)); + defaultMap.put(RecursionTableData.class.getName(), new TableDataNameObjectCreator(null, new LazyIcon("tree"), RecursionTableData.class, TreeTableDataPane.class)); + defaultMap.put(MultiFieldTableData.class.getName(), new TableDataNameObjectCreator(null, new LazyIcon("database"), MultiFieldTableData.class, null)); map.putAll(defaultMap); } @@ -143,15 +145,26 @@ public abstract class TableDataFactory { /** * 获取数据集所对应的图标路径 * - * @param tabledata - * @return + * 获取图标直接使用 {@link #getIcon(TableData)} */ + @Deprecated public static String getIconPath(TableData tabledata) { TableDataNameObjectCreator tableDataNameObjectCreator = getTableDataNameObjectCreator(tabledata); if (tableDataNameObjectCreator != null && tableDataNameObjectCreator.getIconPath() != null) { return tableDataNameObjectCreator.getIconPath(); } - return "/com/fr/design/standard/database_normal.svg"; + return "database"; + } + + /** + * 获取数据集所对应的图标 + */ + public static Icon getIcon(TableData tabledata) { + TableDataNameObjectCreator tableDataNameObjectCreator = getTableDataNameObjectCreator(tabledata); + if (tableDataNameObjectCreator != null && tableDataNameObjectCreator.menuIcon() != null) { + return tableDataNameObjectCreator.menuIcon(); + } + return new LazyIcon(getIconPath(tabledata)); } /** diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TemplateTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TemplateTableDataWrapper.java index 93bb7bf3bf..f2442e7e84 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TemplateTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TemplateTableDataWrapper.java @@ -1,14 +1,13 @@ package com.fr.design.data.tabledata.wrapper; -import javax.swing.Icon; - import com.fr.base.TableData; -import com.fr.base.svg.IconUtils; import com.fr.base.svg.SVGLoader; import com.fr.data.impl.DBTableData; import com.fr.design.icon.WarningIcon; import com.fr.stable.StringUtils; +import javax.swing.Icon; + public final class TemplateTableDataWrapper extends AbstractTableDataWrapper { public TemplateTableDataWrapper(TableData tabledata) { super(tabledata); @@ -21,9 +20,9 @@ public final class TemplateTableDataWrapper extends AbstractTableDataWrapper { @Override public Icon getIcon() { if (tabledata instanceof DBTableData && StringUtils.isBlank(((DBTableData) tabledata).getQuery())) { - return new WarningIcon(SVGLoader.load("/com/fr/design/standard/database_normal.svg")); + return new WarningIcon(SVGLoader.load("/com/fr/design/standard/database.svg")); } - return IconUtils.readIcon(TableDataFactory.getIconPath(tabledata)); + return TableDataFactory.getIcon(tabledata); } @Override diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/AbstractNameableCreator.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/AbstractNameableCreator.java index 9ad08a9e63..c7a46b03f8 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/AbstractNameableCreator.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/AbstractNameableCreator.java @@ -1,13 +1,12 @@ package com.fr.design.gui.controlpane; -import com.fr.base.BaseUtils; import com.fr.base.svg.IconUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.general.ComparatorUtils; import com.fr.general.NameObject; import com.fr.js.JavaScript; -import javax.swing.*; +import javax.swing.Icon; public abstract class AbstractNameableCreator implements NameableCreator { @@ -24,13 +23,28 @@ public abstract class AbstractNameableCreator implements NameableCreator { this.clazzOfEditor = clazzOfEditor; } + /** + * 改用 {@link AbstractNameableCreator#AbstractNameableCreator(String, Icon, Class)} + */ + @Deprecated public AbstractNameableCreator(String menuName, String iconPath, Class clazz) { this.menuName = menuName; this.menuIcon = IconUtils.readIcon(iconPath); this.clazzOfObject = clazz; this.clazzOfInitCase = clazz; } - + + public AbstractNameableCreator(String menuName, Icon icon, Class clazz) { + this.menuName = menuName; + this.menuIcon = icon; + this.clazzOfObject = clazz; + this.clazzOfInitCase = clazz; + } + + /** + * 改用{@link AbstractNameableCreator#AbstractNameableCreator(String, Icon, Class, Class)} + */ + @Deprecated public AbstractNameableCreator(String menuName, String iconPath, Class clazz, Class clazzOfEditor) { this.menuName = menuName; this.menuIcon = IconUtils.readIcon(iconPath); @@ -38,7 +52,19 @@ public abstract class AbstractNameableCreator implements NameableCreator { this.clazzOfEditor = clazzOfEditor; this.clazzOfInitCase = clazz; } - + + public AbstractNameableCreator(String menuName, Icon icon, Class clazz, Class clazzOfEditor) { + this.menuName = menuName; + this.menuIcon = icon; + this.clazzOfObject = clazz; + this.clazzOfEditor = clazzOfEditor; + this.clazzOfInitCase = clazz; + } + + /** + * 改用{@link AbstractNameableCreator#AbstractNameableCreator(String, Icon, Class, Class, Class)} + */ + @Deprecated public AbstractNameableCreator(String menuName, String iconPath, Class clazz, Class clazz4Init, Class clazzOfEditor) { this.menuName = menuName; this.menuIcon = IconUtils.readIcon(iconPath); @@ -48,6 +74,15 @@ public abstract class AbstractNameableCreator implements NameableCreator { this.clazzOfInitCase = clazz4Init; } + public AbstractNameableCreator(String menuName, Icon icon, Class clazz, Class clazz4Init, Class clazzOfEditor) { + this.menuName = menuName; + this.menuIcon = icon; + this.clazzOfObject = clazz; + this.clazzOfEditor = clazzOfEditor; + this.clazzOfInitCase = clazz; + this.clazzOfInitCase = clazz4Init; + } + /** * get menuName * @return diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/NameObjectCreator.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/NameObjectCreator.java index e7697183af..3b5f1efed3 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/NameObjectCreator.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/NameObjectCreator.java @@ -1,10 +1,12 @@ package com.fr.design.gui.controlpane; -import com.fr.general.NameObject; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ilist.ListModelElement; +import com.fr.general.NameObject; import com.fr.stable.Nameable; +import javax.swing.Icon; + public class NameObjectCreator extends AbstractNameableCreator { @@ -16,18 +18,44 @@ public class NameObjectCreator extends AbstractNameableCreator { super(menuName, clazz, updatePane); } + /** + * 改用{@link NameObjectCreator#NameObjectCreator(String, Icon, Class)} + */ + @Deprecated public NameObjectCreator(String menuName, String iconPath, Class clazz) { super(menuName, iconPath, clazz); } - + + public NameObjectCreator(String menuName, Icon icon, Class clazz) { + super(menuName, icon, clazz); + } + + /** + * 改用{@link NameObjectCreator#NameObjectCreator(String, Icon, Class, Class)} + */ + @Deprecated public NameObjectCreator(String menuName, String iconPath, Class clazz, Class updatePane) { super(menuName, iconPath, clazz, updatePane); } - + + public NameObjectCreator(String menuName, Icon icon, Class clazz, Class updatePane) { + super(menuName, icon, clazz, updatePane); + } + + /** + * 改用{@link NameObjectCreator#NameObjectCreator(String, Icon, Class, Class, Class)} + */ + @Deprecated public NameObjectCreator(String menuName, String iconPath, Class clazz, Class clazz4Init, Class updatePane) { super(menuName, iconPath, clazz, clazz4Init, updatePane); } + public NameObjectCreator(String menuName, Icon icon, Class clazz, Class clazz4Init, Class updatePane) { + super(menuName, icon, clazz, clazz4Init, updatePane); + } + + + /** * create Nameable * @param helper diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/OldShortCutFactory.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/OldShortCutFactory.java index d0cf10f7e8..6d966a289a 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/OldShortCutFactory.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/OldShortCutFactory.java @@ -79,7 +79,7 @@ public class OldShortCutFactory extends AbstractShortCutFactory { AddItemMenuDef(NameableCreator[] creators) { this.setName(com.fr.design.i18n.Toolkit.i18nText(("Fine-Design_Basic_Action_Add"))); this.setMnemonic('A'); - this.setIconPath("/com/fr/design/images/control/addPopup.png"); + this.setIconPath("addPopup"); wrapActionListener(creators); } diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java index 8862493242..d2558012be 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java @@ -1,5 +1,6 @@ package com.fr.design.gui.ilist; +import com.fine.theme.icon.LazyIcon; import com.fr.base.BaseUtils; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.TableProcedure; @@ -251,7 +252,7 @@ public class TableViewList extends UIList { } else if (ComparatorUtils.equals(type, TableProcedure.VIEW)) { icon = BaseUtils.readIcon("/com/fr/design/images/data/views.png"); } else { - icon = BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png"); + icon = new LazyIcon("store_procedure"); } this.setIcon(icon); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index 2db9d50e74..3df9250733 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe; +import com.fine.theme.icon.LazyIcon; import com.fr.base.BaseUtils; import com.fr.base.extension.FileExtension; import com.fr.base.vcs.DesignerMode; @@ -452,7 +453,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt public SwitchAction() { this.setName(Toolkit.i18nText("Fine-Design_Basic_Search")); this.setMnemonic('S'); - this.setSmallIcon("/com/fr/design/standard/search", false); + this.setSmallIcon(new LazyIcon("search")); } @Override diff --git a/designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateTreeSearchToolbarPane.java b/designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateTreeSearchToolbarPane.java index ee9b861b1e..e12050c18b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateTreeSearchToolbarPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateTreeSearchToolbarPane.java @@ -1,10 +1,8 @@ package com.fr.design.mainframe.manager.search.searcher.control.pane; +import com.fine.theme.icon.LazyIcon; import com.fr.base.svg.IconUtils; import com.fr.design.constants.UIConstants; -import com.fr.design.search.event.TreeSearchStatusChangeEvent; -import com.fr.design.search.event.TreeSearchStatusChangeListener; -import com.fr.design.search.TreeSearchStatus; import com.fr.design.file.TemplateTreePane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; @@ -12,6 +10,9 @@ import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.manager.search.TemplateTreeSearchManager; +import com.fr.design.search.TreeSearchStatus; +import com.fr.design.search.event.TreeSearchStatusChangeEvent; +import com.fr.design.search.event.TreeSearchStatusChangeListener; import com.fr.stable.StringUtils; import javax.swing.BorderFactory; @@ -107,7 +108,7 @@ public class TemplateTreeSearchToolbarPane extends JPanel implements TreeSearchS searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.TOOLBAR_BORDER_COLOR)); searchPane.setBackground(Color.WHITE); // 左侧搜索图标 - UILabel searchLabel = new UILabel(IconUtils.readIcon("/com/fr/design/standard/search")); + UILabel searchLabel = new UILabel(new LazyIcon("search")); searchLabel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); searchLabel.addMouseListener(new MouseAdapter() { @Override diff --git a/designer-base/src/main/resources/com/fr/design/standard/batchesdoff/batch_esd_off.svg b/designer-base/src/main/resources/com/fr/design/standard/batchesdoff/batch_esd_off.svg new file mode 100755 index 0000000000..6f8804919f --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/batchesdoff/batch_esd_off.svg @@ -0,0 +1,7 @@ + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/batchesdoff/batch_esd_off_disabled.svg b/designer-base/src/main/resources/com/fr/design/standard/batchesdoff/batch_esd_off_disable.svg similarity index 100% rename from designer-base/src/main/resources/com/fr/design/standard/batchesdoff/batch_esd_off_disabled.svg rename to designer-base/src/main/resources/com/fr/design/standard/batchesdoff/batch_esd_off_disable.svg diff --git a/designer-base/src/main/resources/com/fr/design/standard/batchesdoff/batch_esd_off_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/batchesdoff/batch_esd_off_normal.svg deleted file mode 100644 index c81b5419aa..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/batchesdoff/batch_esd_off_normal.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/designer-base/src/main/resources/com/fr/design/standard/batchesdon/batch_esd_on.svg b/designer-base/src/main/resources/com/fr/design/standard/batchesdon/batch_esd_on.svg new file mode 100755 index 0000000000..fa45b2e20d --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/batchesdon/batch_esd_on.svg @@ -0,0 +1,8 @@ + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/batchesdon/batch_esd_on_disabled.svg b/designer-base/src/main/resources/com/fr/design/standard/batchesdon/batch_esd_on_disable.svg similarity index 100% rename from designer-base/src/main/resources/com/fr/design/standard/batchesdon/batch_esd_on_disabled.svg rename to designer-base/src/main/resources/com/fr/design/standard/batchesdon/batch_esd_on_disable.svg diff --git a/designer-base/src/main/resources/com/fr/design/standard/batchesdon/batch_esd_on_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/batchesdon/batch_esd_on_normal.svg deleted file mode 100644 index 13f924d88b..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/batchesdon/batch_esd_on_normal.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/designer-base/src/main/resources/com/fr/design/standard/class_table_data.svg b/designer-base/src/main/resources/com/fr/design/standard/class_table_data.svg new file mode 100755 index 0000000000..e9d8a7d851 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/class_table_data.svg @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/class_table_data_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/class_table_data_normal.svg deleted file mode 100644 index 19fc851ecd..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/class_table_data_normal.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/designer-base/src/main/resources/com/fr/design/standard/connection.svg b/designer-base/src/main/resources/com/fr/design/standard/connection.svg new file mode 100755 index 0000000000..6d45067212 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/connection.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/connection_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/connection_normal.svg deleted file mode 100644 index 7c865b45e0..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/connection_normal.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - icon_定义数据连接_normal备份 - - - - - - - - \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/data_table.svg b/designer-base/src/main/resources/com/fr/design/standard/data_table.svg new file mode 100755 index 0000000000..d3137e6741 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/data_table.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/data_table_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/data_table_normal.svg deleted file mode 100644 index 220cd95269..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/data_table_normal.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/database.svg b/designer-base/src/main/resources/com/fr/design/standard/database.svg new file mode 100755 index 0000000000..5fd6afb17b --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/database.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/database_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/database_normal.svg deleted file mode 100644 index 8c0361dcda..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/database_normal.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/editdataset/edit.svg b/designer-base/src/main/resources/com/fr/design/standard/editdataset/edit.svg new file mode 100755 index 0000000000..b43e5c10b5 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/editdataset/edit.svg @@ -0,0 +1,6 @@ + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/editdataset/edit_disabled.svg b/designer-base/src/main/resources/com/fr/design/standard/editdataset/edit_disable.svg similarity index 89% rename from designer-base/src/main/resources/com/fr/design/standard/editdataset/edit_disabled.svg rename to designer-base/src/main/resources/com/fr/design/standard/editdataset/edit_disable.svg index 9b001cfc5f..c93e1e6904 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/editdataset/edit_disabled.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/editdataset/edit_disable.svg @@ -1,5 +1,5 @@ - + icon_编辑_disable diff --git a/designer-base/src/main/resources/com/fr/design/standard/editdataset/edit_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/editdataset/edit_normal.svg deleted file mode 100644 index 2917194523..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/editdataset/edit_normal.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - icon_编辑_normal - - - - - \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/field.svg b/designer-base/src/main/resources/com/fr/design/standard/field.svg new file mode 100755 index 0000000000..ac7b5bd3ec --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/field.svg @@ -0,0 +1,11 @@ + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/field_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/field_normal.svg deleted file mode 100644 index 608d1fd589..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/field_normal.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/file.svg b/designer-base/src/main/resources/com/fr/design/standard/file.svg new file mode 100755 index 0000000000..969092dd91 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/file.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/file_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/file_normal.svg deleted file mode 100644 index cafbff6526..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/file_normal.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/designer-base/src/main/resources/com/fr/design/standard/multi.svg b/designer-base/src/main/resources/com/fr/design/standard/multi.svg new file mode 100755 index 0000000000..0f8eebe55c --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/multi.svg @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/multi_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/multi_normal.svg deleted file mode 100644 index 0c8144e634..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/multi_normal.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview.svg b/designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview.svg new file mode 100755 index 0000000000..a271d50876 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview.svg @@ -0,0 +1,7 @@ + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview_disabled.svg b/designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview_disable.svg similarity index 92% rename from designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview_disabled.svg rename to designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview_disable.svg index 6f2c4afa1f..b0e8234410 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview_disabled.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview_disable.svg @@ -1,5 +1,5 @@ - + icon_预览_disabled diff --git a/designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview_normal.svg deleted file mode 100644 index 0412b5e108..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/previewdateset/preview_normal.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - icon_预览_normal - - - - diff --git a/designer-base/src/main/resources/com/fr/design/standard/remove/remove.svg b/designer-base/src/main/resources/com/fr/design/standard/remove/remove.svg new file mode 100755 index 0000000000..760055c5e2 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/remove/remove.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/remove/remove_disabled.svg b/designer-base/src/main/resources/com/fr/design/standard/remove/remove_disable.svg similarity index 89% rename from designer-base/src/main/resources/com/fr/design/standard/remove/remove_disabled.svg rename to designer-base/src/main/resources/com/fr/design/standard/remove/remove_disable.svg index b57f9a853d..93bca0fc3c 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/remove/remove_disabled.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/remove/remove_disable.svg @@ -1,5 +1,5 @@ - + icon_删除_normal diff --git a/designer-base/src/main/resources/com/fr/design/standard/remove/remove_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/remove/remove_normal.svg deleted file mode 100644 index b09268f454..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/remove/remove_normal.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - icon_删除_normal备份 - - - - - - \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/search_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/search.svg similarity index 91% rename from designer-base/src/main/resources/com/fr/design/standard/search_normal.svg rename to designer-base/src/main/resources/com/fr/design/standard/search.svg index 673548dfaf..0e0ebbbd44 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/search_normal.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/search.svg @@ -1,5 +1,5 @@ - + icon_搜索_normal diff --git a/designer-base/src/main/resources/com/fr/design/standard/server_database.svg b/designer-base/src/main/resources/com/fr/design/standard/server_database.svg new file mode 100755 index 0000000000..20fae8b6f2 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/server_database.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/server_database_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/server_database_normal.svg deleted file mode 100644 index 50a509fcbf..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/server_database_normal.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/store_procedure.svg b/designer-base/src/main/resources/com/fr/design/standard/store_procedure.svg new file mode 100755 index 0000000000..b1a15cb1c3 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/store_procedure.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/store_procedure_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/store_procedure_normal.svg deleted file mode 100644 index 55393d59ab..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/store_procedure_normal.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/designer-base/src/main/resources/com/fr/design/standard/tree.svg b/designer-base/src/main/resources/com/fr/design/standard/tree.svg new file mode 100755 index 0000000000..9086b2a553 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/tree.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/standard/tree_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/tree_normal.svg deleted file mode 100644 index cc965888e7..0000000000 --- a/designer-base/src/main/resources/com/fr/design/standard/tree_normal.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file