|
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
public class TextBlockComposer
The TextBlockComposer defines set of methods
that supports a custom text field handling and editing
| Field Summary | |
|---|---|
char |
fillChar
Characted for filling out "empty" symbols |
static byte |
FIXED_SIZE
Fixed size style - Block size id predefined, user is scrolling though each symbol of the block |
static byte |
STATIC_FOCUSABLE
Static but focusable style - modification is possible for whole block only |
protected byte |
STYLE
The current TextBlockComposer formatting style. |
static byte |
VARIABLE_SIZE
Variable size style - Max length of the block is defined only, user is scrolling though entered symbols only |
| Fields inherited from class com.jmobilecore.ui.core.TextFieldComposer |
|---|
caretPosition, curLen, text |
| Constructor Summary | |
|---|---|
TextBlockComposer(byte style,
int length)
Constructs new instance of TextBlockComposer with specified style and length |
|
TextBlockComposer(byte style,
int length,
char fillChar)
Constructs new instance of TextBlockComposer with specified style, length
and filling characted |
|
TextBlockComposer(byte style,
java.lang.String staticContent)
Constructs new instance of TextBlockComposer with static style. |
|
TextBlockComposer(java.lang.String staticContent)
Constructs new instance of TextBlockComposer with static style. |
|
| Method Summary | |
|---|---|
boolean |
addChar(char ch,
boolean insertMode)
Adds new symbol or replaces the current one |
boolean |
backspace()
Deletes previous symbol, moves cursor one position left |
boolean |
caretLeft()
Moves the caret one position left |
boolean |
caretRight()
Moves the caret one position right |
void |
clear()
Clear out the field |
boolean |
deleteChar()
Deletes the current symbol for variable size field Replace the burrent symbol for fixed size field Do nothing for static field |
int |
getCaretPosition()
Returns the caret position |
boolean |
isComplete()
Tests if editing of the field is complete |
boolean |
setCaretPosition(int caretPosition)
Sets the caret position |
void |
setText(java.lang.String newText)
Sets the text that is presented by this text component to be the specified text. |
| 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 char fillChar
public static final byte FIXED_SIZE
public static final byte STATIC_FOCUSABLE
protected final byte STYLE
public static final byte VARIABLE_SIZE
| Constructor Detail |
|---|
public TextBlockComposer(byte style,
int length)
TextBlockComposer with specified style and length
style - TextBlockComposer style, cannot be STATIClength - the length for fixed size style, the max length for variable size style
java.lang.RuntimeException - if style is STATIC or STATIC_FOCUSABLE
public TextBlockComposer(byte style,
int length,
char fillChar)
TextBlockComposer with specified style, length
and filling characted
style - TextBlockComposer style, cannot be STATIClength - 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 or STATIC_FOCUSABLE
public TextBlockComposer(byte style,
java.lang.String staticContent)
TextBlockComposer with static style.
style - TextBlockComposer style, can be STATIC or STATIC_FOCUSABLE onlystaticContent - the static (non-editable) contentpublic TextBlockComposer(java.lang.String staticContent)
TextBlockComposer with static style.
staticContent - the static (non-editable) content| Method Detail |
|---|
public boolean addChar(char ch,
boolean insertMode)
addChar in interface AbstractComposeraddChar in class TextFieldComposerch - 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 boolean backspace()
backspace in interface AbstractComposerbackspace in class TextFieldComposertrue if the delete and moving is possible/done, false otherwisepublic boolean caretLeft()
caretLeft in interface AbstractComposercaretLeft in class TextFieldComposertrue if the moving is possible/done, false otherwisepublic boolean caretRight()
caretRight in interface AbstractComposercaretRight in class TextFieldComposertrue if the moving is possible/done, false otherwisepublic void clear()
public boolean deleteChar()
deleteChar in interface AbstractComposerdeleteChar in class TextFieldComposertrue if the delete possible/done, false otherwisepublic int getCaretPosition()
TextFieldComposer
getCaretPosition in interface AbstractComposergetCaretPosition in class TextFieldComposerpublic boolean isComplete()
true if field is valid (complete and has correct value), false otherwisepublic boolean setCaretPosition(int caretPosition)
TextFieldComposer
setCaretPosition in interface AbstractComposersetCaretPosition in class TextFieldComposercaretPosition - new caret position
true if operation is successful, false otherwisepublic void setText(java.lang.String newText)
TextFieldComposer
setText in interface AbstractComposersetText in class TextFieldComposernewText - the new text.
|
jMobileCore toolkit | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||