📄 button.html.svn-base
字号:
<BR>
Adds a listener to the button which will cause an event to dispatch on click</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../com/sun/lwuit/geom/Dimension.html" title="class in com.sun.lwuit.geom">Dimension</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Button.html#calcPreferredSize()">calcPreferredSize</A></B>()</CODE>
<BR>
Calculates the preferred size based on component content.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Button.html#fireClicked()">fireClicked</A></B>()</CODE>
<BR>
This callback is the prefererred way for handling the "fire" key (center softbutton) in order to allow 3 button devices to work properly.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Button.html#getPressedIcon()">getPressedIcon</A></B>()</CODE>
<BR>
Indicates the icon that is displayed on the button when the button is in pressed state</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Button.html#getRolloverIcon()">getRolloverIcon</A></B>()</CODE>
<BR>
Indicates the icon that is displayed on the button when the button is in rolled over state</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="../../../com/sun/lwuit/Button.html#getState()">getState</A></B>()</CODE>
<BR>
Returns the button state</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Button.html#getUIID()">getUIID</A></B>()</CODE>
<BR>
Unique identifier for a component, must be overriden for a component so a style can be applied to the component</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Button.html#isSelectableInteraction()">isSelectableInteraction</A></B>()</CODE>
<BR>
This method allows a component to indicate that it is interested in an "implicit" select command to appear in the "fire" button when 3 softbuttons are defined in a device.</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="../../../com/sun/lwuit/Button.html#keyPressed(int)">keyPressed</A></B>(int keyCode)</CODE>
<BR>
If this Component is focused, the key pressed event will call this method</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="../../../com/sun/lwuit/Button.html#keyReleased(int)">keyReleased</A></B>(int keyCode)</CODE>
<BR>
If this Component is focused, the key released event will call this method</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="../../../com/sun/lwuit/Button.html#paint(com.sun.lwuit.Graphics)">paint</A></B>(<A HREF="../../../com/sun/lwuit/Graphics.html" title="class in com.sun.lwuit">Graphics</A> g)</CODE>
<BR>
This method paints the Component on the screen, it should be overriden by subclasses to perform custom drawing or invoke the UI API's to let the PLAF perform the rendering.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Button.html#paintBorder(com.sun.lwuit.Graphics)">paintBorder</A></B>(<A HREF="../../../com/sun/lwuit/Graphics.html" title="class in com.sun.lwuit">Graphics</A> g)</CODE>
<BR>
Draws the component border if such a border exists.</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="../../../com/sun/lwuit/Button.html#pointerPressed(int, int)">pointerPressed</A></B>(int x,
int y)</CODE>
<BR>
If this Component is focused, the pointer pressed event will call this method</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="../../../com/sun/lwuit/Button.html#pointerReleased(int, int)">pointerReleased</A></B>(int x,
int y)</CODE>
<BR>
If this Component is focused, the pointer released event will call this method</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="../../../com/sun/lwuit/Button.html#removeActionListener(com.sun.lwuit.events.ActionListener)">removeActionListener</A></B>(<A HREF="../../../com/sun/lwuit/events/ActionListener.html" title="interface in com.sun.lwuit.events">ActionListener</A> l)</CODE>
<BR>
Removes the given action listener from the button</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="../../../com/sun/lwuit/Button.html#setPressedIcon(com.sun.lwuit.Image)">setPressedIcon</A></B>(<A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> pressedIcon)</CODE>
<BR>
Indicates the icon that is displayed on the button when the button is in pressed state</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="../../../com/sun/lwuit/Button.html#setRolloverIcon(com.sun.lwuit.Image)">setRolloverIcon</A></B>(<A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> rolloverIcon)</CODE>
<BR>
Indicates the icon that is displayed on the button when the button is in rolled over state</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_com.sun.lwuit.Label"><!-- --></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/Label.html" title="class in com.sun.lwuit">Label</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../com/sun/lwuit/Label.html#animate()">animate</A>, <A HREF="../../../com/sun/lwuit/Label.html#getAlignment()">getAlignment</A>, <A HREF="../../../com/sun/lwuit/Label.html#getBaselineResizeBehavior()">getBaselineResizeBehavior</A>, <A HREF="../../../com/sun/lwuit/Label.html#getGap()">getGap</A>, <A HREF="../../../com/sun/lwuit/Label.html#getIcon()">getIcon</A>, <A HREF="../../../com/sun/lwuit/Label.html#getText()">getText</A>, <A HREF="../../../com/sun/lwuit/Label.html#getTextPosition()">getTextPosition</A>, <A HREF="../../../com/sun/lwuit/Label.html#getVerticalAlignment()">getVerticalAlignment</A>, <A HREF="../../../com/sun/lwuit/Label.html#paramString()">paramString</A>, <A HREF="../../../com/sun/lwuit/Label.html#setAlignment(int)">setAlignment</A>, <A HREF="../../../com/sun/lwuit/Label.html#setGap(int)">setGap</A>, <A HREF="../../../com/sun/lwuit/Label.html#setIcon(com.sun.lwuit.Image)">setIcon</A>, <A HREF="../../../com/sun/lwuit/Label.html#setText(java.lang.String)">setText</A>, <A HREF="../../../com/sun/lwuit/Label.html#setTextPosition(int)">setTextPosition</A>, <A HREF="../../../com/sun/lwuit/Label.html#setVerticalAlignment(int)">setVerticalAlignment</A></CODE></TD>
</TR>
</TABLE>
<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#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#initComponent()">initComponent</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#isScrollableY()">isScrollableY</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#paintScrollbarY(com.sun.lwuit.Graphics)">paintScrollbarY</A>, <A HREF="../../../com/sun/lwuit/Component.html#pointerDragged(int, int)">pointerDragged</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>
<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>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_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>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="STATE_ROLLOVER"><!-- --></A><H3>
STATE_ROLLOVER</H3>
<PRE>
public static final int <B>STATE_ROLLOVER</B></PRE>
<DL>
<DD>Indicates the rollover state of a button which is equivalent to focused for most uses
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Button.STATE_ROLLOVER">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="STATE_PRESSED"><!-- --></A><H3>
STATE_PRESSED</H3>
<PRE>
public static final int <B>STATE_PRESSED</B></PRE>
<DL>
<DD>Indicates the pressed state of a button
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Button.STATE_PRESSED">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="STATE_DEAFULT"><!-- --></A><H3>
STATE_DEAFULT</H3>
<PRE>
public static final int <B>STATE_DEAFULT</B></PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -