|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.rim.device.api.ui.text.TextFilter
|
+--net.rim.device.api.ui.text.IPTextFilter
Filters out characters not used in IP\Port text strings
| Field Summary | ||
static int |
NO_PORTS
A constant indicating that no ports are allowed in the string. |
|
static int |
NUMERIC_IP_ONLY
A constant indicating that if set, IP addresses can only consist of numeric characters. |
|
| Fields inherited from class net.rim.device.api.ui.text.TextFilter |
ADN_SIM_PHONE, DEFAULT, DEFAULT_SMART_PHONE, EMAIL, FDN_SIM_PHONE, FILENAME, HEXADECIMAL, INTEGER, IP, LOWERCASE, NUMERIC, PHONE, PIN_ADDRESS, REAL_NUMERIC, SIM_PHONE, SMS_PHONE, STYLE_SHIFT, UPPERCASE, URL, VOICEMAIL_PHONE |
| Constructor Summary | ||
IPTextFilter()
Constructs new IPTextFilter object with no parameters. |
||
IPTextFilter(int flag)
Constructs new IPTextFilter object. |
||
| Method Summary | ||
char |
convert(char character,
int status)
Converts a valid character to its lower case form and an invalid character to its alternate version. |
|
void |
convert(StringBuffer characters,
int status,
StringBuffer result)
Converts a valid character to its lower case form and an invalid character to its alternate version. |
|
boolean |
validate(AbstractString text)
Determines if the provided string contains valid characters. |
|
boolean |
validate(char character)
Validates a character for use with this filter. |
|
| Methods inherited from class net.rim.device.api.ui.text.TextFilter |
convert, get, validate |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NO_PORTS
public static final int NUMERIC_IP_ONLY
| Constructor Detail |
public IPTextFilter()
public IPTextFilter(int flag)
Takes an argument that specifies if UDP ports are allowed.
flag - Flag to specify if UDP ports are allowed.| Method Detail |
public char convert(char character,
int status)
convert in class TextFiltercharacter - The character to convert.status - Indicates how the character was generated: some filters use this to affect the conversion performed.public void convert(StringBuffer characters, int status, StringBuffer result)
TextFiltercharacters - The character to convert.status - Indicates how the character was generated: some filters use this to affect the conversion performed.result, - the converted result.
The lower-case form of the given alphabet character for valid characters, whether the character
was lower-case or upper-case originally. For invalid characters - returns the result of
Keypad.getAltedChar(char).public boolean validate(AbstractString text)
validate in class TextFiltertext - The string with characters to validate.public boolean validate(char character)
validate in class TextFiltercharacter - The character to validate.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.