From 2b2fd78d01ffe9224dac9dcb799109f8c7e6a6ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=B8=96=E8=B1=AA?= <1944167742@qq.com> Date: Fri, 12 Jul 2024 17:20:32 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=BC=95=E6=93=8E?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=BC=B9=E7=AA=97=E7=BF=BB=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/itree/filetree/TemplateFileTree.java | 17 ++++++++++++++--- .../design/javascript/ExportJavaScriptPane.java | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java index b87a70b5b6..998c55e3a3 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java @@ -38,10 +38,17 @@ public class TemplateFileTree extends EnvFileTree { private static final int MAX_NODE_EXPAND_NUM = 50; private static final int MAX_MATCHED_NODE_NUM = 500; + private boolean exportTemplate = false; + public TemplateFileTree() { super(ProjectConstants.REPORTLETS_NAME, null, null); } + public TemplateFileTree(boolean exportTemplate) { + this(); + this.exportTemplate = exportTemplate; + } + /* * 选中reportPath */ @@ -152,13 +159,17 @@ public class TemplateFileTree extends EnvFileTree { Set supportTypes = new HashSet(); if (filter != null) { for (String temp : filter.getSupportedTypes()) { - supportTypes.add(FileExtension.parse(temp)); + if (!(exportTemplate && temp.endsWith("fvs"))) { + supportTypes.add(FileExtension.parse(temp)); + } } } Set apps = ExtraDesignClassManager.getInstance().getArray(App.MARK_STRING); for (App temp : apps) { - for (String extendsion : temp.defaultExtensions()) { - supportTypes.add(FileExtension.parse(extendsion)); + for (String extension : temp.defaultExtensions()) { + if (!(exportTemplate && extension.endsWith("fvs"))) { + supportTypes.add(FileExtension.parse(extension)); + } } } return supportTypes; diff --git a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java index 6c2e46e985..8fce015398 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java @@ -965,7 +965,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane Date: Mon, 15 Jul 2024 10:56:03 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=BC=95=E6=93=8E?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=BC=B9=E7=AA=97=E7=BF=BB=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/itree/filetree/TemplateFileTree.java | 16 ++++------------ .../design/javascript/ExportJavaScriptPane.java | 4 ++-- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java index 998c55e3a3..c0f9c14c68 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java @@ -38,17 +38,10 @@ public class TemplateFileTree extends EnvFileTree { private static final int MAX_NODE_EXPAND_NUM = 50; private static final int MAX_MATCHED_NODE_NUM = 500; - private boolean exportTemplate = false; - public TemplateFileTree() { super(ProjectConstants.REPORTLETS_NAME, null, null); } - public TemplateFileTree(boolean exportTemplate) { - this(); - this.exportTemplate = exportTemplate; - } - /* * 选中reportPath */ @@ -159,16 +152,15 @@ public class TemplateFileTree extends EnvFileTree { Set supportTypes = new HashSet(); if (filter != null) { for (String temp : filter.getSupportedTypes()) { - if (!(exportTemplate && temp.endsWith("fvs"))) { - supportTypes.add(FileExtension.parse(temp)); - } + supportTypes.add(FileExtension.parse(temp)); } } Set apps = ExtraDesignClassManager.getInstance().getArray(App.MARK_STRING); for (App temp : apps) { for (String extension : temp.defaultExtensions()) { - if (!(exportTemplate && extension.endsWith("fvs"))) { - supportTypes.add(FileExtension.parse(extension)); + FileExtension fileExtension = FileExtension.parse(extension); + if (filter == null || !filter.getNotSupportedTypes().contains(fileExtension)) { + supportTypes.add(fileExtension); } } } diff --git a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java index 8fce015398..84d681c529 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java @@ -965,8 +965,8 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane Date: Wed, 14 Aug 2024 10:21:09 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=89=AA=E5=88=87?= =?UTF-8?q?=E3=80=81=E5=A4=8D=E5=88=B6=E6=8C=89=E9=92=AEfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/parameter/FormParaDesigner.java | 18 ++++++++++++++++-- .../com/fr/design/mainframe/FormDesigner.java | 12 ++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java b/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java index 20f8203ace..5a3eb5a8ab 100644 --- a/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java +++ b/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java @@ -88,6 +88,8 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP private static Image paraImage = BaseUtils.readImage("/com/fr/design/images/form/parameter.png"); + private UpdateAction[] basicMainPaneActions; + public FormParaDesigner() { this(new FormParameterUI()); } @@ -342,6 +344,14 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP return designerActions.toArray(new UpdateAction[designerActions.size()]); } + public UpdateAction[] getBasicMainActions() { + if (basicMainPaneActions == null) { + basicMainPaneActions = new UpdateAction[]{new CutAction(this), new CopyAction(this), new PasteAction(this), + new FormDeleteAction(this)}; + } + return basicMainPaneActions; + } + private boolean searchQueryCreators(XLayoutContainer rootContainer) { boolean b = false; for (int i = 0; i < rootContainer.getXCreatorCount(); i++) { @@ -736,8 +746,12 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP * @return 按钮组 a */ public JComponent[] toolBarButton4Form() { - return new JComponent[]{new CutAction(this).createToolBarComponent(), new CopyAction(this).createToolBarComponent(), new PasteAction(this).createToolBarComponent(), - new FormDeleteAction(this).createToolBarComponent()}; + UpdateAction[] actions = getBasicMainActions(); + JComponent[] components = new JComponent[actions.length]; + for (int i = 0; i < actions.length; i++) { + components[i] = actions[i].createToolBarComponent(); + } + return components; } @Override diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java index 87f7465490..bee2a32dc4 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java @@ -777,6 +777,14 @@ public class FormDesigner extends TargetComponent
implements TreeSelection for (UpdateAction action : getActions()) { action.update(); } + + UpdateAction[] actions = getBasicMainActions(); + if (actions != null) { + for (UpdateAction action : actions) { + action.update(); + } + } + } } @@ -1485,6 +1493,10 @@ public class FormDesigner extends TargetComponent implements TreeSelection return designerActions.toArray(new UpdateAction[designerActions.size()]); } + public UpdateAction[] getBasicMainActions() { + return null; + } + private List getBasicActions(){ if (basicActions == null) { basicActions = new ArrayList(); From 884b5ed842d73ea7e7e331d443491fcc6e51ee20 Mon Sep 17 00:00:00 2001 From: renekton Date: Wed, 14 Aug 2024 10:26:53 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=89=AA=E5=88=87?= =?UTF-8?q?=E3=80=81=E5=A4=8D=E5=88=B6=E6=8C=89=E9=92=AEfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/itree/filetree/TemplateFileTree.java | 7 ++----- .../com/fr/design/javascript/ExportJavaScriptPane.java | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java index c0f9c14c68..b87a70b5b6 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java @@ -157,11 +157,8 @@ public class TemplateFileTree extends EnvFileTree { } Set apps = ExtraDesignClassManager.getInstance().getArray(App.MARK_STRING); for (App temp : apps) { - for (String extension : temp.defaultExtensions()) { - FileExtension fileExtension = FileExtension.parse(extension); - if (filter == null || !filter.getNotSupportedTypes().contains(fileExtension)) { - supportTypes.add(fileExtension); - } + for (String extendsion : temp.defaultExtensions()) { + supportTypes.add(FileExtension.parse(extendsion)); } } return supportTypes; diff --git a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java index 84d681c529..6c2e46e985 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java @@ -966,7 +966,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane Date: Wed, 14 Aug 2024 10:28:19 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=89=AA=E5=88=87?= =?UTF-8?q?=E3=80=81=E5=A4=8D=E5=88=B6=E6=8C=89=E9=92=AEfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/form/parameter/FormParaDesigner.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java b/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java index 5a3eb5a8ab..bdca6c2ae5 100644 --- a/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java +++ b/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java @@ -344,6 +344,10 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP return designerActions.toArray(new UpdateAction[designerActions.size()]); } + /** + * 主面板区域控件按钮action组 + * @return + */ public UpdateAction[] getBasicMainActions() { if (basicMainPaneActions == null) { basicMainPaneActions = new UpdateAction[]{new CutAction(this), new CopyAction(this), new PasteAction(this),