From f8b5db66bac85006a51ca38808cc20a68e84c97e Mon Sep 17 00:00:00 2001 From: kerry Date: Sat, 9 May 2020 15:18:03 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-30735=E3=80=9010.0.6=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=86=85=E6=94=B9=E5=8A=A8=E3=80=91frm=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E7=A7=B0=E8=A7=84=E8=8C=83=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EastRegionContainerPane.java | 54 +++++++++---------- .../mainframe/widget/BasicPropertyPane.java | 2 +- .../widget/WidgetBoundsPaneFactory.java | 8 +-- .../designer/creator/XWBorderLayout.java | 10 ++-- .../design/form/util/XCreatorConstants.java | 4 +- 5 files changed, 39 insertions(+), 39 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 cf8f4f74d4..a1f88d77ce 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 @@ -130,13 +130,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer { defaultAuthorityPane = getDefaultPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Not_Support_Authority_Edit")); switchMode(PropertyMode.REPORT); setContainerWidth(CONTAINER_WIDTH); - + initPluginPane(); listenPlugin(); } - + private void listenPlugin() { - + PluginFilter filter = new PluginFilter() { @Override public boolean accept(PluginContext context) { @@ -167,15 +167,15 @@ public class EastRegionContainerPane extends UIEastResizableContainer { Set providers = runtime.get(PropertyItemPaneProvider.XML_TAG); for (PropertyItemPaneProvider provider : providers) { removePropertyItem(provider); - + } updateAllPropertyPane(); } }, filter); } - + private void removePropertyItem(PropertyItemPaneProvider provider) { - + propertyItemMap.remove(provider.key()); String replaceKey = provider.replaceKey(); if (replaceKey == null) { @@ -186,18 +186,18 @@ public class EastRegionContainerPane extends UIEastResizableContainer { replaceItem.setReplace(false); } } - + private void initPluginPane() { - + ExtraDesignClassManager classManager = PluginModule.getAgent(PluginModule.ExtraDesign); Set providers = classManager.getArray(PropertyItemPaneProvider.XML_TAG); for (PropertyItemPaneProvider provider : providers) { addPropertyItem(provider); } } - + private void addPropertyItem(PropertyItemPaneProvider provider) { - + String key = provider.key(); PropertyItemBean itemBean = provider.getItem(); PropertyItem propertyItem = new PropertyItem(itemBean.getName(), @@ -212,7 +212,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { button.addActionListener(buttonListener); } propertyItemMap.put(key, propertyItem); - + String replaceKey = provider.replaceKey(); if (replaceKey == null) { return; @@ -221,11 +221,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer { if (replaceItem != null) { replaceItem.setReplace(true); } - + } - + private void initPropertyItemList() { - + propertyItemMap = new LinkedHashMap<>(); // 有序map // 单元格元素 PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell_Element"), @@ -240,7 +240,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { "floatelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.POLY_REPORT}); // 控件设置 - PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Settings"), + PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings"), "widgetsettings", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY}, new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.FORM, PropertyMode.POLY_REPORT, PropertyMode.POLY_CHART}); // 条件属性 @@ -482,9 +482,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public void replaceConfiguredRolesPane(JComponent pane) { propertyItemMap.get(KEY_CONFIGURED_ROLES).replaceContentPane(pane); } - + public void replaceKeyPane(String key, JComponent pane) { - + propertyItemMap.get(key).replaceContentPane(pane); } @@ -653,8 +653,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private String iconSuffix = ICON_SUFFIX_NORMAL; // normal, diabled, selected, 三者之一 private final Color selectedBtnBackground = new Color(0xF5F5F7); private Color originBtnBackground; - - + + public PropertyItem(String name, String title, String btnIconName, PropertyMode[] visibleModes, PropertyMode[] enableModes) { this(name, title, btnIconName, ICON_BASE_DIR, visibleModes, enableModes); } @@ -705,12 +705,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public void setVisible(boolean isVisible) { this.isVisible = isVisible; } - + public void setReplace(boolean replace) { - + this.replace = replace; } - + public boolean isEnabled() { return isEnabled; } @@ -720,16 +720,16 @@ public class EastRegionContainerPane extends UIEastResizableContainer { this.isEnabled = isEnabled; button.setEnabled(isEnabled); } - + public void setIconBaseDir(String iconBaseDir) { this.iconBaseDir = iconBaseDir; } - + private String getIconBaseDir() { - + return StringUtils.isEmpty(iconBaseDir) ? ICON_BASE_DIR : iconBaseDir; } - + private void initPropertyPanel() { propertyPanel = new JPanel(); propertyPanel.setBackground(Color.pink); @@ -810,7 +810,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } private String getBtnIconUrl() { - + return getIconBaseDir() + btnIconName + iconSuffix; } 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 d675aceb22..099684a81a 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 @@ -63,7 +63,7 @@ public class BasicPropertyPane extends BasicPane { 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_Widget_Name")), widgetName}, + new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Name")), widgetName}, }; JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); 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 5476cb3a16..c4c840227c 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 @@ -25,7 +25,7 @@ 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_Widget_Size")), createRightPane(width, height)}, + 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))}, }; double[] rowSize = {p, p}; @@ -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_Widget_Position")), createRightPane(x, y)}, + new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_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_Widget_Size")), createRightPane(width, height)}, + 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))}, }; double[] rowSize = {p, p}; @@ -79,7 +79,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_Widget_Size")), width}, + new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Size")), width}, }; double[] rowSize = {p}; double[] columnSize = {p, f}; diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWBorderLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWBorderLayout.java index ff67634e4e..6d2003e21c 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWBorderLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWBorderLayout.java @@ -28,7 +28,7 @@ public class XWBorderLayout extends XLayoutContainer { public XWBorderLayout(){ super(new WBorderLayout(),new Dimension(WBorderLayout.DEFAULT_WIDTH, WBorderLayout.DEFAULT_HEIGHT)); } - + public XWBorderLayout(WBorderLayout widget, Dimension initSize) { super(widget, initSize); } @@ -77,7 +77,7 @@ public class XWBorderLayout extends XLayoutContainer { @Override public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { return new CRPropertyDescriptor[] { - new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Toolkit.i18nText("Fine-Design_Form_Form_Widget_Name")), + new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Toolkit.i18nText("Fine-Design_Basic_Component_Name")), new CRPropertyDescriptor("customTitleName", this.data.getClass()).setI18NName(Toolkit.i18nText("Fine-Design_Form_Title")) }; } @@ -101,7 +101,7 @@ public class XWBorderLayout extends XLayoutContainer { } isRefreshing = false; } - + /** * 设计界面中有组件添加时,要通知WLayout容器重新paint @@ -202,9 +202,9 @@ public class XWBorderLayout extends XLayoutContainer { creator.setDirections(new int[]{Direction.RIGHT}); } } - + @Override public LayoutAdapter getLayoutAdapter() { return new FRBorderLayoutAdapter(this); } -} \ No newline at end of file +} diff --git a/designer-form/src/main/java/com/fr/design/form/util/XCreatorConstants.java b/designer-form/src/main/java/com/fr/design/form/util/XCreatorConstants.java index 54b32ca6cd..71ab3c0023 100644 --- a/designer-form/src/main/java/com/fr/design/form/util/XCreatorConstants.java +++ b/designer-form/src/main/java/com/fr/design/form/util/XCreatorConstants.java @@ -19,7 +19,7 @@ public class XCreatorConstants { public static final String WIDGETNAME = "widgetName"; // 描述属性的分类 public static final String PROPERTY_CATEGORY = "category"; - public static final String DEFAULT_GROUP_NAME = "Fine-Design_Basic_Form_Basic_Properties"; + public static final String DEFAULT_GROUP_NAME = "Fine-Design_Report_Basic"; public static final String PROPERTY_VALIDATE = "Fine-Design_Basic_Validate"; public static final Color FORM_BG = new Color(255, 255, 255); // 拖拽标识块的大小 @@ -52,4 +52,4 @@ public class XCreatorConstants { // 不同粗细的线 public static final BasicStroke STROKE = new BasicStroke(2); -} \ No newline at end of file +}