Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.
Copyright © 2006 Sun Microsystems, Inc. All rights reserved.
javax.microedition.lcdui
Class StringItem
java.lang.Object
|
+--javax.microedition.lcdui.Item
|
+--javax.microedition.lcdui.StringItem
- public class StringItem
- extends Item
An item that can contain a string. A StringItem is display-only; the user
cannot edit the contents. Both the label and the textual content of a
StringItem may be modified by the application. The visual representation
of the label may differ from that of the textual contents.
Constructor Summary |
StringItem(String label,
String text)
Creates a new StringItem object with the given label and textual content. |
Method Summary |
String |
getText()
Gets the text contents of the StringItem, or null if the StringItem is
empty. |
void |
setText(String text)
Sets the text contents of the StringItem. |
StringItem
public StringItem(String label,
String text)
- Creates a new StringItem object with the given label and textual content.
Either label or text may be present or null.
- Parameters:
label
- the Item labeltext
- the text contents
getText
public String getText()
- Gets the text contents of the StringItem, or null if the StringItem is
empty.
- Returns:
- a string with the content of the item
setText
public void setText(String text)
- Sets the text contents of the StringItem. If text is null, the StringItem
is set to be empty.
- Parameters:
text
- the new content
Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.
For more information, please consult the JSR 37 specification.