|
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.TimeField
public class TimeField
This class displays formatted textfield for entering time information Format of the time is specified by user. Blocks of digits are separated by divider.
| Field Summary | |
|---|---|
protected static java.lang.String |
AM
|
char |
divider
The divider for date formatting |
static byte |
HH_mm
Time format, example: 09:00. |
static byte |
HH_mm_ss
Time format, example: 19:03:24. |
static byte |
hh_mm_ssX
Time format, example: 09:07:32PM. |
static byte |
hh_mmX
Time format, example: 11:07AM. |
protected int |
hour
|
protected int |
min
|
protected boolean |
pm
|
protected static java.lang.String |
PM
|
protected int |
sec
|
protected byte |
STYLE
The current TimeField 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 | |
|---|---|
TimeField()
Constructs a new TimeField field. |
|
TimeField(byte style)
Constructs a new TimeField field of specified format |
|
TimeField(byte style,
char divider)
Constructs a new TimeField field of specified format |
|
TimeField(byte style,
char divider,
java.util.Date time)
Constructs a new TimeField object with the specified value. |
|
| Method Summary | |
|---|---|
protected boolean |
getBlocks()
Sets sec, min, hour, pm variables
If the field contains invalid value, the method sets
variable hour to -1 |
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)
|
byte |
getStyle()
|
java.util.Date |
getTime()
Returns the time value that is presented by this component. |
protected CustomFieldComposer |
initComposer()
Initialize time field composer |
boolean |
isValid()
Tests time field value for correctness |
void |
setStyle(byte newStyle)
|
void |
setStyle(byte newStyle,
char divider)
|
void |
setStyle(byte newStyle,
char divider,
java.util.Date newTime)
|
void |
setTime(java.util.Date time)
Sets time that is presented by this time 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 |
|---|
protected static final java.lang.String AM
public char divider
public static final byte HH_mm
public static final byte HH_mm_ss
public static final byte hh_mm_ssX
public static final byte hh_mmX
protected int hour
protected int min
protected boolean pm
protected static final java.lang.String PM
protected int sec
protected byte STYLE
| Constructor Detail |
|---|
public TimeField()
TimeField field.
public TimeField(byte style)
TimeField field of specified format
style - the time format
public TimeField(byte style,
char divider)
TimeField field of specified format
style - the time formatdivider - the divider for the time field
public TimeField(byte style,
char divider,
java.util.Date time)
TimeField object with the specified value.
time - the date valuesetStyle(byte)| Method Detail |
|---|
protected boolean getBlocks()
sec, min, hour, pm variables
If the field contains invalid value, the method sets
variable hour to -1
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 byte getStyle()
public java.util.Date getTime()
Date value is set to 0 (year, month, day)
protected CustomFieldComposer initComposer()
CustomFieldComposer for time fieldpublic boolean isValid()
true if the time field is valid
false otherwisepublic void setStyle(byte newStyle)
public void setStyle(byte newStyle,
char divider)
public void setStyle(byte newStyle,
char divider,
java.util.Date newTime)
public void setTime(java.util.Date time)
time argument is ignored
time - the date value
|
jMobileCore toolkit | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||