textfield.html.svn-base

来自「j2me设计的界面包」· SVN-BASE 代码 · 共 1,394 行 · 第 1/5 页

SVN-BASE
1,394
字号
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/TextField.html#setText(java.lang.String)">setText</A></B>(java.lang.String&nbsp;text)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the text within this text area</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/TextField.html#setUseSoftkeys(boolean)">setUseSoftkeys</A></B>(boolean&nbsp;useSoftkeys)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When set to true softkeys are used to enable delete functionality</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.sun.lwuit.TextArea"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.sun.lwuit.<A HREF="../../../com/sun/lwuit/TextArea.html" title="class in com.sun.lwuit">TextArea</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../com/sun/lwuit/TextArea.html#addActionListener(com.sun.lwuit.events.ActionListener)">addActionListener</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#fireClicked()">fireClicked</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#getColumns()">getColumns</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#getConstraint()">getConstraint</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#getLines()">getLines</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#getMaxSize()">getMaxSize</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#getRows()">getRows</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#getRowsGap()">getRowsGap</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#getText()">getText</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#getTextAt(int)">getTextAt</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#isEditable()">isEditable</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#isScrollableY()">isScrollableY</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#isSelectableInteraction()">isSelectableInteraction</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#paintBorder(com.sun.lwuit.Graphics)">paintBorder</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#paintScrollbarY(com.sun.lwuit.Graphics)">paintScrollbarY</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#pointerReleased(int, int)">pointerReleased</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#removeActionListener(com.sun.lwuit.events.ActionListener)">removeActionListener</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#setColumns(int)">setColumns</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#setConstraint(int)">setConstraint</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#setEditable(boolean)">setEditable</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#setMaxSize(int)">setMaxSize</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#setRows(int)">setRows</A>, <A HREF="../../../com/sun/lwuit/TextArea.html#setRowsGap(int)">setRowsGap</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.sun.lwuit.Component"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.sun.lwuit.<A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../com/sun/lwuit/Component.html#addFocusListener(com.sun.lwuit.events.FocusListener)">addFocusListener</A>, <A HREF="../../../com/sun/lwuit/Component.html#contains(int, int)">contains</A>, <A HREF="../../../com/sun/lwuit/Component.html#deinitialize()">deinitialize</A>, <A HREF="../../../com/sun/lwuit/Component.html#getAbsoluteX()">getAbsoluteX</A>, <A HREF="../../../com/sun/lwuit/Component.html#getAbsoluteY()">getAbsoluteY</A>, <A HREF="../../../com/sun/lwuit/Component.html#getBaseline(int, int)">getBaseline</A>, <A HREF="../../../com/sun/lwuit/Component.html#getBaselineResizeBehavior()">getBaselineResizeBehavior</A>, <A HREF="../../../com/sun/lwuit/Component.html#getBottomGap()">getBottomGap</A>, <A HREF="../../../com/sun/lwuit/Component.html#getBounds()">getBounds</A>, <A HREF="../../../com/sun/lwuit/Component.html#getComponentForm()">getComponentForm</A>, <A HREF="../../../com/sun/lwuit/Component.html#getHeight()">getHeight</A>, <A HREF="../../../com/sun/lwuit/Component.html#getNextFocusDown()">getNextFocusDown</A>, <A HREF="../../../com/sun/lwuit/Component.html#getNextFocusRight()">getNextFocusRight</A>, <A HREF="../../../com/sun/lwuit/Component.html#getParent()">getParent</A>, <A HREF="../../../com/sun/lwuit/Component.html#getPreferredH()">getPreferredH</A>, <A HREF="../../../com/sun/lwuit/Component.html#getPreferredSize()">getPreferredSize</A>, <A HREF="../../../com/sun/lwuit/Component.html#getPreferredW()">getPreferredW</A>, <A HREF="../../../com/sun/lwuit/Component.html#getScrollAnimationSpeed()">getScrollAnimationSpeed</A>, <A HREF="../../../com/sun/lwuit/Component.html#getScrollX()">getScrollX</A>, <A HREF="../../../com/sun/lwuit/Component.html#getScrollY()">getScrollY</A>, <A HREF="../../../com/sun/lwuit/Component.html#getSideGap()">getSideGap</A>, <A HREF="../../../com/sun/lwuit/Component.html#getStyle()">getStyle</A>, <A HREF="../../../com/sun/lwuit/Component.html#getWidth()">getWidth</A>, <A HREF="../../../com/sun/lwuit/Component.html#getX()">getX</A>, <A HREF="../../../com/sun/lwuit/Component.html#getY()">getY</A>, <A HREF="../../../com/sun/lwuit/Component.html#handlesInput()">handlesInput</A>, <A HREF="../../../com/sun/lwuit/Component.html#hasFocus()">hasFocus</A>, <A HREF="../../../com/sun/lwuit/Component.html#isBorderPainted()">isBorderPainted</A>, <A HREF="../../../com/sun/lwuit/Component.html#isEnabled()">isEnabled</A>, <A HREF="../../../com/sun/lwuit/Component.html#isFocusable()">isFocusable</A>, <A HREF="../../../com/sun/lwuit/Component.html#isFocusPainted()">isFocusPainted</A>, <A HREF="../../../com/sun/lwuit/Component.html#isInitialized()">isInitialized</A>, <A HREF="../../../com/sun/lwuit/Component.html#isScrollable()">isScrollable</A>, <A HREF="../../../com/sun/lwuit/Component.html#isScrollableX()">isScrollableX</A>, <A HREF="../../../com/sun/lwuit/Component.html#isScrollVisible()">isScrollVisible</A>, <A HREF="../../../com/sun/lwuit/Component.html#isSmoothScrolling()">isSmoothScrolling</A>, <A HREF="../../../com/sun/lwuit/Component.html#isVisible()">isVisible</A>, <A HREF="../../../com/sun/lwuit/Component.html#keyRepeated(int)">keyRepeated</A>, <A HREF="../../../com/sun/lwuit/Component.html#paintBackground(com.sun.lwuit.Graphics)">paintBackground</A>, <A HREF="../../../com/sun/lwuit/Component.html#paintComponent(com.sun.lwuit.Graphics)">paintComponent</A>, <A HREF="../../../com/sun/lwuit/Component.html#paintScrollbars(com.sun.lwuit.Graphics)">paintScrollbars</A>, <A HREF="../../../com/sun/lwuit/Component.html#paintScrollbarX(com.sun.lwuit.Graphics)">paintScrollbarX</A>, <A HREF="../../../com/sun/lwuit/Component.html#paramString()">paramString</A>, <A HREF="../../../com/sun/lwuit/Component.html#pointerDragged(int, int)">pointerDragged</A>, <A HREF="../../../com/sun/lwuit/Component.html#pointerPressed(int, int)">pointerPressed</A>, <A HREF="../../../com/sun/lwuit/Component.html#refreshTheme()">refreshTheme</A>, <A HREF="../../../com/sun/lwuit/Component.html#refreshTheme(java.lang.String)">refreshTheme</A>, <A HREF="../../../com/sun/lwuit/Component.html#removeFocusListener(com.sun.lwuit.events.FocusListener)">removeFocusListener</A>, <A HREF="../../../com/sun/lwuit/Component.html#repaint()">repaint</A>, <A HREF="../../../com/sun/lwuit/Component.html#requestFocus()">requestFocus</A>, <A HREF="../../../com/sun/lwuit/Component.html#scrollRectToVisible(com.sun.lwuit.geom.Rectangle, com.sun.lwuit.Component)">scrollRectToVisible</A>, <A HREF="../../../com/sun/lwuit/Component.html#setBorderPainted(boolean)">setBorderPainted</A>, <A HREF="../../../com/sun/lwuit/Component.html#setCellRenderer(boolean)">setCellRenderer</A>, <A HREF="../../../com/sun/lwuit/Component.html#setEnabled(boolean)">setEnabled</A>, <A HREF="../../../com/sun/lwuit/Component.html#setFocus(boolean)">setFocus</A>, <A HREF="../../../com/sun/lwuit/Component.html#setFocusable(boolean)">setFocusable</A>, <A HREF="../../../com/sun/lwuit/Component.html#setFocusPainted(boolean)">setFocusPainted</A>, <A HREF="../../../com/sun/lwuit/Component.html#setHandlesInput(boolean)">setHandlesInput</A>, <A HREF="../../../com/sun/lwuit/Component.html#setHeight(int)">setHeight</A>, <A HREF="../../../com/sun/lwuit/Component.html#setInitialized(boolean)">setInitialized</A>, <A HREF="../../../com/sun/lwuit/Component.html#setIsScrollVisible(boolean)">setIsScrollVisible</A>, <A HREF="../../../com/sun/lwuit/Component.html#setNextFocusDown(com.sun.lwuit.Component)">setNextFocusDown</A>, <A HREF="../../../com/sun/lwuit/Component.html#setNextFocusRight(com.sun.lwuit.Component)">setNextFocusRight</A>, <A HREF="../../../com/sun/lwuit/Component.html#setPreferredH(int)">setPreferredH</A>, <A HREF="../../../com/sun/lwuit/Component.html#setPreferredSize(com.sun.lwuit.geom.Dimension)">setPreferredSize</A>, <A HREF="../../../com/sun/lwuit/Component.html#setPreferredW(int)">setPreferredW</A>, <A HREF="../../../com/sun/lwuit/Component.html#setScrollAnimationSpeed(int)">setScrollAnimationSpeed</A>, <A HREF="../../../com/sun/lwuit/Component.html#setScrollX(int)">setScrollX</A>, <A HREF="../../../com/sun/lwuit/Component.html#setScrollY(int)">setScrollY</A>, <A HREF="../../../com/sun/lwuit/Component.html#setShouldCalcPreferredSize(boolean)">setShouldCalcPreferredSize</A>, <A HREF="../../../com/sun/lwuit/Component.html#setSize(com.sun.lwuit.geom.Dimension)">setSize</A>, <A HREF="../../../com/sun/lwuit/Component.html#setSmoothScrolling(boolean)">setSmoothScrolling</A>, <A HREF="../../../com/sun/lwuit/Component.html#setStyle(com.sun.lwuit.plaf.Style)">setStyle</A>, <A HREF="../../../com/sun/lwuit/Component.html#setWidth(int)">setWidth</A>, <A HREF="../../../com/sun/lwuit/Component.html#setX(int)">setX</A>, <A HREF="../../../com/sun/lwuit/Component.html#setY(int)">setY</A>, <A HREF="../../../com/sun/lwuit/Component.html#styleChanged(java.lang.String, com.sun.lwuit.plaf.Style)">styleChanged</A>, <A HREF="../../../com/sun/lwuit/Component.html#toString()">toString</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="TextField()"><!-- --></A><H3>
TextField</H3>
<PRE>
public <B>TextField</B>()</PRE>
<DL>
<DD>Default constructor
<P>
</DL>
<HR>

