|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Object
Component
Text
Input
public class Input
Creates text field component used for
input. This component always uses native
MIDP2 TextBox screen for input.
Input field has set of flags. One of the type flags may be specified along with any number of modifier flags. Note that flags must also contain normal Component flags.
Type flags are:
Modifier flags are:
Input has following special style customizations:
color: Color of text
font: Font of text
line-spacing: Gap between lines of text, in pixels
cursor-color: Color of cursor, which is drawn when component is focused
| Constructor Summary | |
|---|---|
Input(Style style,
String text,
int flags)
Creates a new Input component. |
|
Input(Style style,
String title,
String text,
int flags)
Creates a new Input component. |
|
| Method Summary | |
|---|---|
void |
edit()
Opens the full screen edit mode for this input field. |
void |
edit(ActionCallback callback)
Opens the full screen edit mode for this input field. |
int |
getCapacity()
Gets the capacity (number of characters) that can be contained in this Input. |
void |
setCapacity(int capacity)
Sets the capacity (number of characters) that can be contained in this Input. |
| Methods inherited from class Component |
|---|
add, appendText, clear, find, first, get, getAction, getData, getElement, getFlags, getImage, getLocation, getParent, getShell, getSize, getStyle, getText, getViewPort, hasLinefeed, indexOf, insert, isFocusable, isShown, isVisible, isWrapping, last, operator_get, operator_set, remove, remove, repaint, set, setAction, setData, setElement, setFlags, setImage, setLocation, setPreferredHeight, setPreferredSize, setPreferredWidth, setStyle, setText, size |
| Methods inherited from class Object |
|---|
toString, equals, hashCode |
| Methods inherited from |
|---|
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Input(Style style,
String text,
int flags)
style - Style to usetext - Initial contents of fieldflags - Component flags
public Input(Style style,
String title,
String text,
int flags)
style - Style to usetext - Initial content of fieldtitle - Optional title to show while on (full screen) edit modeflags - Component flags| Method Detail |
|---|
public void edit()
Opens the full screen edit mode for this input field.
This method may be called even if the field hasn't been placed
on any Shell structure. By default the edit mode
is activated when user clicks "fire" key when focused on field.
Once the edit has completed Script.actionPerformed(Shell, Component, int) is called
with this Input as source argument. If field was
changed the action is ITEM_CHANGED otherwise
ITEM_CANCEL.
public void edit(ActionCallback callback)
Opens the full screen edit mode for this input field.
This method may be called even if the field hasn't been placed
on any Shell structure. By default the edit mode
is activated when user clicks "fire" key when focused on field.
Once the edit has completed ActionCallback.actionPerformed(Shell, Component, int)
is called with this Input as source argument.
If field was changed the action is ITEM_CHANGED
otherwise ITEM_CANCEL.
public int getCapacity()
public void setCapacity(int capacity)
capacity - New capacity for this Input field
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||