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

Print this page
rev 10121 : 8046485: Add missing @since tag under javax.swing.*
Reviewed-by:


  31 import java.beans.Transient;
  32 
  33 import javax.swing.event.*;
  34 
  35 
  36 /**
  37  * Default data model for list selections.
  38  * <p>
  39  * <strong>Warning:</strong>
  40  * Serialized objects of this class will not be compatible with
  41  * future Swing releases. The current serialization support is
  42  * appropriate for short term storage or RMI between applications running
  43  * the same version of Swing.  As of 1.4, support for long term storage
  44  * of all JavaBeans&trade;
  45  * has been added to the <code>java.beans</code> package.
  46  * Please see {@link java.beans.XMLEncoder}.
  47  *
  48  * @author Philip Milne
  49  * @author Hans Muller
  50  * @see ListSelectionModel

  51  */
  52 @SuppressWarnings("serial") // Same-version serialization only
  53 public class DefaultListSelectionModel implements ListSelectionModel, Cloneable, Serializable
  54 {
  55     private static final int MIN = -1;
  56     private static final int MAX = Integer.MAX_VALUE;
  57     private int selectionMode = MULTIPLE_INTERVAL_SELECTION;
  58     private int minIndex = MAX;
  59     private int maxIndex = MIN;
  60     private int anchorIndex = -1;
  61     private int leadIndex = -1;
  62     private int firstAdjustedIndex = MAX;
  63     private int lastAdjustedIndex = MIN;
  64     private boolean isAdjusting = false;
  65 
  66     private int firstChangedIndex = MAX;
  67     private int lastChangedIndex = MIN;
  68 
  69     private BitSet value = new BitSet(32);
  70     protected EventListenerList listenerList = new EventListenerList();




  31 import java.beans.Transient;
  32 
  33 import javax.swing.event.*;
  34 
  35 
  36 /**
  37  * Default data model for list selections.
  38  * <p>
  39  * <strong>Warning:</strong>
  40  * Serialized objects of this class will not be compatible with
  41  * future Swing releases. The current serialization support is
  42  * appropriate for short term storage or RMI between applications running
  43  * the same version of Swing.  As of 1.4, support for long term storage
  44  * of all JavaBeans&trade;
  45  * has been added to the <code>java.beans</code> package.
  46  * Please see {@link java.beans.XMLEncoder}.
  47  *
  48  * @author Philip Milne
  49  * @author Hans Muller
  50  * @see ListSelectionModel
  51  * @since 1.2
  52  */
  53 @SuppressWarnings("serial") // Same-version serialization only
  54 public class DefaultListSelectionModel implements ListSelectionModel, Cloneable, Serializable
  55 {
  56     private static final int MIN = -1;
  57     private static final int MAX = Integer.MAX_VALUE;
  58     private int selectionMode = MULTIPLE_INTERVAL_SELECTION;
  59     private int minIndex = MAX;
  60     private int maxIndex = MIN;
  61     private int anchorIndex = -1;
  62     private int leadIndex = -1;
  63     private int firstAdjustedIndex = MAX;
  64     private int lastAdjustedIndex = MIN;
  65     private boolean isAdjusting = false;
  66 
  67     private int firstChangedIndex = MAX;
  68     private int lastChangedIndex = MIN;
  69 
  70     private BitSet value = new BitSet(32);
  71     protected EventListenerList listenerList = new EventListenerList();