<A NAME="TextField(int)"><!-- --></A><H3>
TextField</H3>
<PRE>
public <B>TextField</B>(int&nbsp;columns)</PRE>
<DL>
<DD>Construct a text field with space reserved for columns
<P>
</DL>
<HR>

<A NAME="TextField(java.lang.String)"><!-- --></A><H3>
TextField</H3>
<PRE>
public <B>TextField</B>(java.lang.String&nbsp;text)</PRE>
<DL>
<DD>Construct text field
<P>
</DL>
<HR>

<A NAME="TextField(java.lang.String, int)"><!-- --></A><H3>
TextField</H3>
<PRE>
public <B>TextField</B>(java.lang.String&nbsp;text,
                 int&nbsp;columns)</PRE>
<DL>
<DD>Construct text field
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="setClearText(java.lang.String)"><!-- --></A><H3>
setClearText</H3>
<PRE>
public static void <B>setClearText</B>(java.lang.String&nbsp;text)</PRE>
<DL>
<DD>Set the text that should appear on the clear softkey
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setT9Text(java.lang.String)"><!-- --></A><H3>
setT9Text</H3>
<PRE>
public static void <B>setT9Text</B>(java.lang.String&nbsp;text)</PRE>
<DL>
<DD>Set the text that should appear on the T9 softkey
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="deleteChar()"><!-- --></A><H3>
deleteChar</H3>
<PRE>
protected void <B>deleteChar</B>()</PRE>
<DL>
<DD>Performs a backspace operation
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getUIID()"><!-- --></A><H3>
getUIID</H3>
<PRE>
protected java.lang.String <B>getUIID</B>()</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../com/sun/lwuit/Component.html#getUIID()">Component</A></CODE></B></DD>
<DD>Unique identifier for a component, must be overriden for a component so a style can be applied to the component
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/sun/lwuit/TextArea.html#getUIID()">getUIID</A></CODE> in class <CODE><A HREF="../../../com/sun/lwuit/TextArea.html" title="class in com.sun.lwuit">TextArea</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>unique string identifying this component for the style sheet</DL>
</DD>
</DL>
<HR>

