From 6be11344efb029635faabe37803d33ab93679240 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 7 Dec 2020 17:21:21 +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 | 20 +++++++++++++++++++ .../mainframe/widget/BasicPropertyPane.java | 14 ++++++++++--- .../com/fr/design/preview/FormPreview.java | 2 +- .../fit/menupane/ReportFitAttrAction.java | 4 ++-- .../widget/WidgetBoundsPaneFactory.java | 4 ++-- .../widget/ui/FormBasicPropertyPane.java | 3 +++ .../ui/FormBasicWidgetPropertyPane.java | 8 ++++++++ .../ui/BasicWidgetPropertySettingPane.java | 2 +- 8 files changed, 48 insertions(+), 9 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 0703216eb..c7e24ee87 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 @@ -18,6 +18,7 @@ import com.fr.design.ui.util.UIUtil; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.general.FRFont; +import com.fr.log.FineLoggerFactory; import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginRuntime; import com.fr.plugin.injectable.PluginModule; @@ -108,6 +109,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { AUTHORITY_EDITION, // 权限编辑 AUTHORITY_EDITION_DISABLED // 权限编辑 } + private PropertyMode currentMode; // 当前模式(根据不同模式,显示不同的可用面板) @@ -400,6 +402,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private void updatePropertyItemMap() { for (PropertyItem item : propertyItemMap.values()) { item.updateStatus(); + item.updateTitle(); } } @@ -734,6 +737,23 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } } + public void updateTitle() { + try { + if ("widgetSettings".equals(name)) { + if (currentMode == PropertyMode.FORM) { + title = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings"); + } else { + title = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Settings"); + } + button.setToolTipText(title); + UILabel uiLabel = (UILabel) ((BorderLayout)popupToolPane.contentPane.getLayout()).getLayoutComponent(BorderLayout.WEST); + uiLabel.setText(title); + } + }catch (Exception e){ + FineLoggerFactory.getLogger().error(e.getMessage()); + } + } + public void reAddContentArea() { propertyPanel.add(contentArea, BorderLayout.CENTER); } 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 099684a81..3ee762214 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 @@ -57,19 +57,27 @@ public class BasicPropertyPane extends BasicPane { } }; widgetName.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic")); + addBasicComponents(); + } + + public void addBasicComponents(){ double f = TableLayout.FILL; double p = TableLayout.PREFERRED; double[] rowSize = {p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}}; - Component[][] components = new Component[][]{ - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Name")), widgetName}, - }; + Component[][] components = createBasicComponents(); 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 UITextField getWidgetNameField() { return widgetName; } 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 8522d6773..b16c0595f 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 @@ -12,7 +12,7 @@ public class FormPreview extends AbstractPreviewProvider { @Override public String nameForPopupItem() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Form_Preview"); + return com.fr.design.i18n.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 c24125059..ac0472f11 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 @@ -26,7 +26,7 @@ public class ReportFitAttrAction extends JTemplateAction { @Override public String getMenuName() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Template"); + return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_PC_Fit_Attr"); } @Override @@ -42,7 +42,7 @@ public class ReportFitAttrAction extends JTemplateAction { @Override public String getMenuName() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Elementcase"); + return com.fr.design.i18n.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 c4c840227..19a046f48 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 @@ -53,11 +53,11 @@ public class WidgetBoundsPaneFactory { double p = TableLayout.PREFERRED; Component[][] northComponents = new Component[][]{ - new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Position")), createRightPane(x, y)}, + 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))}, }; Component[][] centerComponents = new Component[][]{ - new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Size")), createRightPane(width, height)}, + 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))}, }; double[] rowSize = {p, p}; diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicPropertyPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicPropertyPane.java index 42d398416..1754d75d2 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicPropertyPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicPropertyPane.java @@ -1,8 +1,11 @@ package com.fr.design.mainframe.widget.ui; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.widget.BasicPropertyPane; import com.fr.form.ui.Widget; +import java.awt.Component; + /** * Created by ibm on 2017/8/4. */ 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 138434d30..adf658ed2 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 @@ -1,9 +1,11 @@ package com.fr.design.mainframe.widget.ui; import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; import com.fr.form.ui.Widget; import javax.swing.BorderFactory; +import java.awt.*; /** * Created by ibm on 2017/7/26. @@ -23,6 +25,12 @@ public class FormBasicWidgetPropertyPane extends BasicSetVisiblePropertyPane { return enableCheckBox; } + public Component[][] createBasicComponents(){ + return new Component[][]{ + new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetName}, + }; + } + @Override public String title4PopupWindow() { return "basicProperty"; 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 8b520f318..23fd119f3 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 @@ -34,7 +34,7 @@ public class BasicWidgetPropertySettingPane extends BasicPane { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form-Widget_Name")), widgetNameComboBox}, + new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetNameComboBox}, new Component[]{enableCheckBox, null}, new Component[]{visibleCheckBox, null}, };