From 3a86570dd312044f2944e82e7ded99d2ff9215cc Mon Sep 17 00:00:00 2001 From: Yvan Date: Mon, 21 Dec 2020 20:12:55 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-42238=20=E3=80=9010.0.13=E3=80=91JDK11?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=9B=BE=E6=A0=87=E6=A8=A1=E7=B3=8A?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BC=98=E5=8C=96=20No.9:=20=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E4=BA=86=20=E8=8F=9C=E5=8D=95=E6=A0=8F-=E6=96=87?= =?UTF-8?q?=E4=BB=B6=20=E4=B8=8B=E7=9A=84=E6=89=80=E6=9C=89=E5=AD=90?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=9A=84=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/actions/edit/RedoAction.java | 7 ++++--- .../java/com/fr/design/actions/edit/UndoAction.java | 9 +++++---- .../fr/design/actions/file/OpenTemplateAction.java | 8 ++++---- .../fr/design/actions/file/SaveAsTemplateAction.java | 6 +++--- .../com/fr/design/actions/file/SwitchExistEnv.java | 10 +++++----- .../src/main/java/com/fr/design/menu/MenuDef.java | 2 +- .../images/buttonicon/new_form_for_dock_normal.svg | 8 ++++++++ .../fr/design/images/buttonicon/newcpts_normal.svg | 11 +++++++++++ .../com/fr/design/images/buttonicon/open_normal.svg | 7 +++++++ .../images/data/bind/distance_connect_normal.svg | 10 ++++++++++ .../design/images/data/bind/local_connect_normal.svg | 8 ++++++++ .../com/fr/design/images/m_file/export_normal.svg | 8 ++++++++ .../com/fr/design/images/m_file/formExport_normal.svg | 11 +++++++++++ .../com/fr/design/images/m_file/saveAs_normal.svg | 7 +++++++ .../com/fr/design/images/m_file/switch_normal.svg | 7 +++++++ .../java/com/fr/design/actions/NewFormAction.java | 4 ++-- .../src/main/java/com/fr/design/mainframe/JForm.java | 2 +- .../actions/file/newReport/NewPolyReportAction.java | 10 +++++----- .../actions/file/newReport/NewWorkBookAction.java | 4 ++-- .../main/java/com/fr/design/mainframe/JWorkBook.java | 2 +- .../java/com/fr/start/preload/ImagePreLoader.java | 7 ++++++- 21 files changed, 116 insertions(+), 32 deletions(-) create mode 100644 designer-base/src/main/resources/com/fr/design/images/buttonicon/new_form_for_dock_normal.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/buttonicon/newcpts_normal.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/buttonicon/open_normal.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/data/bind/distance_connect_normal.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/data/bind/local_connect_normal.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_file/export_normal.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_file/formExport_normal.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_file/saveAs_normal.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_file/switch_normal.svg diff --git a/designer-base/src/main/java/com/fr/design/actions/edit/RedoAction.java b/designer-base/src/main/java/com/fr/design/actions/edit/RedoAction.java index 2d4c99d29e..4ed649dc29 100644 --- a/designer-base/src/main/java/com/fr/design/actions/edit/RedoAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/edit/RedoAction.java @@ -5,7 +5,7 @@ package com.fr.design.actions.edit; import java.awt.event.ActionEvent; -import com.fr.base.BaseUtils; +import com.fr.base.svg.SVGIcon; import com.fr.design.DesignerEnvManager; import com.fr.design.actions.TemplateComponentActionInterface; import com.fr.design.actions.UpdateAction; @@ -23,7 +23,8 @@ public class RedoAction extends UpdateAction implements TemplateComponentActionI this.setMenuKeySet(KeySetUtils.REDO); this.setName(getMenuKeySet().getMenuKeySetName()); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/redo.png")); + this.setSmallIcon(SVGIcon.readSVGIcon("com/fr/design/images/buttonicon/redo_normal.svg")); + this.setDisabledIcon(SVGIcon.readSVGIcon("com/fr/design/images/buttonicon/redo_disabled.svg")); this.setAccelerator(getMenuKeySet().getKeyStroke()); } @@ -56,4 +57,4 @@ public class RedoAction extends UpdateAction implements TemplateComponentActionI } } -} \ No newline at end of file +} diff --git a/designer-base/src/main/java/com/fr/design/actions/edit/UndoAction.java b/designer-base/src/main/java/com/fr/design/actions/edit/UndoAction.java index d775ff9551..4faedd6ac0 100644 --- a/designer-base/src/main/java/com/fr/design/actions/edit/UndoAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/edit/UndoAction.java @@ -5,7 +5,7 @@ package com.fr.design.actions.edit; import java.awt.event.ActionEvent; -import com.fr.base.BaseUtils; +import com.fr.base.svg.SVGIcon; import com.fr.design.DesignerEnvManager; import com.fr.design.actions.TemplateComponentActionInterface; import com.fr.design.actions.UpdateAction; @@ -23,10 +23,11 @@ public class UndoAction extends UpdateAction implements TemplateComponentActionI this.setMenuKeySet(KeySetUtils.UNDO); this.setName(getMenuKeySet().getMenuKeySetName()); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/undo.png")); + this.setSmallIcon(SVGIcon.readSVGIcon("com/fr/design/images/buttonicon/undo_normal.svg")); + this.setDisabledIcon(SVGIcon.readSVGIcon("com/fr/design/images/buttonicon/undo_disabled.svg")); this.setAccelerator(getMenuKeySet().getKeyStroke()); } - + @Override public JTemplate getEditingComponent() { return t; @@ -57,4 +58,4 @@ public class UndoAction extends UpdateAction implements TemplateComponentActionI } -} \ No newline at end of file +} diff --git a/designer-base/src/main/java/com/fr/design/actions/file/OpenTemplateAction.java b/designer-base/src/main/java/com/fr/design/actions/file/OpenTemplateAction.java index 091fb112a5..c6e4addf1d 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/OpenTemplateAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/OpenTemplateAction.java @@ -5,7 +5,7 @@ package com.fr.design.actions.file; import java.awt.event.ActionEvent; -import com.fr.base.BaseUtils; +import com.fr.base.svg.SVGIcon; import com.fr.design.actions.UpdateAction; import com.fr.design.mainframe.DesignerContext; import com.fr.design.menu.KeySetUtils; @@ -17,12 +17,12 @@ import com.fr.file.FILEChooserPane; * Open Template. */ public class OpenTemplateAction extends UpdateAction { - + public OpenTemplateAction() { this.setMenuKeySet(KeySetUtils.OPEN_TEMPLATE); this.setName(getMenuKeySet().getMenuKeySetName()); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/open.png")); + this.setSmallIcon(SVGIcon.readSVGIcon("/com/fr/design/images/buttonicon/open_normal.svg")); this.setAccelerator(getMenuKeySet().getKeyStroke()); } @@ -42,4 +42,4 @@ public class OpenTemplateAction extends UpdateAction { DesignerContext.getDesignerFrame().openTemplate(file); } } -} \ No newline at end of file +} diff --git a/designer-base/src/main/java/com/fr/design/actions/file/SaveAsTemplateAction.java b/designer-base/src/main/java/com/fr/design/actions/file/SaveAsTemplateAction.java index 5d2ab15705..cba0607b05 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/SaveAsTemplateAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/SaveAsTemplateAction.java @@ -5,7 +5,7 @@ package com.fr.design.actions.file; import java.awt.event.ActionEvent; -import com.fr.base.BaseUtils; +import com.fr.base.svg.SVGIcon; import com.fr.design.actions.JTemplateAction; import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.KeySetUtils; @@ -20,7 +20,7 @@ public class SaveAsTemplateAction extends JTemplateAction> { this.setMenuKeySet(KeySetUtils.SAVE_AS_TEMPLATE); this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/saveAs.png")); + this.setSmallIcon(SVGIcon.readSVGIcon("/com/fr/design/images/m_file/saveAs_normal.svg")); } /** @@ -45,4 +45,4 @@ public class SaveAsTemplateAction extends JTemplateAction> { // 另存为按钮应该一直可用使用 this.setEnabled(true); } -} \ No newline at end of file +} diff --git a/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java b/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java index 1e222dd26c..944e8493db 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java @@ -1,6 +1,6 @@ package com.fr.design.actions.file; -import com.fr.base.BaseUtils; +import com.fr.base.svg.SVGIcon; import com.fr.design.DesignerEnvManager; import com.fr.design.EnvChangeEntrance; import com.fr.design.actions.UpdateAction; @@ -21,11 +21,11 @@ public class SwitchExistEnv extends MenuDef { initMenuDef(); } - private void initMenuDef() { + private void initMenuDef() { Iterator nameIt = DesignerEnvManager.getEnvManager().getEnvNameIterator(); while (nameIt.hasNext()) { String name = nameIt.next(); - this.setIconPath("com/fr/design/images/m_file/switch.png"); + this.setIconPath("com/fr/design/images/m_file/switch_normal.svg", true); this.addShortCut(new GetExistEnvAction(name)); } this.addShortCut(SeparatorDef.DEFAULT); @@ -42,11 +42,11 @@ public class SwitchExistEnv extends MenuDef { DesignerWorkspaceInfo env = DesignerEnvManager.getEnvManager().getWorkspaceInfo(envName); switch (env.getType()) { case Local: { - this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/data/bind/localconnect.png")); + this.setSmallIcon(SVGIcon.readSVGIcon("com/fr/design/images/data/bind/local_connect_normal.svg")); break; } case Remote: { - this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/data/bind/distanceconnect.png")); + this.setSmallIcon(SVGIcon.readSVGIcon("com/fr/design/images/data/bind/distance_connect_normal.svg")); break; } } diff --git a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java index 689560e955..fb657f475a 100644 --- a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java +++ b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java @@ -201,7 +201,7 @@ public class MenuDef extends ShortCut { createdJMenu = createJMenu0(); createdJMenu.setMnemonic(this.getMnemonic()); if (this.iconPath != null) { - createdJMenu.setIcon(BaseUtils.readIcon(this.iconPath)); + createdJMenu.setIcon(isSVGIcon ? SVGIcon.readSVGIcon(iconPath) : BaseUtils.readIcon(iconPath)); } MenuListener menuListener = createMenuListener(); createdJMenu.addMenuListener(menuListener); diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/new_form_for_dock_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/new_form_for_dock_normal.svg new file mode 100644 index 0000000000..82797df980 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/new_form_for_dock_normal.svg @@ -0,0 +1,8 @@ + + + icon_新建表单_normal + + + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/newcpts_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/newcpts_normal.svg new file mode 100644 index 0000000000..22e258dc27 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/newcpts_normal.svg @@ -0,0 +1,11 @@ + + + icon_标签栏_工作簿_normal + + + + + + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/open_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/open_normal.svg new file mode 100644 index 0000000000..e39847cf2a --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/open_normal.svg @@ -0,0 +1,7 @@ + + + icon_导入文件_normal + + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/images/data/bind/distance_connect_normal.svg b/designer-base/src/main/resources/com/fr/design/images/data/bind/distance_connect_normal.svg new file mode 100644 index 0000000000..ff87b3e47d --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/data/bind/distance_connect_normal.svg @@ -0,0 +1,10 @@ + + + icon_distanceconnect_normal + + + + + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/images/data/bind/local_connect_normal.svg b/designer-base/src/main/resources/com/fr/design/images/data/bind/local_connect_normal.svg new file mode 100644 index 0000000000..dad50a6051 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/data/bind/local_connect_normal.svg @@ -0,0 +1,8 @@ + + + icon_HomeFolderIcon_normal + + + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/images/m_file/export_normal.svg b/designer-base/src/main/resources/com/fr/design/images/m_file/export_normal.svg new file mode 100644 index 0000000000..693fba9383 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/m_file/export_normal.svg @@ -0,0 +1,8 @@ + + + icon_服务器工具栏_输出_normal + + + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/images/m_file/formExport_normal.svg b/designer-base/src/main/resources/com/fr/design/images/m_file/formExport_normal.svg new file mode 100644 index 0000000000..cf751fc185 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/m_file/formExport_normal.svg @@ -0,0 +1,11 @@ + + + icon_新建聚合报表_normal + + + + + + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/images/m_file/saveAs_normal.svg b/designer-base/src/main/resources/com/fr/design/images/m_file/saveAs_normal.svg new file mode 100644 index 0000000000..a94f787543 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/m_file/saveAs_normal.svg @@ -0,0 +1,7 @@ + + + icon_另存为_normal + + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/images/m_file/switch_normal.svg b/designer-base/src/main/resources/com/fr/design/images/m_file/switch_normal.svg new file mode 100644 index 0000000000..2bde0dd525 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/m_file/switch_normal.svg @@ -0,0 +1,7 @@ + + + icon_切换工作目录_normal + + + + \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/actions/NewFormAction.java b/designer-form/src/main/java/com/fr/design/actions/NewFormAction.java index 8004b739f2..d56e1ef2d4 100644 --- a/designer-form/src/main/java/com/fr/design/actions/NewFormAction.java +++ b/designer-form/src/main/java/com/fr/design/actions/NewFormAction.java @@ -1,6 +1,6 @@ package com.fr.design.actions; -import com.fr.base.BaseUtils; +import com.fr.base.svg.SVGIcon; import com.fr.design.actions.UpdateAction; import com.fr.design.mainframe.BaseJForm; import com.fr.design.mainframe.DesignerContext; @@ -21,7 +21,7 @@ public class NewFormAction extends UpdateAction { this.setMenuKeySet(NEW_FORM); this.setName(getMenuKeySet().getMenuKeySetName()); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/new_form3.png")); + this.setSmallIcon(SVGIcon.readSVGIcon("/com/fr/design/images/buttonicon/new_form_for_dock_normal.svg")); this.setAccelerator(getMenuKeySet().getKeyStroke()); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 7cdd7fd600..95d8468369 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -247,7 +247,7 @@ public class JForm extends JTemplate implements BaseJForm { .addShortCut(new PageExcelExportAction(this), new ExcelExportAction(this), new PageToSheetExcelExportAction(this)); // Export - MenuDef MenuDef exportMenuDef = new MenuDef(KeySetUtils.EXPORT.getMenuName()); - exportMenuDef.setIconPath("/com/fr/design/images/m_file/export.png"); + exportMenuDef.setIconPath("/com/fr/design/images/m_file/export_normal.svg", true); addShortCut(exportMenuDef, excelExportMenuDef); return exportMenuDef; } diff --git a/designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java b/designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java index ad3770faff..76b693f9de 100644 --- a/designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java +++ b/designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java @@ -46,7 +46,8 @@ public class ImagePreLoader { private String[] preLoadImages = { "com/fr/design/images/m_file/formExport.png", - "com/fr/base/images/oem/cpt.png", + "com/fr/design/images/m_file/formExport_normal.svg", + "com/fr/base/images/oem/cpt.xpng", "com/fr/design/images/data/store_procedure.png", "/com/fr/design/images/m_file/preview.png", "com/fr/base/images/cell/blank.gif", @@ -111,6 +112,7 @@ public class ImagePreLoader { "com/fr/design/images/buttonicon/mouseoverclose icon.png", "com/fr/design/images/buttonicon/pressclose icon.png", "com/fr/design/images/buttonicon/open.png", + "com/fr/design/images/buttonicon/open_normal.svg", "com/fr/design/images/m_file/view_folder.png", "com/fr/design/images/data/source/rename.png", "com/fr/design/images/buttonicon/minus.png", @@ -144,6 +146,7 @@ public class ImagePreLoader { "com/fr/design/images/log/selectedall.png", "com/fr/design/images/log/setting.png", "com/fr/design/images/buttonicon/newcpts.png", + "com/fr/design/images/buttonicon/newcpts_normal.svg", "com/fr/base/images/oem/logo.png", "com/fr/design/images/data/bind/localconnect.png", "com/fr/design/images/gui/tab_add_normal.png", @@ -343,8 +346,10 @@ public class ImagePreLoader { "com/fr/design/images/control/refresh.png", "com/fr/design/images/toolbarbtn/close.png", "com/fr/design/images/buttonicon/new_form3.png", + "com/fr/design/images/buttonicon/new_form_for_dock_normal.svg", "com/fr/design/images/m_file/save.png", "com/fr/design/images/m_file/saveAs.png", + "com/fr/design/images/m_file/saveAs_normal.svg", "com/fr/design/images/m_edit/undo.png", "com/fr/design/images/m_edit/redo.png", "com/fr/design/images/m_file/excel.png",