Browse Source

update

feature/big-screen
hades 5 years ago
parent
commit
ed106363c6
  1. 8
      designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java

8
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;

Loading…
Cancel
Save