From 0c389d83e7b6f2642fc1c51780c5661e5ceb9645 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Tue, 24 Jul 2018 17:56:08 +0800 Subject: [PATCH 1/3] REPORT-9377 & REPORT-9953 --- .../java/com/fr/design/actions/help/AboutPane.java | 4 +++- .../ui/designer/mobile/ChartEditorDefinePane.java | 11 ++++++++--- .../ui/designer/mobile/ElementCaseDefinePane.java | 8 ++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java index 5bc1465f70..d503ff15de 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java @@ -81,7 +81,9 @@ public class AboutPane extends JPanel { contentPane.add(urlActionPane); contentPane.add(emailPane); - contentPane.add(getRemarkPane()); + if (FRContext.getLocale().equals(Locale.CHINA) || FRContext.getLocale().equals(Locale.TAIWAN)){ + contentPane.add(getRemarkPane()); + } if (shouldShowThanks()) { addThankPane(contentPane); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java index fe299bfaa3..285e12e761 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java @@ -10,6 +10,7 @@ import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.designer.properties.items.Item; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; @@ -50,6 +51,7 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { private UIComboBox zoomOutComboBox;// 缩小逻辑下拉框 private AttributeChangeListener changeListener; private UILabel tipLabel; + private UICheckBox allowFullCheckBox;//允许全屏 public ChartEditorDefinePane(XCreator xCreator) { this.xCreator = xCreator; @@ -102,18 +104,21 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { tipLabel = new UILabel(); tipLabel.setForeground(Color.gray); updateTipLabel(); + allowFullCheckBox = new UICheckBox(Inter.getLocText("Fine-Designer_Allow_Full_Screen")); + allowFullCheckBox.setSelected(true); Component[][] components = new Component[][]{ new Component[] {new UILabel(Inter.getLocText("FR-Designer_Zoom_In_Logic"), SwingConstants.LEFT), new UILabel(ChartMobileFitAttrState.PROPORTION.description())}, new Component[] {new UILabel(Inter.getLocText("FR-Designer_Zoom_Out_Logic"), SwingConstants.LEFT), zoomOutComboBox}, - new Component[] {tipLabel, null} + new Component[] {tipLabel, null}, + new Component[] {allowFullCheckBox} }; double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - double[] rowSize = {p, p, p}; + double[] rowSize = {p, p, p, p}; double[] columnSize = {p,f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 30, LayoutConstants.VGAP_LARGE); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java index cbfbfb68cb..88ef1f4a69 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java @@ -49,6 +49,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ private UILabel maxHeightLabel; private UISpinner maxHeightSpinner; // 最大高度Spinner private AttributeChangeListener changeListener; + private UICheckBox allowFullCheckBox; public ElementCaseDefinePane (XCreator xCreator) { this.xCreator = xCreator; @@ -84,17 +85,20 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ maxHeightSpinner.setVisible(false); maxHeightLabel.setVisible(false); + allowFullCheckBox = new UICheckBox(Inter.getLocText("Fine-Designer_Allow_Full_Screen")); + Component[][] components = new Component[][]{ new Component[] {new UILabel(Inter.getLocText("FR-Designer_Mobile-Horizontal"), SwingConstants.LEFT), hComboBox}, new Component[] {new UILabel(Inter.getLocText("FR-Designer_Mobile-Vertical"), SwingConstants.LEFT), vComboBox}, new Component[] {heightRestrictCheckBox, null}, + new Component[] {allowFullCheckBox}, new Component[] {maxHeightLabel, maxHeightSpinner} }; double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - double[] rowSize = {p, p, p, p}; + double[] rowSize = {p, p, p, p, p}; double[] columnSize = {p,f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 30, LayoutConstants.VGAP_LARGE); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); From 8ee1ce5044c521ac3dcb9dc9974f0ffa1e337e15 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 25 Jul 2018 14:05:21 +0800 Subject: [PATCH 2/3] REPORT-9377 & REPORT-9953 --- .../widget/ui/designer/mobile/ChartEditorDefinePane.java | 4 +++- .../widget/ui/designer/mobile/ElementCaseDefinePane.java | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java index d43475841b..e65269b88e 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java @@ -97,7 +97,6 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { tipLabel.setForeground(Color.gray); updateTipLabel(); allowFullCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Allow_Full_Screen")); - allowFullCheckBox.setSelected(true); Component[][] components = new Component[][]{ new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Zoom_In_Logic"), SwingConstants.LEFT), new UILabel(ChartMobileFitAttrState.PROPORTION.description())}, @@ -159,6 +158,8 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { ChartMobileFitAttrStateProvider zoomOutAttr = chartEditor.getMobileAttr().getZoomOutAttr(); this.zoomOutComboBox.setSelectedItem(new Item(zoomOutAttr.description(), zoomOutAttr)); updateTipLabel(); + boolean allowFullScreen = chartEditor.getMobileAttr().isAllowFullScreen(); + this.allowFullCheckBox.setSelected(allowFullScreen); // 数据 populate 完成后,再设置监听 this.bindListeners2Widgets(); @@ -184,6 +185,7 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { ChartMobileAttrProvider mobileAttr = ((BaseChartEditor)xCreator.toData()).getMobileAttr(); mobileAttr.setZoomInAttr(ChartMobileFitAttrState.PROPORTION); mobileAttr.setZoomOutAttr((ChartMobileFitAttrState)((Item)zoomOutComboBox.getSelectedItem()).getValue()); + mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected()); DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来 } } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java index 8f26119e68..58ddd80e5e 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java @@ -138,6 +138,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ this.maxHeightLabel.setVisible(elementCaseEditor.isHeightRestrict()); this.maxHeightSpinner.setVisible(elementCaseEditor.isHeightRestrict()); this.maxHeightSpinner.setValue(elementCaseEditor.getHeightPercent()); + this.allowFullCheckBox.setSelected(elementCaseEditor.isAllowFullScreen()); } @Override @@ -160,6 +161,9 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ case "maxHeightSpinner": ((ElementCaseEditor)xCreator.toData()).setHeightPercent(maxHeightSpinner.getValue()); break; + case "allowFullCheckBox": + ((ElementCaseEditor)xCreator.toData()).setAllowFullScreen(allowFullCheckBox.isSelected()); + break; } } @@ -168,6 +172,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ this.vComboBox.setGlobalName("vComboBox"); this.heightRestrictCheckBox.setGlobalName("heightRestrictCheckBox"); this.maxHeightSpinner.setGlobalName("maxHeightSpinner"); + this.allowFullCheckBox.setGlobalName("allowFullCheckBox"); } } From c57680e903aa62ea043d049480670cc9c5b7fe00 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 25 Jul 2018 15:21:48 +0800 Subject: [PATCH 3/3] REPORT-9953 --- .../design/widget/ui/designer/mobile/ElementCaseDefinePane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java index 58ddd80e5e..951acc98f3 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java @@ -163,7 +163,6 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ break; case "allowFullCheckBox": ((ElementCaseEditor)xCreator.toData()).setAllowFullScreen(allowFullCheckBox.isSelected()); - break; } }