From d5a216c38e99ab3e294233b9fab4d85ecc78bed9 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 14 Oct 2019 11:15:29 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E3=80=901004=E5=9B=9E=E5=BD=92=E3=80=91?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E9=9D=A2=E6=9D=BF-=E8=B6=85=E7=BA=A7?= =?UTF-8?q?=E9=93=BE=E6=8E=A5-=E7=BD=91=E7=BB=9C=E6=8A=A5=E8=A1=A8-?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86=E8=AE=BE=E7=BD=AE=20=E7=A6=81?= =?UTF-8?q?=E6=AD=A2=E8=BE=93=E5=85=A5=E8=B4=9F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/itextfield/UINumberField.java | 8 ++++++++ .../com/fr/design/hyperlink/ReportletHyperNorthPane.java | 2 ++ 2 files changed, 10 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java b/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java index 1ffb3c1dd..f71a11f43 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java +++ b/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java @@ -35,6 +35,7 @@ public class UINumberField extends UITextField { private double maxValue = Double.MAX_VALUE; private boolean isContentChanged = false; + private boolean fillNegativeNumbers = true; public UINumberField() { this(MAX_INTEGERLENGTH_32, MAX_DECIMALLENGTH); @@ -62,6 +63,10 @@ public class UINumberField extends UITextField { initListener(); } + public void canFillNegativeNumber(boolean canFillNegativeNumbers) { + this.fillNegativeNumbers = canFillNegativeNumbers; + } + public int getMaxIntegerLength() { return maxIntegerLength; } @@ -185,6 +190,9 @@ public class UINumberField extends UITextField { // kunsnat: 这种限制输入 有个不好的地方, 比如删除时: 10.1 最大值限定100, 那么就删除中间的小数点之后变为101, 超出了100. // 但是直接限制不能删除中间类似小数点, 那么也可能遇到: 最小值10 , 从100变化到其中的19, 就很难.. private boolean notChange(String strNew) { + if (!fillNegativeNumbers && strNew.contains("-")) { + return true; + } boolean noChange = false; boolean isMinus = strNew.startsWith("-"); strNew = strNew.replaceFirst("-", StringUtils.EMPTY); // 控制能输入负数 diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java index c1e454f1b..43710cd0f 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java @@ -368,6 +368,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane Date: Mon, 14 Oct 2019 11:18:46 +0800 Subject: [PATCH 2/4] update --- .../java/com/fr/design/gui/itextfield/UINumberField.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java b/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java index f71a11f43..12b894ddc 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java +++ b/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java @@ -35,7 +35,7 @@ public class UINumberField extends UITextField { private double maxValue = Double.MAX_VALUE; private boolean isContentChanged = false; - private boolean fillNegativeNumbers = true; + private boolean fillNegativeNumber = true; public UINumberField() { this(MAX_INTEGERLENGTH_32, MAX_DECIMALLENGTH); @@ -63,8 +63,8 @@ public class UINumberField extends UITextField { initListener(); } - public void canFillNegativeNumber(boolean canFillNegativeNumbers) { - this.fillNegativeNumbers = canFillNegativeNumbers; + public void canFillNegativeNumber(boolean fillNegativeNumber) { + this.fillNegativeNumber = fillNegativeNumber; } public int getMaxIntegerLength() { @@ -190,7 +190,7 @@ public class UINumberField extends UITextField { // kunsnat: 这种限制输入 有个不好的地方, 比如删除时: 10.1 最大值限定100, 那么就删除中间的小数点之后变为101, 超出了100. // 但是直接限制不能删除中间类似小数点, 那么也可能遇到: 最小值10 , 从100变化到其中的19, 就很难.. private boolean notChange(String strNew) { - if (!fillNegativeNumbers && strNew.contains("-")) { + if (!fillNegativeNumber && strNew.contains("-")) { return true; } boolean noChange = false; From caf12de0894726ac1964bf129e0ed935f55c4d2f Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 14 Oct 2019 11:37:06 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-22757=E3=80=901004=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E3=80=91=E8=AE=BE=E8=AE=A1=E9=9D=A2=E6=9D=BF-=E9=94=AE?= =?UTF-8?q?=E9=BC=A0=E6=93=8D=E4=BD=9C-=E6=99=BA=E8=83=BD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8D=95=E5=85=83=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/ElementCasePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java index a28156110..4e12bd5f8 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java @@ -863,7 +863,7 @@ public abstract class ElementCasePane extends Tar // those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == SelectionListener.class) { - ((SelectionListener) listeners[i + 1]).selectionChanged(new SelectionEvent(this)); + ((SelectionListener) listeners[i + 1]).selectionChanged(new SelectionEvent(ElementCasePane.this)); } } } From cbe8ae87ab1bbf78cdb55750ee8ed179ad87db15 Mon Sep 17 00:00:00 2001 From: WeiYanglu Date: Mon, 14 Oct 2019 18:25:27 +0800 Subject: [PATCH 4/4] =?UTF-8?q?MOBILE-23324=20=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=83=8C=E6=99=AF=E6=8D=A2=E6=88=90=E5=8F=AF?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E9=80=8F=E6=98=8E=E7=9A=84?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/mobile/ui/MobileStyleDefinePane.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java index 1ec8fe5e5..93c24ad69 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java @@ -5,7 +5,7 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.style.color.NewColorSelectBox; +import com.fr.design.style.color.ColorSelectBox; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.Widget; import com.fr.form.ui.mobile.MobileStyle; @@ -23,7 +23,7 @@ public class MobileStyleDefinePane extends BasicBeanPane { private Widget widget; private MobileStyleCustomDefinePane customBeanPane; private Class mobileStyleClazz; - private NewColorSelectBox colorSelectBox; + private ColorSelectBox colorSelectBox; private Color titleColor = new Color(47, 142, 241); MobileStyleDefinePane(Widget widget, Class customBeanPaneClass, @@ -91,7 +91,7 @@ public class MobileStyleDefinePane extends BasicBeanPane { UILabel colorSelectLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Widget_Background"), UILabel.RIGHT); colorSelectLabel.setPreferredSize(new Dimension(65, 20)); - colorSelectBox = new NewColorSelectBox(152); + colorSelectBox = new ColorSelectBox(152); colorSelectBox.addSelectChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) {