<A NAME="commitChange()"><!-- --></A><H3>
commitChange</H3>
<PRE>
protected void <B>commitChange</B>()</PRE>
<DL>
<DD>Commit the changes made to the text field as a complete edit operation. This is used in a numeric keypad to allow the user to repeatedly press a number to change values.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="isPendingCommit()"><!-- --></A><H3>
isPendingCommit</H3>
<PRE>
public boolean <B>isPendingCommit</B>()</PRE>
<DL>
<DD>Returns true if the text field is waiting for a commit on editing
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setCommitTimeout(int)"><!-- --></A><H3>
setCommitTimeout</H3>
<PRE>
public void <B>setCommitTimeout</B>(int&nbsp;commitTimeout)</PRE>
<DL>
<DD>The amount of time in milliseconds it will take for a change to get commited into the field.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>commitTimeout</CODE> - indicates the amount of time that should elapse for a commit to automatically occur</DL>
</DD>
</DL>
<HR>

<A NAME="getCommitTimeout()"><!-- --></A><H3>
getCommitTimeout</H3>
<PRE>
public int <B>getCommitTimeout</B>()</PRE>
<DL>
<DD>The amount of time in milliseconds it will take for a change to get commited into the field.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setInputMode(java.lang.String)"><!-- --></A><H3>
setInputMode</H3>
<PRE>
public void <B>setInputMode</B>(java.lang.String&nbsp;inputMode)</PRE>
<DL>
<DD>Sets the current selected input mode matching one of the existing input modes
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>inputMode</CODE> - the display name of the input mode by default the following modes are supported: Abc, ABC, abc, 123</DL>
</DD>
</DL>
<HR>

