⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 button.html.svn-base

📁 j2me设计的界面包
💻 SVN-BASE
📖 第 1 页 / 共 4 页
字号:
<DL>
<DD>Indicates the default state of a button which is neither pressed nor focused
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Button.STATE_DEAFULT">Constant Field Values</A></DL>
</DL>

<!-- ========= 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="Button()"><!-- --></A><H3>
Button</H3>
<PRE>
public <B>Button</B>()</PRE>
<DL>
<DD>Constructs a button with an empty string for its text.
<P>
</DL>
<HR>

<A NAME="Button(java.lang.String)"><!-- --></A><H3>
Button</H3>
<PRE>
public <B>Button</B>(java.lang.String&nbsp;text)</PRE>
<DL>
<DD>Constructs a button with the specified text.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>text</CODE> - label appearing on the button</DL>
</DL>
<HR>

<A NAME="Button(com.sun.lwuit.Command)"><!-- --></A><H3>
Button</H3>
<PRE>
public <B>Button</B>(<A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A>&nbsp;cmd)</PRE>
<DL>
<DD>Allows binding a command to a button for ease of use
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - command whose text would be used for the button and would recive action events from the button</DL>
</DL>
<HR>

<A NAME="Button(com.sun.lwuit.Image)"><!-- --></A><H3>
Button</H3>
<PRE>
public <B>Button</B>(<A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;icon)</PRE>
<DL>
<DD>Constructs a button with the specified image.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>icon</CODE> - appearing on the button</DL>
</DL>
<HR>

<A NAME="Button(java.lang.String, com.sun.lwuit.Image)"><!-- --></A><H3>
Button</H3>
<PRE>
public <B>Button</B>(java.lang.String&nbsp;text,
              <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;icon)</PRE>
<DL>
<DD>Constructor a button with text and image
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>text</CODE> - label appearing on the button<DD><CODE>icon</CODE> - image appearing on the button</DL>
</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="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/Label.html#getUIID()">getUIID</A></CODE> in class <CODE><A HREF="../../../com/sun/lwuit/Label.html" title="class in com.sun.lwuit">Label</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="getState()"><!-- --></A><H3>
getState</H3>
<PRE>
public int <B>getState</B>()</PRE>
<DL>
<DD>Returns the button state
<P>
<DD><DL>

<DT><B>Returns:</B><DD>One of STATE_ROLLOVER, STATE_DEAFULT, STATE_PRESSED</DL>
</DD>
</DL>
<HR>

<A NAME="getPressedIcon()"><!-- --></A><H3>
getPressedIcon</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>getPressedIcon</B>()</PRE>
<DL>
<DD>Indicates the icon that is displayed on the button when the button is in  pressed state
<P>
<DD><DL>

<DT><B>Returns:</B><DD>icon used<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/Button.html#STATE_PRESSED"><CODE>STATE_PRESSED</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getRolloverIcon()"><!-- --></A><H3>
getRolloverIcon</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>getRolloverIcon</B>()</PRE>
<DL>
<DD>Indicates the icon that is displayed on the button when the button is in  rolled over state
<P>
<DD><DL>

<DT><B>Returns:</B><DD>icon used<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/Button.html#STATE_ROLLOVER"><CODE>STATE_ROLLOVER</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setRolloverIcon(com.sun.lwuit.Image)"><!-- --></A><H3>
setRolloverIcon</H3>
<PRE>
public void <B>setRolloverIcon</B>(<A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;rolloverIcon)</PRE>
<DL>
<DD>Indicates the icon that is displayed on the button when the button is in  rolled over state
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rolloverIcon</CODE> - icon to use<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/Button.html#STATE_ROLLOVER"><CODE>STATE_ROLLOVER</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setPressedIcon(com.sun.lwuit.Image)"><!-- --></A><H3>
setPressedIcon</H3>
<PRE>
public void <B>setPressedIcon</B>(<A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;pressedIcon)</PRE>
<DL>
<DD>Indicates the icon that is displayed on the button when the button is in  pressed state
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pressedIcon</CODE> - icon used<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/Button.html#STATE_PRESSED"><CODE>STATE_PRESSED</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="addActionListener(com.sun.lwuit.events.ActionListener)"><!-- --></A><H3>
addActionListener</H3>
<PRE>
public void <B>addActionListener</B>(<A HREF="../../../com/sun/lwuit/events/ActionListener.html" title="interface in com.sun.lwuit.events">ActionListener</A>&nbsp;l)</PRE>
<DL>
<DD>Adds a listener to the button which will cause an event to dispatch on click
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - implementation of the action listener interface</DL>
</DD>
</DL>
<HR>

<A NAME="removeActionListener(com.sun.lwuit.events.ActionListener)"><!-- --></A><H3>
removeActionListener</H3>
<PRE>
public void <B>removeActionListener</B>(<A HREF="../../../com/sun/lwuit/events/ActionListener.html" title="interface in com.sun.lwuit.events">ActionListener</A>&nbsp;l)</PRE>
<DL>
<DD>Removes the given action listener from the button
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - implementation of the action listener interface</DL>
</DD>
</DL>
<HR>

<A NAME="keyPressed(int)"><!-- --></A><H3>
keyPressed</H3>
<PRE>
public void <B>keyPressed</B>(int&nbsp;keyCode)</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../com/sun/lwuit/Component.html#keyPressed(int)">Component</A></CODE></B></DD>
<DD>If this Component is focused, the key pressed event will call this method
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/sun/lwuit/Component.html#keyPressed(int)">keyPressed</A></CODE> in class <CODE><A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>keyCode</CODE> - the key code value to indicate a physical key.</DL>

⌨️ 快捷键说明

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