From 43ecfb0bb1452daeb22a2bf48068526d261f6306 Mon Sep 17 00:00:00 2001 From: richie Date: Wed, 28 Aug 2019 21:51:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E6=95=B0=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/ui/component/UIIntNumberField.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/fanruan/api/design/ui/component/UIIntNumberField.java b/src/main/java/com/fanruan/api/design/ui/component/UIIntNumberField.java index cb1e76b..08dafa1 100644 --- a/src/main/java/com/fanruan/api/design/ui/component/UIIntNumberField.java +++ b/src/main/java/com/fanruan/api/design/ui/component/UIIntNumberField.java @@ -1,5 +1,29 @@ package com.fanruan.api.design.ui.component; +/** + * 整数控件,该控件只能输入整数数字 + */ public class UIIntNumberField extends com.fr.design.gui.itextfield.UIIntNumberField { - public UIIntNumberField(){}; + + public UIIntNumberField() { + + } + + /** + * 获取整数数值 + * + * @return 整数值 + */ + public int getInt() { + return (int) getValue(); + } + + /** + * 设置整数数值 + * + * @param value 整数值 + */ + public void setInt(int value) { + setValue(value); + } }