|
jMobileCore toolkit | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.jmobilecore.ui.core.Component
com.jmobilecore.ui.core.TextComponent
com.jmobilecore.ui.core.TextField
com.jmobilecore.ui.IPv4Field
public class IPv4Field
This class displays one or two fields for the entry a TCP/IP address in specifield format
| Field Summary | |
|---|---|
static byte |
IP_ONLY
IP address and no port information to display |
static byte |
IP_PORT
IP address and port information to display |
byte |
STYLE
The current IPField formatting style. |
| Fields inherited from class com.jmobilecore.ui.core.TextField |
|---|
adjustment, calculatedCaretPosition, calculatedCursorOffset, composer, currentLength, DEFAULT_SIZE, echoChar, HOFFSET, SCROLLABLE, VOFFSET |
| Fields inherited from class com.jmobilecore.ui.core.TextComponent |
|---|
ALL_SPEC_CHARS, BORDER_GAP, BORDER_WIDTH, C_ALL_SPEC_CHARS, C_ALPHA, C_ALPHA_NUMERIC, C_ANY, C_EMAIL, C_EMAIL_SPEC_CHARS, C_LOWER_CASE, C_NO_CHARS, C_NUMERIC, C_SPACE, C_UPPER_CASE, cHandler, CHAR_OPTIONS, charOptionCounter, constraint, CURSOR_DELAY, CURSOR_TYPE_LINE, CURSOR_TYPE_SYMBOL, editable, EMAIL_SPEC_CHARS, insertMode, KEY_OPTIONS, lastKeyCode, LC_CHARS, NUMERIC_CHARS, SPACE_CHARS, UC_CHARS, validChars |
| Fields inherited from class com.jmobilecore.ui.core.Component |
|---|
alignment, background, CENTER, focusable, focusedBackground, focusedForeground, font, foreground, height, isCompletelyVisible, isFocused, isVisible, LEFT, parentScreen, RIGHT, screenY, valid, width |
| Constructor Summary | |
|---|---|
IPv4Field()
Constructs a new IPv4Field object. |
|
IPv4Field(byte style)
Constructs a new IPv4Field object of specified format. |
|
IPv4Field(byte style,
int host,
int port)
Constructs a new IPv4Field object of specified format
and sets it to the specified value. |
|
| Method Summary | |
|---|---|
java.lang.String |
getFormattedText()
Get formatted representation of Ipv4Field value
or null if IPv4Field object value is set to null or incomplete |
protected char[] |
getFormattedText(boolean calcCursorOffset)
|
java.lang.String |
getHost()
Returns the string representation of TCP/IP address host value that is presented by this component. |
int |
getIPv4Host()
Returns the TCP/IP address host value that is presented by this component. |
long |
getIPv4Port()
Returns the TCP/IP address port value that is presented by this component. |
java.lang.String |
getPort()
Returns the string representation of TCP/IP address port value that is presented by this component. |
protected CustomFieldComposer |
initComposer()
Initialize IPv4 field composer |
boolean |
isValid()
Tests IPv4 field value for correctness |
boolean |
setIPv4(int host,
long port)
Sets the TCP/IP address that is presented by this IPv4 component to be the specified value. |
| Methods inherited from class com.jmobilecore.ui.core.TextField |
|---|
adjust, destructor, getComposer, getCursorOffset, getText, init, keyPressed, paint, paintCursor, setHeight, setText |
| Methods inherited from class com.jmobilecore.ui.core.TextComponent |
|---|
addValidChars, getCaretPosition, getKeyOption, initCursor, isCharValid, preProcessKeyCode, processKeyCode, resetCursor, resetCursorHandler, setCaretPosition |
| Methods inherited from class com.jmobilecore.ui.core.Component |
|---|
getBackground, getFont, getForeground, getHeight, getWidth, invalidate, isFocusOwner, keyReleased, keyRepeated, paintBackground, pointerDragged, pointerPressed, pointerReleased, prepareForeground, releaseFocus, requestFocus, setFont |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte IP_ONLY
public static final byte IP_PORT
public final byte STYLE
| Constructor Detail |
|---|
public IPv4Field()
IPv4Field object.
public IPv4Field(byte style)
IPv4Field object of specified format.
style - the IP address format
public IPv4Field(byte style,
int host,
int port)
IPv4Field object of specified format
and sets it to the specified value.
style - the IP address formathost - the IP address host valueport - the IP address port value| Method Detail |
|---|
public java.lang.String getFormattedText()
Ipv4Field value
or null if IPv4Field object value is set to null or incomplete
String representing bank card numberprotected char[] getFormattedText(boolean calcCursorOffset)
getFormattedText in class TextFieldpublic java.lang.String getHost()
String value representing the host part of TCP/IP address or
null if IPv4 field is invalid or incompletepublic int getIPv4Host()
int value representing the host part of TCP/IP address or
-1 if IPv4 field is invalid or incompletepublic long getIPv4Port()
int value representing the port part of TCP/IP address or
-1 if IPv4 field is invalid or incompletepublic java.lang.String getPort()
String value representing the port part of TCP/IP address or
null if IPv4 field is invalid or incompleteprotected CustomFieldComposer initComposer()
CustomFieldComposer for IPv4 fieldpublic boolean isValid()
true if the IP address field is valid
false otherwise
public boolean setIPv4(int host,
long port)
host - the IP address host valueport - the IP address port value
|
jMobileCore toolkit | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||