< prev index next >

src/java.desktop/share/classes/javax/swing/event/ListSelectionEvent.java

Print this page




  26 package javax.swing.event;
  27 
  28 import java.util.EventObject;
  29 import javax.swing.*;
  30 
  31 
  32 /**
  33  * An event that characterizes a change in selection. The change is limited to a
  34  * a single inclusive interval. The selection of at least one index within the
  35  * range will have changed. A decent {@code ListSelectionModel} implementation
  36  * will keep the range as small as possible. {@code ListSelectionListeners} will
  37  * generally query the source of the event for the new selected status of each
  38  * potentially changed row.
  39  * <p>
  40  * <strong>Warning:</strong>
  41  * Serialized objects of this class will not be compatible with
  42  * future Swing releases. The current serialization support is
  43  * appropriate for short term storage or RMI between applications running
  44  * the same version of Swing.  As of 1.4, support for long term storage
  45  * of all JavaBeans&trade;
  46  * has been added to the <code>java.beans</code> package.
  47  * Please see {@link java.beans.XMLEncoder}.
  48  *
  49  * @author Hans Muller
  50  * @author Ray Ryan
  51  * @see ListSelectionModel
  52  */
  53 @SuppressWarnings("serial") // Same-version serialization only
  54 public class ListSelectionEvent extends EventObject
  55 {
  56     private int firstIndex;
  57     private int lastIndex;
  58     private boolean isAdjusting;
  59 
  60     /**
  61      * Represents a change in selection status between {@code firstIndex} and
  62      * {@code lastIndex}, inclusive. {@code firstIndex} is less than or equal to
  63      * {@code lastIndex}. The selection of at least one index within the range will
  64      * have changed.
  65      *
  66      * @param source the {@code Object} on which the event initially occurred




  26 package javax.swing.event;
  27 
  28 import java.util.EventObject;
  29 import javax.swing.*;
  30 
  31 
  32 /**
  33  * An event that characterizes a change in selection. The change is limited to a
  34  * a single inclusive interval. The selection of at least one index within the
  35  * range will have changed. A decent {@code ListSelectionModel} implementation
  36  * will keep the range as small as possible. {@code ListSelectionListeners} will
  37  * generally query the source of the event for the new selected status of each
  38  * potentially changed row.
  39  * <p>
  40  * <strong>Warning:</strong>
  41  * Serialized objects of this class will not be compatible with
  42  * future Swing releases. The current serialization support is
  43  * appropriate for short term storage or RMI between applications running
  44  * the same version of Swing.  As of 1.4, support for long term storage
  45  * of all JavaBeans&trade;
  46  * has been added to the {@code java.beans} package.
  47  * Please see {@link java.beans.XMLEncoder}.
  48  *
  49  * @author Hans Muller
  50  * @author Ray Ryan
  51  * @see ListSelectionModel
  52  */
  53 @SuppressWarnings("serial") // Same-version serialization only
  54 public class ListSelectionEvent extends EventObject
  55 {
  56     private int firstIndex;
  57     private int lastIndex;
  58     private boolean isAdjusting;
  59 
  60     /**
  61      * Represents a change in selection status between {@code firstIndex} and
  62      * {@code lastIndex}, inclusive. {@code firstIndex} is less than or equal to
  63      * {@code lastIndex}. The selection of at least one index within the range will
  64      * have changed.
  65      *
  66      * @param source the {@code Object} on which the event initially occurred


< prev index next >