From 27de4a0d2926047a4b6b728e36a5c94e86cc2cb9 Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Fri, 16 Aug 2019 16:46:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-19466=20=E3=80=90=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E3=80=91=E7=BB=84=E4=BB=B6=E7=BA=A7?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E9=80=89=E4=B8=AD=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/designer/mobile/ChartEditorDefinePane.java | 15 ++++++++++++--- .../ui/designer/mobile/ElementCaseDefinePane.java | 8 ++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) 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 b9ae12e208..258be7d1b5 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 @@ -48,6 +48,7 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { private AttributeChangeListener changeListener; private UILabel tipLabel; private UICheckBox allowFullCheckBox;//允许全屏 + private UICheckBox functionalWhenUnactivatedCheckBox;//组件未激活时可使用组件内功能 public ChartEditorDefinePane(XCreator xCreator) { this.xCreator = xCreator; @@ -88,6 +89,8 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { panel.add(unavailableTipLabel, BorderLayout.NORTH); allowFullCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Allow_Full_Screen")); panel.add(allowFullCheckBox); + functionalWhenUnactivatedCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Functional_When_Unactivated")); + panel.add(functionalWhenUnactivatedCheckBox); return panel; } @@ -98,19 +101,21 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { tipLabel.setForeground(Color.gray); updateTipLabel(); allowFullCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Allow_Full_Screen")); + functionalWhenUnactivatedCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Functional_When_Unactivated")); Component[][] components = new Component[][]{ new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Zoom_In_Logic"), SwingConstants.LEFT), new UILabel(ChartMobileFitAttrState.PROPORTION.description())}, new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Zoom_Out_Logic"), SwingConstants.LEFT), zoomOutComboBox}, new Component[] {tipLabel, null}, - new Component[] {allowFullCheckBox} + new Component[] {allowFullCheckBox}, + new Component[] {functionalWhenUnactivatedCheckBox} }; 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(); @@ -154,6 +159,8 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { BaseChartEditor chartEditor = (BaseChartEditor)xCreator.toData(); boolean allowFullScreen = chartEditor.getMobileAttr().isAllowFullScreen(); this.allowFullCheckBox.setSelected(allowFullScreen); + boolean isFunctionalWhenUnactivated = chartEditor.getMobileAttr().isFunctionalWhenUnactivated(); + this.functionalWhenUnactivatedCheckBox.setSelected(isFunctionalWhenUnactivated); this.bindListeners2Widgets(); this.addAttributeChangeListener(changeListener); @@ -188,8 +195,10 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { mobileAttr.setZoomInAttr(ChartMobileFitAttrState.PROPORTION); mobileAttr.setZoomOutAttr((ChartMobileFitAttrState) ((Item) zoomOutComboBox.getSelectedItem()).getValue()); mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected()); + mobileAttr.setFunctionalWhenUnactivated(functionalWhenUnactivatedCheckBox.isSelected()); }else { mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected()); + mobileAttr.setFunctionalWhenUnactivated(functionalWhenUnactivatedCheckBox.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 9e833f0ae4..43f063f4ad 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 @@ -50,6 +50,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ private UISpinner maxHeightSpinner; // 最大高度Spinner private AttributeChangeListener changeListener; private UICheckBox allowFullCheckBox; + private UICheckBox functionalWhenUnactivatedCheckBox; public ElementCaseDefinePane (XCreator xCreator) { this.xCreator = xCreator; @@ -87,11 +88,14 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ allowFullCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Allow_Full_Screen")); + functionalWhenUnactivatedCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Functional_When_Unactivated")); + Component[][] components = new Component[][]{ new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Horizontal"), SwingConstants.LEFT), hComboBox}, new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Vertical"), SwingConstants.LEFT), vComboBox}, new Component[] {heightRestrictCheckBox, null}, new Component[] {allowFullCheckBox}, + new Component[] {functionalWhenUnactivatedCheckBox}, new Component[] {maxHeightLabel, maxHeightSpinner} }; double f = TableLayout.FILL; @@ -139,6 +143,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ this.maxHeightSpinner.setVisible(elementCaseEditor.isHeightRestrict()); this.maxHeightSpinner.setValue(elementCaseEditor.getHeightPercent()); this.allowFullCheckBox.setSelected(elementCaseEditor.isAllowFullScreen()); + this.functionalWhenUnactivatedCheckBox.setSelected(elementCaseEditor.isFunctionalWhenUnactivated()); } @Override @@ -163,6 +168,8 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ break; case "allowFullCheckBox": ((ElementCaseEditor)xCreator.toData()).setAllowFullScreen(allowFullCheckBox.isSelected()); + case "functionalWhenUnactivatedCheckBox": + ((ElementCaseEditor)xCreator.toData()).setAllowFullScreen(functionalWhenUnactivatedCheckBox.isSelected()); } } @@ -172,6 +179,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ this.heightRestrictCheckBox.setGlobalName("heightRestrictCheckBox"); this.maxHeightSpinner.setGlobalName("maxHeightSpinner"); this.allowFullCheckBox.setGlobalName("allowFullCheckBox"); + this.functionalWhenUnactivatedCheckBox.setGlobalName("functionalWhenUnactivatedCheckBox"); } } From 603d0d2c8202f327fb630a9afd9f2a8bcd3a9c32 Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Sat, 17 Aug 2019 12:13:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-19466=20=E3=80=90=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E3=80=91=E7=BB=84=E4=BB=B6=E7=BA=A7?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E9=80=89=E4=B8=AD=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/ChartEditorDefinePane.java | 4 +-- .../mobile/ElementCaseDefinePane.java | 36 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) 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 258be7d1b5..a91ebd7492 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 @@ -107,8 +107,8 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Zoom_In_Logic"), SwingConstants.LEFT), new UILabel(ChartMobileFitAttrState.PROPORTION.description())}, new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Zoom_Out_Logic"), SwingConstants.LEFT), zoomOutComboBox}, new Component[] {tipLabel, null}, - new Component[] {allowFullCheckBox}, - new Component[] {functionalWhenUnactivatedCheckBox} + new Component[] {allowFullCheckBox, null}, + new Component[] {functionalWhenUnactivatedCheckBox, null} }; double f = TableLayout.FILL; 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 43f063f4ad..5f255bb60f 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 @@ -29,10 +29,10 @@ import java.awt.Component; /** * 报表块-移动端属性面板 - * + *

* Created by fanglei on 2017/8/8. */ -public class ElementCaseDefinePane extends MobileWidgetDefinePane{ +public class ElementCaseDefinePane extends MobileWidgetDefinePane { private static final double MAX_HEIGHT_LIMIT = 0.8; private static final Item[] ITEMS = { new Item(MobileFitAttrState.HORIZONTAL.description(), MobileFitAttrState.HORIZONTAL), @@ -52,7 +52,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ private UICheckBox allowFullCheckBox; private UICheckBox functionalWhenUnactivatedCheckBox; - public ElementCaseDefinePane (XCreator xCreator) { + public ElementCaseDefinePane(XCreator xCreator) { this.xCreator = xCreator; } @@ -94,16 +94,16 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Horizontal"), SwingConstants.LEFT), hComboBox}, new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Vertical"), SwingConstants.LEFT), vComboBox}, new Component[] {heightRestrictCheckBox, null}, - new Component[] {allowFullCheckBox}, - new Component[] {functionalWhenUnactivatedCheckBox}, + new Component[] {allowFullCheckBox, null}, + new Component[] {functionalWhenUnactivatedCheckBox, null}, new Component[] {maxHeightLabel, maxHeightSpinner} }; double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - double[] rowSize = {p, p, p, p, p}; - double[] columnSize = {p,f}; - 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); + double[] rowSize = {p, p, p, p, p, p}; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1}, {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(); panelWrapper.add(panel, BorderLayout.NORTH); @@ -135,9 +135,9 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ public void populate(FormDesigner designer) { this.designer = designer; this.addAttributeChangeListener(changeListener); - ElementCaseEditor elementCaseEditor = (ElementCaseEditor)xCreator.toData(); - this.hComboBox.setSelectedItem(new Item (elementCaseEditor.getHorziontalAttr().description(), elementCaseEditor.getHorziontalAttr())); - this.vComboBox.setSelectedItem(new Item (elementCaseEditor.getVerticalAttr().description(), elementCaseEditor.getVerticalAttr())); + ElementCaseEditor elementCaseEditor = (ElementCaseEditor) xCreator.toData(); + this.hComboBox.setSelectedItem(new Item(elementCaseEditor.getHorziontalAttr().description(), elementCaseEditor.getHorziontalAttr())); + this.vComboBox.setSelectedItem(new Item(elementCaseEditor.getVerticalAttr().description(), elementCaseEditor.getVerticalAttr())); this.heightRestrictCheckBox.setSelected(elementCaseEditor.isHeightRestrict()); this.maxHeightLabel.setVisible(elementCaseEditor.isHeightRestrict()); this.maxHeightSpinner.setVisible(elementCaseEditor.isHeightRestrict()); @@ -152,24 +152,24 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{ String globalName = this.getGlobalName(); switch (globalName) { case "hComboBox": - ((ElementCaseEditor)xCreator.toData()).setHorziontalAttr(((MobileFitAttrState)((Item)hComboBox.getSelectedItem()).getValue())); + ((ElementCaseEditor) xCreator.toData()).setHorziontalAttr(((MobileFitAttrState) ((Item) hComboBox.getSelectedItem()).getValue())); break; case "vComboBox": - ((ElementCaseEditor)xCreator.toData()).setVerticalAttr(((MobileFitAttrState)((Item)vComboBox.getSelectedItem()).getValue())); + ((ElementCaseEditor) xCreator.toData()).setVerticalAttr(((MobileFitAttrState) ((Item) vComboBox.getSelectedItem()).getValue())); break; case "heightRestrictCheckBox": boolean isHeightRestrict = heightRestrictCheckBox.isSelected(); - ((ElementCaseEditor)xCreator.toData()).setHeightRestrict(isHeightRestrict); + ((ElementCaseEditor) xCreator.toData()).setHeightRestrict(isHeightRestrict); maxHeightSpinner.setVisible(isHeightRestrict); maxHeightLabel.setVisible(isHeightRestrict); break; case "maxHeightSpinner": - ((ElementCaseEditor)xCreator.toData()).setHeightPercent(maxHeightSpinner.getValue()); + ((ElementCaseEditor) xCreator.toData()).setHeightPercent(maxHeightSpinner.getValue()); break; case "allowFullCheckBox": - ((ElementCaseEditor)xCreator.toData()).setAllowFullScreen(allowFullCheckBox.isSelected()); + ((ElementCaseEditor) xCreator.toData()).setAllowFullScreen(allowFullCheckBox.isSelected()); case "functionalWhenUnactivatedCheckBox": - ((ElementCaseEditor)xCreator.toData()).setAllowFullScreen(functionalWhenUnactivatedCheckBox.isSelected()); + ((ElementCaseEditor) xCreator.toData()).setFunctionalWhenUnactivated(functionalWhenUnactivatedCheckBox.isSelected()); } }