<A NAME="getInputMode()"><!-- --></A><H3>
getInputMode</H3>
<PRE>
public java.lang.String <B>getInputMode</B>()</PRE>
<DL>
<DD>Returns the currently selected input mode
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the display name of the input mode by default the following modes are supported: Abc, ABC, abc, 123</DL>
</DD>
</DL>
<HR>

<A NAME="isChangeInputMode(int)"><!-- --></A><H3>
isChangeInputMode</H3>
<PRE>
protected boolean <B>isChangeInputMode</B>(int&nbsp;keyCode)</PRE>
<DL>
<DD>Indicates whether the key changes the current input mode
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true for the hash (#) key code</DL>
</DD>
</DL>
<HR>

<A NAME="addInputMode(java.lang.String, java.util.Hashtable, boolean)"><!-- --></A><H3>
addInputMode</H3>
<PRE>
public static void <B>addInputMode</B>(java.lang.String&nbsp;name,
                                java.util.Hashtable&nbsp;values,
                                boolean&nbsp;firstUpcase)</PRE>
<DL>
<DD>Adds a new inputmode hashtable with the given name and set of values
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a unique display name for the input mode e.g. ABC, 123 etc...<DD><CODE>values</CODE> - The key for the hashtable is an Integer keyCode and the value is a String containing the characters to toggle between for the given keycode<DD><CODE>firstUpcase</CODE> - indicates if this input mode in an input mode used for the special case where the first letter is an upper case letter</DL>
</DD>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?