From 16dd77dc30e6d30a5a89bade080efe77f58932ae Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 8 Dec 2020 11:11:10 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-42240=20=E3=80=9010.0.13=E3=80=91?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=87=8C=E5=8A=9F=E8=83=BD=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=EF=BC=88=E8=A1=A8=E5=8D=95=E3=80=81=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=EF=BC=89=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EastRegionContainerPane.java | 28 ++++++++++++------- .../mainframe/widget/BasicPropertyPane.java | 17 +++++------ .../com/fr/design/preview/FormPreview.java | 3 +- .../fit/menupane/ReportFitAttrAction.java | 5 ++-- .../widget/WidgetBoundsPaneFactory.java | 21 +++++++------- .../ui/FormBasicWidgetPropertyPane.java | 11 ++++---- .../ui/BasicWidgetPropertySettingPane.java | 7 +++-- 7 files changed, 50 insertions(+), 42 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 546d4beb0..8c59f23f5 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -98,16 +98,24 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private PropertyItem selectedItem; // 当前被选中的属性配置项 public enum PropertyMode { - REPORT, // 报表 - REPORT_PARA, // 报表参数面板 - REPORT_FLOAT, // 报表悬浮元素 - FORM, // 表单 - FORM_REPORT, // 表单报表块 - POLY, // 聚合报表 - POLY_REPORT, // 聚合报表-报表块 - POLY_CHART, // 聚合报表-图表块 - AUTHORITY_EDITION, // 权限编辑 - AUTHORITY_EDITION_DISABLED // 权限编辑 + REPORT("report"), // 报表 + REPORT_PARA("reportPara"), // 报表参数面板 + REPORT_FLOAT("reportFloat"), // 报表悬浮元素 + FORM("form"), // 表单 + FORM_REPORT("formReport"), // 表单报表块 + POLY("poly"), // 聚合报表 + POLY_REPORT("polyReport"), // 聚合报表-报表块 + POLY_CHART("polyChart"), // 聚合报表-图表块 + AUTHORITY_EDITION("authorityEdition"), // 权限编辑 + AUTHORITY_EDITION_DISABLED ("authorityEditionDisabled"); // 权限编辑 + + private String value; + PropertyMode(String value) { + this.value = value; + } + public String getValue() { + return this.value; + } } private PropertyMode currentMode; // 当前模式(根据不同模式,显示不同的可用面板) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/BasicPropertyPane.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/BasicPropertyPane.java index 3ee762214..23cc188ed 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/BasicPropertyPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/BasicPropertyPane.java @@ -4,6 +4,7 @@ import com.fr.design.designer.IntervalConstants; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -56,26 +57,22 @@ public class BasicPropertyPane extends BasicPane { } } }; - widgetName.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic")); - addBasicComponents(); - } - - public void addBasicComponents(){ + widgetName.setGlobalName(Toolkit.i18nText("Fine-Design_Report_Basic")); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; double[] rowSize = {p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}}; - Component[][] components = createBasicComponents(); + Component[][] components = new Component[][]{ + new Component[]{new UILabel(obtainBasicName()), widgetName}, + }; JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); this.add(panel, BorderLayout.NORTH); } - public Component[][] createBasicComponents(){ - return new Component[][]{ - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Name")), widgetName}, - }; + public String obtainBasicName(){ + return Toolkit.i18nText("Fine-Design_Basic_Component_Name"); } public UITextField getWidgetNameField() { diff --git a/designer-base/src/main/java/com/fr/design/preview/FormPreview.java b/designer-base/src/main/java/com/fr/design/preview/FormPreview.java index b16c0595f..178779f51 100644 --- a/designer-base/src/main/java/com/fr/design/preview/FormPreview.java +++ b/designer-base/src/main/java/com/fr/design/preview/FormPreview.java @@ -1,6 +1,7 @@ package com.fr.design.preview; import com.fr.design.fun.impl.AbstractPreviewProvider; +import com.fr.design.i18n.Toolkit; /** @@ -12,7 +13,7 @@ public class FormPreview extends AbstractPreviewProvider { @Override public String nameForPopupItem() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_PC_Preview"); + return Toolkit.i18nText("Fine-Design_Form_M_PC_Preview"); } @Override diff --git a/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java b/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java index ac0472f11..06770c1b4 100644 --- a/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java +++ b/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java @@ -4,6 +4,7 @@ import com.fr.design.actions.JTemplateAction; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.UIDialog; +import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.MenuKeySet; @@ -26,7 +27,7 @@ public class ReportFitAttrAction extends JTemplateAction { @Override public String getMenuName() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_PC_Fit_Attr"); + return Toolkit.i18nText("Fine-Designer_PC_Fit_Attr"); } @Override @@ -42,7 +43,7 @@ public class ReportFitAttrAction extends JTemplateAction { @Override public String getMenuName() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_PC_Element_Case_Fit_Attr"); + return Toolkit.i18nText("Fine-Designer_PC_Element_Case_Fit_Attr"); } @Override diff --git a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java index 19a046f48..9b2b64d09 100644 --- a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java @@ -4,6 +4,7 @@ import com.fr.design.designer.IntervalConstants; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -25,8 +26,8 @@ public class WidgetBoundsPaneFactory { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Size")), createRightPane(width, height)}, - new Component[]{null, createRightPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))}, + new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Component_Size")), createRightPane(width, height)}, + new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))}, }; double[] rowSize = {p, p}; double[] columnSize = {f, RIGHT_PANE_WIDTH}; @@ -34,7 +35,7 @@ public class WidgetBoundsPaneFactory { final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W5, IntervalConstants.INTERVAL_L6); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); boundsPane.add(panel); - return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane); + return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane); } public static JPanel createRightPane(Component com1, Component com2){ double f = TableLayout.FILL; @@ -53,12 +54,12 @@ public class WidgetBoundsPaneFactory { double p = TableLayout.PREFERRED; Component[][] northComponents = new Component[][]{ - new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Position")), createRightPane(x, y)}, - new Component[]{null, createRightPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_X_Coordinate"), SwingConstants.CENTER), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Y_Coordinate"), SwingConstants.CENTER))}, + new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Position")), createRightPane(x, y)}, + new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_X_Coordinate"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Y_Coordinate"), SwingConstants.CENTER))}, }; Component[][] centerComponents = new Component[][]{ - new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Size")), createRightPane(width, height)}, - new Component[]{null, createRightPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))}, + new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Size")), createRightPane(width, height)}, + new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))}, }; double[] rowSize = {p, p}; double[] columnSize = {f, RIGHT_PANE_WIDTH}; @@ -70,7 +71,7 @@ public class WidgetBoundsPaneFactory { centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); boundsPane.add(northPanel, BorderLayout.NORTH); boundsPane.add(centerPanel, BorderLayout.CENTER); - return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 230, 24, boundsPane); + return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 230, 24, boundsPane); } @@ -79,7 +80,7 @@ public class WidgetBoundsPaneFactory { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Size")), width}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Component_Size")), width}, }; double[] rowSize = {p}; double[] columnSize = {p, f}; @@ -87,6 +88,6 @@ public class WidgetBoundsPaneFactory { final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); boundsPane.add(panel); - return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane); + return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane); } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java index de7cdb41b..27d55ac28 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.widget.ui; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; import com.fr.form.ui.Widget; import javax.swing.BorderFactory; @@ -18,17 +19,15 @@ public class FormBasicWidgetPropertyPane extends BasicSetVisiblePropertyPane { } public UICheckBox createOtherConfig() { - enableCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enabled"), true); - enableCheckBox.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic")); + enableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enabled"), true); + enableCheckBox.setGlobalName(Toolkit.i18nText("Fine-Design_Report_Basic")); enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); return enableCheckBox; } - public Component[][] createBasicComponents(){ - return new Component[][]{ - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetName}, - }; + public String obtainBasicName(){ + return Toolkit.i18nText("Fine-Design_Basic_Widget_Name"); } @Override diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java index 23fd119f3..1be67275f 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java @@ -4,6 +4,7 @@ import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.dialog.BasicPane; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.NoneWidget; @@ -25,16 +26,16 @@ public class BasicWidgetPropertySettingPane extends BasicPane { public BasicWidgetPropertySettingPane() { this.setLayout(new BorderLayout()); - enableCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enabled"), true); + enableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enabled"), true); enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); - visibleCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Visible"), true); + visibleCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Form_Widget_Visible"), true); visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); widgetNameComboBox = new ParameterTreeComboBox(); widgetNameComboBox.refreshTree(); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetNameComboBox}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetNameComboBox}, new Component[]{enableCheckBox, null}, new Component[]{visibleCheckBox, null}, };