📄 abstractbutton.html
字号:
<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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#addActionListener(java.awt.event.ActionListener)">addActionListener</A></B>(<A HREF="../../java/awt/event/ActionListener.html">ActionListener</A> l)</CODE><BR> Adds an <code>ActionListener</code> to 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="../../javax/swing/AbstractButton.html#addChangeListener(javax.swing.event.ChangeListener)">addChangeListener</A></B>(<A HREF="../../javax/swing/event/ChangeListener.html">ChangeListener</A> l)</CODE><BR> Adds a <code>ChangeListener</code> to 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="../../javax/swing/AbstractButton.html#addItemListener(java.awt.event.ItemListener)">addItemListener</A></B>(<A HREF="../../java/awt/event/ItemListener.html">ItemListener</A> l)</CODE><BR> Adds an <code>ItemListener</code> to the <code>checkbox</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#checkHorizontalKey(int, java.lang.String)">checkHorizontalKey</A></B>(int key, <A HREF="../../java/lang/String.html">String</A> exception)</CODE><BR> Verify that key is a legal value for the <code>horizontalAlignment</code> properties.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#checkVerticalKey(int, java.lang.String)">checkVerticalKey</A></B>(int key, <A HREF="../../java/lang/String.html">String</A> exception)</CODE><BR> Ensures that the key is a valid.</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="../../javax/swing/AbstractButton.html#configurePropertiesFromAction(javax.swing.Action)">configurePropertiesFromAction</A></B>(<A HREF="../../javax/swing/Action.html">Action</A> a)</CODE><BR> Factory method which sets the <code>ActionEvent</code> source's properties according to values from the <code>Action</code> instance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/awt/event/ActionListener.html">ActionListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#createActionListener()">createActionListener</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/beans/PropertyChangeListener.html">PropertyChangeListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#createActionPropertyChangeListener(javax.swing.Action)">createActionPropertyChangeListener</A></B>(<A HREF="../../javax/swing/Action.html">Action</A> a)</CODE><BR> Factory method which creates the <code>PropertyChangeListener</code> used to update the <code>ActionEvent</code> source as properties change on its <code>Action</code> instance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../javax/swing/event/ChangeListener.html">ChangeListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#createChangeListener()">createChangeListener</A></B>()</CODE><BR> Subclasses that want to handle <code>ChangeEvents</code> differently can override this to return another <code>ChangeListener</code> implementation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/awt/event/ItemListener.html">ItemListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#createItemListener()">createItemListener</A></B>()</CODE><BR> </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/swing/AbstractButton.html#doClick()">doClick</A></B>()</CODE><BR> Programmatically perform a "click".</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/swing/AbstractButton.html#doClick(int)">doClick</A></B>(int pressTime)</CODE><BR> Programmatically perform a "click".</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="../../javax/swing/AbstractButton.html#fireActionPerformed(java.awt.event.ActionEvent)">fireActionPerformed</A></B>(<A HREF="../../java/awt/event/ActionEvent.html">ActionEvent</A> event)</CODE><BR> Notifies all listeners that have registered interest for notification on this event type.</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="../../javax/swing/AbstractButton.html#fireItemStateChanged(java.awt.event.ItemEvent)">fireItemStateChanged</A></B>(<A HREF="../../java/awt/event/ItemEvent.html">ItemEvent</A> event)</CODE><BR> Notifies all listeners that have registered interest for notification on this event type.</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="../../javax/swing/AbstractButton.html#fireStateChanged()">fireStateChanged</A></B>()</CODE><BR> Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/Action.html">Action</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#getAction()">getAction</A></B>()</CODE><BR> Returns the currently set <code>Action</code> for this <code>ActionEvent</code> source, or <code>null</code> if no <code>Action</code> is set.</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/swing/AbstractButton.html#getActionCommand()">getActionCommand</A></B>()</CODE><BR> Returns the action command for this button.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/Icon.html">Icon</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#getDisabledIcon()">getDisabledIcon</A></B>()</CODE><BR> Returns the icon used by the button when it's disabled.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/Icon.html">Icon</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#getDisabledSelectedIcon()">getDisabledSelectedIcon</A></B>()</CODE><BR> Returns the icon used by the button when it's disabled and selected.</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/swing/AbstractButton.html#getHorizontalAlignment()">getHorizontalAlignment</A></B>()</CODE><BR> Returns the horizontal alignment of the icon and text.</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/swing/AbstractButton.html#getHorizontalTextPosition()">getHorizontalTextPosition</A></B>()</CODE><BR> Returns the horizontal position of the text relative to the icon.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/Icon.html">Icon</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#getIcon()">getIcon</A></B>()</CODE><BR> Returns the default icon.</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/swing/AbstractButton.html#getLabel()">getLabel</A></B>()</CODE><BR> <B>Deprecated.</B> <I>- Replaced by <code>getText</code></I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Insets.html">Insets</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/AbstractButton.html#getMargin()">getMargin</A></B>()</CODE><BR> Returns the margin between the button's border and the label.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -