|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfds.micro.ui.Component
fds.micro.ui.TextField
fds.micro.ui.DigitTextField
This class implements a text field that accepts only digit from zero to nine.
An object of this class is dedicated to be used within an object of fds.micro.ui.AbstractPanel sub-class (J2ME).
TextField
Field Summary |
Fields inherited from class fds.micro.ui.TextField |
LABEL_LEFT, LABEL_TOP |
Fields inherited from class fds.micro.ui.Component |
INTERN_BOTTOM_VALIGN, INTERN_CENTER_HALIGN, INTERN_CENTER_VALIGN, INTERN_LEFT_HALIGN, INTERN_RIGHT_HALIGN, INTERN_TOP_VALIGN |
Constructor Summary | |
DigitTextField()
Build an empty text field without . |
|
DigitTextField(int maxLength)
Build an empty text field without label. |
|
DigitTextField(int maxLength,
java.lang.String label)
Build an empty text field with specified label. |
|
DigitTextField(int maxLength,
java.lang.String label,
java.lang.String text)
Build a text field with specified label and initialized with given value. |
|
DigitTextField(java.lang.String label)
Build an empty text field with specified label. |
|
DigitTextField(java.lang.String label,
java.lang.String text)
Build a text field with specified label and initialized with given value. |
Method Summary | |
void |
keyPressed(int keyCode,
int gameAction)
Called to notify the component that a key is pressed. |
void |
setText(java.lang.String text)
Set the field value. |
Methods inherited from class fds.micro.ui.TextField |
addValueChangeListener, getCursorPosition, getLabel, getLabelFont, getLabelPosition, getLength, getText, getTextFont, isBoxOpaque, pointerPressed, removeValueChangListener, setBorderColor, setBoxOpaque, setCursorColor, setCursorPosition, setFieldBackground, setFieldBackgroundOff, setLabel, setLabelColor, setLabelFont, setLabelPosition, setMaximumSize, setTextColor, setTextColorOff, setTextFont |
Methods inherited from class fds.micro.ui.Component |
addFocusListener, addItemListener, equals, getHAlign, getHeight, getParent, getVAlign, getWidth, getX, getY, isDisabled, isHaveFocus, isHidden, isManageFocus, isOpaque, removeFocusListener, removeItemListener, setBackground, setDisabled, setFocusColor, setHAlign, setHidden, setLocation, setManageFocus, setOpaque, setVAlign |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DigitTextField()
public DigitTextField(int maxLength)
maxLength
- The maximum length for this field.public DigitTextField(int maxLength, java.lang.String label)
maxLength
- The maximum length for this field.label
- Label to display before the field (null if no label).public DigitTextField(int maxLength, java.lang.String label, java.lang.String text)
maxLength
- The maximum length for this field.label
- Label to display before the field (null if no label).text
- Initial field value.public DigitTextField(java.lang.String label)
label
- Label to display before the field (null if no label).public DigitTextField(java.lang.String label, java.lang.String text)
label
- Label to display before the field (null if no label).text
- Initial field value.Method Detail |
public void keyPressed(int keyCode, int gameAction)
keyPressed
in class TextField
keyCode
- The key code.gameAction
- Game action corresponding to the key code.public void setText(java.lang.String text)
setText
in class TextField
text
- The new field value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |