|
jMobileCore toolkit | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jmobilecore.ui.core.TextFieldComposer
com.jmobilecore.ui.TextBlockComposer
com.jmobilecore.ui.DigitalBlockComposer
public class DigitalBlockComposer
The DigitalBlockComposer
is extension of class
TextBlockComposer
, supports digits-only text field editing
Field Summary | |
---|---|
long |
maxValue
Maximal value for the field |
long |
minValue
Minimal value for the field |
Fields inherited from class com.jmobilecore.ui.TextBlockComposer |
---|
fillChar, FIXED_SIZE, STATIC_FOCUSABLE, STYLE, VARIABLE_SIZE |
Fields inherited from class com.jmobilecore.ui.core.TextFieldComposer |
---|
caretPosition, curLen, text |
Constructor Summary | |
---|---|
DigitalBlockComposer(byte style,
int length)
Constructs new instance of DigitalBlockComposer with specified style and length |
|
DigitalBlockComposer(byte style,
int length,
char fillChar)
Constructs new instance of DigitalBlockComposer with specified style, length
and filling characted |
|
DigitalBlockComposer(byte style,
int length,
char fillChar,
long minValue,
long maxValue)
Constructs new instance of DigitalBlockComposer with specified style, length
filling characted, minimal and maximal value |
|
DigitalBlockComposer(java.lang.String staticContent)
Constructs new instance of DigitalBlockComposer with static style. |
Method Summary | |
---|---|
boolean |
addChar(char ch,
boolean insertMode)
Adds new symbol or replaces the current one |
long |
getValue()
Returns value of the field |
boolean |
isComplete()
Tests if editing of the field is complete |
boolean |
setValue(long newValue)
Sets new value to the field |
Methods inherited from class com.jmobilecore.ui.TextBlockComposer |
---|
backspace, caretLeft, caretRight, clear, deleteChar, getCaretPosition, setCaretPosition, setText |
Methods inherited from class com.jmobilecore.ui.core.TextFieldComposer |
---|
destructor, getChars, getCurrentLength, getCursorOffset, getMaxSize, getText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public long maxValue
public long minValue
Constructor Detail |
---|
public DigitalBlockComposer(byte style, int length)
DigitalBlockComposer
with specified style and length
style
- DigitalBlockComposer
style, cannot be STATIC
length
- the length for fixed size style, the max length for variable size style
java.lang.RuntimeException
- if style is STATIC
public DigitalBlockComposer(byte style, int length, char fillChar)
DigitalBlockComposer
with specified style, length
and filling characted
style
- DigitalBlockComposer
style, cannot be STATIC
length
- the length for fixed size style, the max length for variable size stylefillChar
- the characted for filling out "empty" symbols
java.lang.RuntimeException
- if style is STATIC
public DigitalBlockComposer(byte style, int length, char fillChar, long minValue, long maxValue)
DigitalBlockComposer
with specified style, length
filling characted, minimal and maximal value
style
- TextBlockComposer
style, cannot be STATIC
length
- the length for fixed size style, the max length for variable size stylefillChar
- the characted for filling out "empty" symbolsminValue
- the minimal value for the fieldmaxValue
- the maximal value for the field
java.lang.RuntimeException
- if style is STATIC
public DigitalBlockComposer(java.lang.String staticContent)
DigitalBlockComposer
with static style.
staticContent
- the static (non-editable) contentMethod Detail |
---|
public boolean addChar(char ch, boolean insertMode)
addChar
in interface AbstractComposer
addChar
in class TextBlockComposer
ch
- new symbolinsertMode
- if true
then new symbol will be added, otherwise the current symbol
will be replaced
true
if the add/replace is possible, false
otherwisepublic long getValue()
java.lang.NumberFormatException
- if field contants not-a-number valuepublic boolean isComplete()
isComplete
in class TextBlockComposer
true
if field is valid (complete and has correct value), false
otherwisepublic boolean setValue(long newValue)
newValue
- the new value for the field
true
if the field was set to new value, false
otherwise
|
jMobileCore toolkit | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |