|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kalmeo.kuix.widget.Widget
org.kalmeo.kuix.widget.FocusableWidget
org.kalmeo.kuix.widget.TextWidget
org.kalmeo.kuix.widget.Text
org.kalmeo.kuix.widget.TextField
public class TextField
This class represents a textfield.
For further informations, visit the Kuix widgets reference page.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.kalmeo.kuix.widget.Widget |
|---|
Widget.BindInstruction |
| Field Summary | |
|---|---|
static java.lang.String |
ANY
|
static java.lang.String |
DECIMAL
|
static java.lang.String |
EMAILADDR
|
static java.lang.String |
INITIAL_CAPS_SENTENCE
|
static java.lang.String |
INITIAL_CAPS_WORD
|
static java.lang.String |
NON_PREDICTIVE
|
static java.lang.String |
NUMERIC
|
static java.lang.String |
PASSWORD
|
static java.lang.String |
PHONENUMBER
|
static java.lang.String |
SENSITIVE
|
static java.lang.String |
URL
|
| Fields inherited from class org.kalmeo.kuix.widget.Text |
|---|
insetHeight, textX, textY |
| Fields inherited from class org.kalmeo.kuix.widget.TextWidget |
|---|
text |
| Fields inherited from class org.kalmeo.kuix.widget.FocusableWidget |
|---|
DISABLED_PSEUDO_CLASS, enabled, focusable, focused, HOVER_PSEUDO_CLASS, PSEUDO_CLASSES |
| Fields inherited from class org.kalmeo.kuix.widget.Widget |
|---|
bindInstructions, DEFAULT_ALIGN, DEFAULT_BACKGROUND_ALIGN, DEFAULT_BACKGROUND_REPEAT, DEFAULT_BORDER, DEFAULT_GAP, DEFAULT_MARGIN, DEFAULT_MIN_SIZE, DEFAULT_PADDING, DEFAULT_SPAN, DEFAULT_WEIGHT, next, parent, previous |
| Constructor Summary | |
|---|---|
TextField()
Construct a TextField |
|
| Method Summary | |
|---|---|
void |
commandAction(Command command,
Displayable displayable)
|
protected void |
doLayout()
Layout the widget if its layout is defined. |
int |
getConstraints()
|
protected java.lang.String |
getDisplayedText()
Returns the displayed text. |
int |
getMaxSize()
|
java.lang.String |
getOnChange()
|
java.lang.String |
getTitle()
|
java.lang.String |
getTooltip()
|
boolean |
isEditOnAllKeys()
|
boolean |
isFocusable()
Check if this Widget is focusable. |
protected void |
onFocus(Widget focusedWidget)
Call when the widget or one of its parents gain the focus. |
protected void |
onLostFocus(Widget focusedWidget)
Call when the widget or one of its parents lost the focus. |
void |
paint(Graphics g)
Paint the widget itself. |
protected void |
paintChildrenImpl(Graphics g)
Invoke the paintImpl method on widget's children. |
boolean |
processActionEvent()
Process action event |
boolean |
processKeyEvent(byte type,
int kuixKeyCode)
Process a key event |
boolean |
processPointerEvent(byte type,
int x,
int y)
Process a pointer event |
boolean |
setAttribute(java.lang.String name,
java.lang.String value)
Set the value to the specified attribute representing by
the name |
void |
setConstraints(int constraints)
|
void |
setEditOnAllKeys(boolean editOnAllKeys)
|
void |
setMaxSize(int maxSize)
|
void |
setOnChange(java.lang.String onChange)
|
TextWidget |
setText(java.lang.String text)
Returns the instance of this TextWidget
Useful in this case :
AbstractTextWidget text = new Text().setText("message"); |
void |
setTitle(java.lang.String title)
|
void |
setTooltip(java.lang.String text)
Define the TextField tooltip text. |
| Methods inherited from class org.kalmeo.kuix.widget.Text |
|---|
add, getLayout, getPreferredSize |
| Methods inherited from class org.kalmeo.kuix.widget.TextWidget |
|---|
clearCachedStyle, getAttribute, getDefaultStylePropertyValue, getFont, getText, setDefaultFontFace, setDefaultFontSize, setDefaultFontStyle |
| Methods inherited from class org.kalmeo.kuix.widget.FocusableWidget |
|---|
getAvailablePseudoClasses, getOnFocus, getOnLostFocus, giveFocusToNearestWidget, isEnabled, isFocused, isPseudoClassCompatible, onAdded, processFocusEvent, remove, requestFocus, setEnabled, setFocusable, setOnFocus, setOnLostFocus, setVisible |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ANY
public static final java.lang.String EMAILADDR
public static final java.lang.String NUMERIC
public static final java.lang.String PHONENUMBER
public static final java.lang.String DECIMAL
public static final java.lang.String URL
public static final java.lang.String PASSWORD
public static final java.lang.String SENSITIVE
public static final java.lang.String NON_PREDICTIVE
public static final java.lang.String INITIAL_CAPS_WORD
public static final java.lang.String INITIAL_CAPS_SENTENCE
| Constructor Detail |
|---|
public TextField()
TextField
| Method Detail |
|---|
public boolean setAttribute(java.lang.String name,
java.lang.String value)
Widgetvalue to the specified attribute representing by
the name
setAttribute in class TextWidgettrue if the attribute existspublic java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - the title to setpublic int getMaxSize()
public void setMaxSize(int maxSize)
maxSize - the maxSize to setpublic int getConstraints()
public void setConstraints(int constraints)
constraints - the constraints to setpublic boolean isEditOnAllKeys()
public void setEditOnAllKeys(boolean editOnAllKeys)
editOnAllKeys - the editOnAllKeys to setpublic java.lang.String getTooltip()
public void setTooltip(java.lang.String text)
TextField tooltip text.
text - public java.lang.String getOnChange()
public void setOnChange(java.lang.String onChange)
onChange - the onChange to setpublic boolean isFocusable()
WidgetWidget is focusable.
isFocusable in class TextWidgettrue if the widget is focusablepublic TextWidget setText(java.lang.String text)
TextWidgetTextWidget
Useful in this case :
AbstractTextWidget text = new Text().setText("message");
setText in class TextWidgettext - the text to setprotected java.lang.String getDisplayedText()
TextWidget
getDisplayedText in class TextWidgetprotected void doLayout()
Widget
doLayout in class Textpublic void paint(Graphics g)
Widget
paint in class Textprotected void paintChildrenImpl(Graphics g)
WidgetpaintImpl method on widget's children.
paintChildrenImpl in class Text
public void commandAction(Command command,
Displayable displayable)
public boolean processPointerEvent(byte type,
int x,
int y)
Widget
processPointerEvent in class FocusableWidgettrue if the event is treated by the widget
public boolean processKeyEvent(byte type,
int kuixKeyCode)
Widget
processKeyEvent in class Widgettrue if the event is treated by the widgetpublic boolean processActionEvent()
Widget
processActionEvent in class Widgettrue if the event is treated by the widgetprotected void onFocus(Widget focusedWidget)
Widget
onFocus in class Textprotected void onLostFocus(Widget focusedWidget)
Widget
onLostFocus in class Text
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||