|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.emarson.lemonade.bluelemon.midp1.TextField
public class TextField
This class delivers the functionality of the MIDP1
TextField Java class to the
Bluelemon environment.
| Field Summary | |
|---|---|
static Number |
ANY
The user is allowed to enter any text. |
static Number |
ANYORPASSWORD
The result of ANY | PASSWORD |
static Number |
CONSTRAINT_MASK
The mask value for determining the constraint mode. |
static Number |
EMAILADDR
The user is allowed to enter an e-mail address. |
static Number |
NUMERIC
The user is allowed to enter only an integer value. |
static Number |
NUMERICORPASSWORD
The result of NUMERIC | PASSWORD |
static Number |
PASSWORD
The text entered must be masked so that the characters typed are not visible. |
static Number |
PHONENUMBER
The user is allowed to enter a phone number. |
static Number |
URL
The user is allowed to enter a URL. |
| Constructor Summary | |
|---|---|
TextField()
Constructs a new, empty TextField object. |
|
| Method Summary | |
|---|---|
void |
delete(Number offset,
Number length)
Deletes characters from the TextField. |
Number |
getCaretPosition()
Gets the current input position. |
Number |
getConstraints()
Get the current input constraints of the TextField. |
Number |
getMaxSize()
Returns the maximum size (number of characters) that can be stored in this TextField. |
Number |
getString()
Gets the contents of the TextField as a string value. |
void |
initialize(String title,
String text,
Number maxSize,
Number constraints)
Initializes a TextField object with the given title |
void |
insert(String text,
Number position)
Inserts a String into the contents of the TextField. |
void |
setConstraints(Number constraints)
Sets the input constraints of the TextField. |
Number |
setMaxSize(Number maxSize)
Sets the maximum size (number of characters) that can be contained in this TextField. |
void |
setString(String string)
Sets the contents of the TextField as a string value, replacing the previous contents. |
Number |
size()
Gets the number of characters that are currently stored in this TextField. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Number ANY
MIDP1 TextFieldpublic static Number ANYORPASSWORD
public static Number CONSTRAINT_MASK
MIDP1 TextFieldpublic static Number EMAILADDR
MIDP1 TextFieldpublic static Number NUMERIC
MIDP1 TextFieldpublic static Number NUMERICORPASSWORD
public static Number PASSWORD
MIDP1 TextFieldpublic static Number PHONENUMBER
MIDP1 TextFieldpublic static Number URL
MIDP1 TextField| Constructor Detail |
|---|
public TextField()
<blue:newInstance class="com/emarson/lemonade/bluelemon/midp1/TextField"
toVariable="textField"/>
| Method Detail |
|---|
public void delete(Number offset,
Number length)
offset - the beginning of the region to be deletedlength - the number of characters to be deleted
<blue:call object="textField" method="delete">
<blue:argument type="byte" value="0"/>
<blue:argument type="variable" name="length"/>
</blue:call>
public Number getCaretPosition()
<blue:call object="textField" method="getCaretPosition"
toVariable="caretPosition"/>
public Number getConstraints()
input constraints
<blue:call object="textField" method="getConstraints"
toVariable="constraints"/>
public Number getMaxSize()
<blue:call object="textField" method="getMaxSize"
toVariable="maxSize"/>
public Number getString()
<blue:call object="textField" method="getString"
toVariable="string"/>
public void initialize(String title,
String text,
Number maxSize,
Number constraints)
title - the TextField's titletext - the TextField's titlemaxSize - the maximum size in charactersconstraints - see
input constraints
<blue:call object="textField" method="initialize">
<blue:argument type="String" value="title"/>
<blue:argument type="String" value="text"/>
<blue:argument type="byte" value="8"/>
<blue:argument type="int" value="TextField.ANY"/>
</blue:call>
public void insert(String text,
Number position)
text - the String to be insertedposition - the position at which insertion is to occur
<blue:call object="textField" method="insert">
<blue:argument type="String" value="text"/>
<blue:argument type="byte" value="2"/>
</blue:call>
public void setConstraints(Number constraints)
constraints - see
input constraints
<blue:call object="textField" method="setConstraints">
<blue:argument type="int" value="TextField.NUMERIC"/>
</blue:call>
public Number setMaxSize(Number maxSize)
maxSize - the new maximum size
<blue:call object="textField" method="setMaxSize">
<blue:argument type="byte" value="12"/>
</blue:call>
public void setString(String string)
the - new value of the TextField, or null if the
TextField is to be made empty
<blue:call object="textField" method="setString">
<blue:argument type="String" value="text"/>
</blue:call>
public Number size()
<blue:call object="textField" method="size"
toVariable="textFieldSize"/>
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||