📄 stringitem.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Sep 24 14:57:49 PDT 2003 -->
<TITLE>
MID Profile: Class StringItem
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/StringItem.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<strong>MID Profile</strong></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/microedition/lcdui/Spacer.html"><B>PREV CLASS</B></A>
<A HREF="../../../javax/microedition/lcdui/TextBox.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="StringItem.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#fields_inherited_from_class_javax.microedition.lcdui.Item">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.microedition.lcdui</FONT>
<BR>
Class StringItem</H2>
<PRE>
<A HREF="../../../java/lang/Object.html">java.lang.Object</A>
|
+--<A HREF="../../../javax/microedition/lcdui/Item.html">javax.microedition.lcdui.Item</A>
|
+--<B>javax.microedition.lcdui.StringItem</B>
</PRE>
<HR>
<DL>
<DT>public class <B>StringItem</B><DT>extends <A HREF="../../../javax/microedition/lcdui/Item.html">Item</A></DL>
<P>
An item that can contain a string. A <code>StringItem</code> is display-only; the user cannot edit the contents. Both the label and the textual content of a <code>StringItem</code> may be modified by the application. The visual representation of the label may differ from that of the textual contents.
<P>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="fields_inherited_from_class_javax.microedition.lcdui.Item"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class javax.microedition.lcdui.<A HREF="../../../javax/microedition/lcdui/Item.html">Item</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/lcdui/Item.html#BUTTON">BUTTON</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#HYPERLINK">HYPERLINK</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_2">LAYOUT_2</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_BOTTOM">LAYOUT_BOTTOM</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_CENTER">LAYOUT_CENTER</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_DEFAULT">LAYOUT_DEFAULT</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_EXPAND">LAYOUT_EXPAND</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_LEFT">LAYOUT_LEFT</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_NEWLINE_AFTER">LAYOUT_NEWLINE_AFTER</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_NEWLINE_BEFORE">LAYOUT_NEWLINE_BEFORE</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_RIGHT">LAYOUT_RIGHT</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_SHRINK">LAYOUT_SHRINK</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_TOP">LAYOUT_TOP</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_VCENTER">LAYOUT_VCENTER</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_VEXPAND">LAYOUT_VEXPAND</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_VSHRINK">LAYOUT_VSHRINK</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#PLAIN">PLAIN</A></CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/StringItem.html#StringItem(java.lang.String, java.lang.String)">StringItem</A></B>(<A HREF="../../../java/lang/String.html">String</A> label, <A HREF="../../../java/lang/String.html">String</A> text)</CODE>
<BR>
Creates a new <code>StringItem</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/StringItem.html#StringItem(java.lang.String, java.lang.String, int)">StringItem</A></B>(<A HREF="../../../java/lang/String.html">String</A> label, <A HREF="../../../java/lang/String.html">String</A> text, int appearanceMode)</CODE>
<BR>
Creates a new <code>StringItem</code> object with the given label, textual content, and appearance mode.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/StringItem.html#getAppearanceMode()">getAppearanceMode</A></B>()</CODE>
<BR>
Returns the appearance mode of the <code>StringItem</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/microedition/lcdui/Font.html">Font</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/StringItem.html#getFont()">getFont</A></B>()</CODE>
<BR>
Gets the application's preferred font for rendering this <code>StringItem</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/StringItem.html#getText()">getText</A></B>()</CODE>
<BR>
Gets the text contents of the <code>StringItem</code>, or <code>null</code> if the <code>StringItem</code> is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/StringItem.html#setFont(javax.microedition.lcdui.Font)">setFont</A></B>(<A HREF="../../../javax/microedition/lcdui/Font.html">Font</A> font)</CODE>
<BR>
Sets the application's preferred font for rendering this <code>StringItem</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/StringItem.html#setPreferredSize(int, int)">setPreferredSize</A></B>(int width, int height)</CODE>
<BR>
Sets the preferred width and height for this <code>Item</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/StringItem.html#setText(java.lang.String)">setText</A></B>(<A HREF="../../../java/lang/String.html">String</A> text)</CODE>
<BR>
Sets the text contents of the <code>StringItem</code>.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.microedition.lcdui.Item"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.microedition.lcdui.<A HREF="../../../javax/microedition/lcdui/Item.html">Item</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/lcdui/Item.html#addCommand(javax.microedition.lcdui.Command)">addCommand</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getLabel()">getLabel</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getLayout()">getLayout</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getMinimumHeight()">getMinimumHeight</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getMinimumWidth()">getMinimumWidth</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getPreferredHeight()">getPreferredHeight</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getPreferredWidth()">getPreferredWidth</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#notifyStateChanged()">notifyStateChanged</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#removeCommand(javax.microedition.lcdui.Command)">removeCommand</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#setDefaultCommand(javax.microedition.lcdui.Command)">setDefaultCommand</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#setItemCommandListener(javax.microedition.lcdui.ItemCommandListener)">setItemCommandListener</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#setLabel(java.lang.String)">setLabel</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#setLayout(int)">setLayout</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="StringItem(java.lang.String, java.lang.String)"><!-- --></A><H3>
StringItem</H3>
<PRE>
public <B>StringItem</B>(<A HREF="../../../java/lang/String.html">String</A> label, <A HREF="../../../java/lang/String.html">String</A> text)</PRE>
<DL>
<DD>Creates a new <code>StringItem</code> object. Calling this constructor is equivalent to calling <TABLE BORDER="2"> <TR> <TD ROWSPAN="1" COLSPAN="1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -