diff --git a/designer-form/src/main/java/com/fr/design/form/parameter/FormParaTargetMode.java b/designer-form/src/main/java/com/fr/design/form/parameter/FormParaTargetMode.java index 72c7b8bfd..02ea653f2 100644 --- a/designer-form/src/main/java/com/fr/design/form/parameter/FormParaTargetMode.java +++ b/designer-form/src/main/java/com/fr/design/form/parameter/FormParaTargetMode.java @@ -1,7 +1,6 @@ package com.fr.design.form.parameter; -import com.fr.base.svg.IconUtils; import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.properties.WidgetPropertyTable; import com.fr.design.gui.core.WidgetOption; @@ -12,6 +11,7 @@ import com.fr.form.main.parameter.FormParameterUI; import com.fr.form.parameter.FormSubmitButton; +import com.fr.form.ui.PageFixedRowComboBox; import java.util.ArrayList; public class FormParaTargetMode extends FormDesignerModeForSpecial { @@ -28,7 +28,9 @@ public class FormParaTargetMode extends FormDesignerModeForSpecial= '0' && ch <= '9')) { + event.consume(); + } + } + + @Override + public void caretPositionChanged(InputMethodEvent event) { + + } + }; + + KeyListener rowCountKeyListener = new KeyAdapter() { + @Override + public void keyReleased(KeyEvent e) { + String rowCount = pageFixedRowCountTextField.getText(); + if (!isRowCountValid(rowCount)) { + pageFixedRowCountTextField.setText(StringUtils.EMPTY); + } + } + }; + + private boolean isRowCountValid(String rowCount) { + Matcher matcher = ROW_COUNT.matcher(rowCount); + if(matcher.find()){ + int count = Integer.parseInt(matcher.group()); + return count > 0 && count < 501; + } + return false; + } }