src/share/classes/javax/swing/AbstractButton.java

Print this page




  36 import java.util.Vector;
  37 import java.io.Serializable;
  38 import javax.swing.event.*;
  39 import javax.swing.border.*;
  40 import javax.swing.plaf.*;
  41 import javax.accessibility.*;
  42 import javax.swing.text.*;
  43 import javax.swing.text.html.*;
  44 import javax.swing.plaf.basic.*;
  45 import java.util.*;
  46 
  47 /**
  48  * Defines common behaviors for buttons and menu items.
  49  * <p>
  50  * Buttons can be configured, and to some degree controlled, by
  51  * <code><a href="Action.html">Action</a></code>s.  Using an
  52  * <code>Action</code> with a button has many benefits beyond directly
  53  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  54  * Swing Components Supporting <code>Action</code></a> for more
  55  * details, and you can find more information in <a
  56  * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  57  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  58  * <p>
  59  * For further information see
  60  * <a
  61  href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
  62  * a section in <em>The Java Tutorial</em>.
  63  * <p>
  64  * <strong>Warning:</strong>
  65  * Serialized objects of this class will not be compatible with
  66  * future Swing releases. The current serialization support is
  67  * appropriate for short term storage or RMI between applications running
  68  * the same version of Swing.  As of 1.4, support for long term storage
  69  * of all JavaBeans&trade;
  70  * has been added to the <code>java.beans</code> package.
  71  * Please see {@link java.beans.XMLEncoder}.
  72  *
  73  * @author Jeff Dinkins
  74  */
  75 public abstract class AbstractButton extends JComponent implements ItemSelectable, SwingConstants {
  76 
  77     // *********************************
  78     // ******* Button properties *******
  79     // *********************************
  80 
  81     /** Identifies a change in the button model. */




  36 import java.util.Vector;
  37 import java.io.Serializable;
  38 import javax.swing.event.*;
  39 import javax.swing.border.*;
  40 import javax.swing.plaf.*;
  41 import javax.accessibility.*;
  42 import javax.swing.text.*;
  43 import javax.swing.text.html.*;
  44 import javax.swing.plaf.basic.*;
  45 import java.util.*;
  46 
  47 /**
  48  * Defines common behaviors for buttons and menu items.
  49  * <p>
  50  * Buttons can be configured, and to some degree controlled, by
  51  * <code><a href="Action.html">Action</a></code>s.  Using an
  52  * <code>Action</code> with a button has many benefits beyond directly
  53  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  54  * Swing Components Supporting <code>Action</code></a> for more
  55  * details, and you can find more information in <a
  56  * href="https://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  57  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  58  * <p>
  59  * For further information see
  60  * <a
  61  href="https://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
  62  * a section in <em>The Java Tutorial</em>.
  63  * <p>
  64  * <strong>Warning:</strong>
  65  * Serialized objects of this class will not be compatible with
  66  * future Swing releases. The current serialization support is
  67  * appropriate for short term storage or RMI between applications running
  68  * the same version of Swing.  As of 1.4, support for long term storage
  69  * of all JavaBeans&trade;
  70  * has been added to the <code>java.beans</code> package.
  71  * Please see {@link java.beans.XMLEncoder}.
  72  *
  73  * @author Jeff Dinkins
  74  */
  75 public abstract class AbstractButton extends JComponent implements ItemSelectable, SwingConstants {
  76 
  77     // *********************************
  78     // ******* Button properties *******
  79     // *********************************
  80 
  81     /** Identifies a change in the button model. */