< prev index next >

src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java

Print this page

        

@@ -30,19 +30,19 @@
 import java.io.Serializable;
 import java.util.EventListener;
 import javax.swing.event.*;
 
 /**
- * The default implementation of a <code>Button</code> component's data model.
+ * The default implementation of a {@code Button} component's data model.
  * <p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will not be compatible with
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing. As of 1.4, support for long term storage
  * of all JavaBeans&trade;
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
  * Please see {@link java.beans.XMLEncoder}.
  *
  * @author Jeff Dinkins
  * @since 1.2
  */

@@ -60,11 +60,11 @@
 
     /** The button's mnemonic. */
     protected int mnemonic = 0;
 
     /**
-     * Only one <code>ChangeEvent</code> is needed per button model
+     * Only one {@code ChangeEvent} is needed per button model
      * instance since the event's only state is the source property.
      * The source of events generated is always "this".
      */
     protected transient ChangeEvent changeEvent = null;
 

@@ -74,11 +74,11 @@
     // controls the usage of the MenuItem.disabledAreNavigable UIDefaults
     // property in the setArmed() method
     private boolean menuItem = false;
 
     /**
-     * Constructs a <code>DefaultButtonModel</code>.
+     * Constructs a {@code DefaultButtonModel}.
      *
      */
     public DefaultButtonModel() {
         stateMask = 0;
         setEnabled(true);

@@ -314,13 +314,13 @@
         listenerList.remove(ChangeListener.class, l);
     }
 
     /**
      * Returns an array of all the change listeners
-     * registered on this <code>DefaultButtonModel</code>.
+     * registered on this {@code DefaultButtonModel}.
      *
-     * @return all of this model's <code>ChangeListener</code>s
+     * @return all of this model's {@code ChangeListener}s
      *         or an empty
      *         array if no change listeners are currently registered
      *
      * @see #addChangeListener
      * @see #removeChangeListener

@@ -367,13 +367,13 @@
         listenerList.remove(ActionListener.class, l);
     }
 
     /**
      * Returns an array of all the action listeners
-     * registered on this <code>DefaultButtonModel</code>.
+     * registered on this {@code DefaultButtonModel}.
      *
-     * @return all of this model's <code>ActionListener</code>s
+     * @return all of this model's {@code ActionListener}s
      *         or an empty
      *         array if no action listeners are currently registered
      *
      * @see #addActionListener
      * @see #removeActionListener

@@ -386,11 +386,11 @@
 
     /**
      * Notifies all listeners that have registered interest for
      * notification on this event type.
      *
-     * @param e the <code>ActionEvent</code> to deliver to listeners
+     * @param e the {@code ActionEvent} to deliver to listeners
      * @see EventListenerList
      */
     protected void fireActionPerformed(ActionEvent e) {
         // Guaranteed to return a non-null array
         Object[] listeners = listenerList.getListenerList();

@@ -420,13 +420,13 @@
         listenerList.remove(ItemListener.class, l);
     }
 
     /**
      * Returns an array of all the item listeners
-     * registered on this <code>DefaultButtonModel</code>.
+     * registered on this {@code DefaultButtonModel}.
      *
-     * @return all of this model's <code>ItemListener</code>s
+     * @return all of this model's {@code ItemListener}s
      *         or an empty
      *         array if no item listeners are currently registered
      *
      * @see #addItemListener
      * @see #removeItemListener

@@ -439,11 +439,11 @@
 
     /**
      * Notifies all listeners that have registered interest for
      * notification on this event type.
      *
-     * @param e the <code>ItemEvent</code> to deliver to listeners
+     * @param e the {@code ItemEvent} to deliver to listeners
      * @see EventListenerList
      */
     protected void fireItemStateChanged(ItemEvent e) {
         // Guaranteed to return a non-null array
         Object[] listeners = listenerList.getListenerList();

@@ -464,14 +464,14 @@
      * <code><em>Foo</em>Listener</code>s
      * upon this model.
      * <code><em>Foo</em>Listener</code>s
      * are registered using the <code>add<em>Foo</em>Listener</code> method.
      * <p>
-     * You can specify the <code>listenerType</code> argument
+     * You can specify the {@code listenerType} argument
      * with a class literal, such as <code><em>Foo</em>Listener.class</code>.
-     * For example, you can query a <code>DefaultButtonModel</code>
-     * instance <code>m</code>
+     * For example, you can query a {@code DefaultButtonModel}
+     * instance {@code m}
      * for its action listeners
      * with the following code:
      *
      * <pre>ActionListener[] als = (ActionListener[])(m.getListeners(ActionListener.class));</pre>
      *

@@ -479,19 +479,19 @@
      * this method returns an empty array.
      *
      * @param <T> the type of requested listeners
      * @param listenerType  the type of listeners requested;
      *          this parameter should specify an interface
-     *          that descends from <code>java.util.EventListener</code>
+     *          that descends from {@code java.util.EventListener}
      * @return an array of all objects registered as
      *          <code><em>Foo</em>Listener</code>s
      *          on this model,
      *          or an empty array if no such
      *          listeners have been added
-     * @exception ClassCastException if <code>listenerType</code> doesn't
+     * @exception ClassCastException if {@code listenerType} doesn't
      *          specify a class or interface that implements
-     *          <code>java.util.EventListener</code>
+     *          {@code java.util.EventListener}
      *
      * @see #getActionListeners
      * @see #getChangeListeners
      * @see #getItemListeners
      *

@@ -499,11 +499,11 @@
      */
     public <T extends EventListener> T[] getListeners(Class<T> listenerType) {
         return listenerList.getListeners(listenerType);
     }
 
-    /** Overridden to return <code>null</code>. */
+    /** Overridden to return {@code null}. */
     public Object[] getSelectedObjects() {
         return null;
     }
 
     /**

@@ -516,11 +516,11 @@
     /**
      * Returns the group that the button belongs to.
      * Normally used with radio buttons, which are mutually
      * exclusive within their group.
      *
-     * @return the <code>ButtonGroup</code> that the button belongs to
+     * @return the {@code ButtonGroup} that the button belongs to
      *
      * @since 1.3
      */
     public ButtonGroup getGroup() {
         return group;
< prev index next >