From 56e2d9acbd75d23c2262ed33fd9e34aa321a3281 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 14 Nov 2022 16:57:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-83391=20=E9=A1=B6=E9=83=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=9D=A2=E6=9D=BF=E4=BD=93=E9=AA=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/topparam/MobileTopParamPane.java | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java index 7f19bd3683..34a5f9758b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java @@ -2,8 +2,12 @@ package com.fr.design.mainframe.mobile.ui.topparam; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.icheckbox.UICheckBox; +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; import com.fr.form.ui.mobile.impl.MobileTopParamStyle; import javax.swing.*; @@ -11,6 +15,13 @@ import java.awt.*; public class MobileTopParamPane extends BasicBeanPane { private UICheckBox autoCommitCheckBox; + private UISpinner maxDirectShowCountSpinner; + private UILabel showCountTextField; + private static final int MAX_VALUE = 4; + private static final int MIN_VALUE = 0; + private static final int DEFAULT_DIERTA = 1; + private static final int DEFAULT_VALUE = 0; + private static final int GAP = 2; public MobileTopParamPane() { this.init(); @@ -21,19 +32,29 @@ public class MobileTopParamPane extends BasicBeanPane { JPanel panel = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Plugin-TopParam_Setting")); panel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); autoCommitCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Plugin-TopParam_AutoCommit"), true); - panel.add(autoCommitCheckBox); + maxDirectShowCountSpinner = new UISpinner(MIN_VALUE, MAX_VALUE, DEFAULT_DIERTA, DEFAULT_VALUE); + showCountTextField = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Widget_Show_Count")); + Component[][] components = {{autoCommitCheckBox},{showCountTextField, maxDirectShowCountSpinner}}; + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] portRowSize = {p, p}; + double[] portColumnSize = {p, f}; + JPanel portComPane = TableLayoutHelper.createCommonTableLayoutPane(components, portRowSize, portColumnSize, GAP); + panel.add(portComPane); this.add(panel, BorderLayout.CENTER); } @Override public void populateBean(MobileTopParamStyle topParamStyle) { autoCommitCheckBox.setSelected(topParamStyle.isAutoCommit()); + maxDirectShowCountSpinner.setValue(topParamStyle.getMaxDirectShowCount()); } @Override public MobileTopParamStyle updateBean() { MobileTopParamStyle topParamStyle = new MobileTopParamStyle(); topParamStyle.setAutoCommit(autoCommitCheckBox.isSelected()); + topParamStyle.setMaxDirectShowCount((int) maxDirectShowCountSpinner.getValue()); return topParamStyle; } From 7a96c504410d4e1fa9fb8a8ba2da2c4a2343ab3e Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 14 Nov 2022 17:17:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-83391=20=E9=A1=B6=E9=83=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=9D=A2=E6=9D=BF=E4=BD=93=E9=AA=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E4=B8=8B=E5=8F=98=E9=87=8F=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/mobile/ui/topparam/MobileTopParamPane.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java index 34a5f9758b..c0fb6028ed 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java @@ -37,10 +37,10 @@ public class MobileTopParamPane extends BasicBeanPane { Component[][] components = {{autoCommitCheckBox},{showCountTextField, maxDirectShowCountSpinner}}; double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] portRowSize = {p, p}; - double[] portColumnSize = {p, f}; - JPanel portComPane = TableLayoutHelper.createCommonTableLayoutPane(components, portRowSize, portColumnSize, GAP); - panel.add(portComPane); + double[] rowSize = {p, p}; + double[] columnSize = {p, f}; + JPanel paraPane = TableLayoutHelper.createCommonTableLayoutPane(components, rowSize, columnSize, GAP); + panel.add(paraPane); this.add(panel, BorderLayout.CENTER); } From 6c53a08939474a426042844e1612743d5d2f94c3 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 14 Nov 2022 17:24:46 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-83391=20=E9=A1=B6=E9=83=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=9D=A2=E6=9D=BF=E4=BD=93=E9=AA=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9.*=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/mobile/ui/topparam/MobileTopParamPane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java index c0fb6028ed..f367365f75 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java @@ -10,8 +10,10 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.mobile.impl.MobileTopParamStyle; -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.FlowLayout; public class MobileTopParamPane extends BasicBeanPane { private UICheckBox autoCommitCheckBox;