< prev index next >

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

Print this page

        

@@ -45,39 +45,48 @@
  * @since 1.2
  */
 @SuppressWarnings("serial") // Same-version serialization only
 public class DefaultSingleSelectionModel implements SingleSelectionModel,
 Serializable {
-    /* Only one ModelChangeEvent is needed per model instance since the
+    /**
+     * Only one ModelChangeEvent is needed per model instance since the
      * event's only (read-only) state is the source property.  The source
      * of events generated here is always "this".
      */
     protected transient ChangeEvent changeEvent = null;
     /** The collection of registered listeners */
     protected EventListenerList listenerList = new EventListenerList();
 
     private int index = -1;
 
-    // implements javax.swing.SingleSelectionModel
+    /**
+     * {@inheritDoc}
+     */
     public int getSelectedIndex() {
         return index;
     }
 
-    // implements javax.swing.SingleSelectionModel
+    /**
+     * {@inheritDoc}
+     */
     public void setSelectedIndex(int index) {
         if (this.index != index) {
             this.index = index;
             fireStateChanged();
         }
     }
 
-    // implements javax.swing.SingleSelectionModel
+    /**
+     * {@inheritDoc}
+     */
     public void clearSelection() {
         setSelectedIndex(-1);
     }
 
-    // implements javax.swing.SingleSelectionModel
+    /**
+     * {@inheritDoc}
+     */
     public boolean isSelected() {
         boolean ret = false;
         if (getSelectedIndex() != -1) {
             ret = true;
         }
< prev index next >