summaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/swing/DefaultButtonModel.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/swing/DefaultButtonModel.java')
-rw-r--r--libjava/classpath/javax/swing/DefaultButtonModel.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/libjava/classpath/javax/swing/DefaultButtonModel.java b/libjava/classpath/javax/swing/DefaultButtonModel.java
index 2cfb9e96eb8..f7d09d5780d 100644
--- a/libjava/classpath/javax/swing/DefaultButtonModel.java
+++ b/libjava/classpath/javax/swing/DefaultButtonModel.java
@@ -38,6 +38,7 @@ exception statement from your version. */
package javax.swing;
+import java.awt.ItemSelectable;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
@@ -51,7 +52,8 @@ import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
/**
- * The pUrpose of this class is to model the dynamic state of an abstract
+ * The default implementation of {@link ButtonModel}.
+ * The purpose of this class is to model the dynamic state of an abstract
* button. The concrete button type holding this state may be a a "toggle"
* button (checkbox, radio button) or a "push" button (menu button, button).
* If the model is disabled, only the "selected" property can be changed. An
@@ -265,9 +267,9 @@ public class DefaultButtonModel implements ButtonModel, Serializable
}
/**
- * Inform each ItemListener in the {@link listenerList} that an ItemEvent
+ * Inform each ItemListener in the {@link #listenerList} that an ItemEvent
* has occurred. This happens in response to any change to the {@link
- * stateMask} field.
+ * #stateMask} field.
*
* @param e The ItemEvent to fire
*/
@@ -280,9 +282,9 @@ public class DefaultButtonModel implements ButtonModel, Serializable
}
/**
- * Inform each ActionListener in the {@link listenerList} that an
+ * Inform each ActionListener in the {@link #listenerList} that an
* ActionEvent has occurred. This happens in response to the any change to
- * the {@link stateMask} field which makes the enabled, armed and pressed
+ * the {@link #stateMask} field which makes the enabled, armed and pressed
* properties all simultaneously <code>true</code>.
*
* @param e The ActionEvent to fire
@@ -296,7 +298,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
}
/**
- * Inform each ChangeListener in the {@link listenerList} that a ChangeEvent
+ * Inform each ChangeListener in the {@link #listenerList} that a ChangeEvent
* has occurred. This happens in response to the any change to a property
* of the model.
*/
@@ -395,13 +397,13 @@ public class DefaultButtonModel implements ButtonModel, Serializable
else
stateMask = stateMask & (~PRESSED);
- // notify interested ChangeListeners
- fireStateChanged();
-
// if button is armed and was released, fire action event
if (!p && isArmed())
fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
actionCommand));
+
+ // notify interested ChangeListeners
+ fireStateChanged();
}
/**