|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo.app.Component
nextapp.echo.app.text.TextComponent
nextapp.echo.app.TextField
echopoint.internal.TextField
echopoint.RegexTextField
echopoint.NumberTextField
public class NumberTextField
A simple extension of RegexTextField that allows only
numeric characters and one period (.) to be entered. The precision
(number of fractional digits may be controlled using the setPrecision(int) method.
The following shows sample use of this component:
import nextapp.echo.app.TextField;
import echopoint.NumberTextField;
...
final TextField tf = new NumberTextField( 2 );
grid.add( tf );
| Field Summary | |
|---|---|
static String |
PROPERTY_PRECISION
|
| Fields inherited from class echopoint.RegexTextField |
|---|
PROPERTY_REGEX |
| Fields inherited from class echopoint.internal.TextField |
|---|
PROPERTY_DEFAULT_TEXT |
| Constructor Summary | |
|---|---|
NumberTextField()
Default constructor. |
|
NumberTextField(int precision)
Create a new instance with the specified precision value. |
|
| Method Summary | |
|---|---|
int |
getPrecision()
Return the value of the PROPERTY_PRECISION property. |
void |
setPrecision(int precision)
Set the value of the PROPERTY_PRECISION property. |
void |
setRegex(String regex)
Over-ridden to do nothing. |
| Methods inherited from class echopoint.RegexTextField |
|---|
getRegex |
| Methods inherited from class echopoint.internal.TextField |
|---|
getDefaultText, setDefaultText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_PRECISION
| Constructor Detail |
|---|
public NumberTextField()
public NumberTextField(int precision)
precision - The maximum number of fractional digits allowed.| Method Detail |
|---|
public int getPrecision()
PROPERTY_PRECISION property. This
indicates the number of fractional digits allowed in the number.
-1 if not set.public void setPrecision(int precision)
PROPERTY_PRECISION property.
precision - The maximum number of fractional digits.public void setRegex(String regex)
setRegex in class RegexTextFieldregex - The regular expression to use.
|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||