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
67 * @param firstIndex the first index in the range, <= lastIndex
68 * @param lastIndex the last index in the range, >= firstIndex
69 * @param isAdjusting whether or not this is one in a series of
70 * multiple events, where changes are still being made
71 */
72 public ListSelectionEvent(Object source, int firstIndex, int lastIndex,
73 boolean isAdjusting)
74 {
75 super(source);
76 this.firstIndex = firstIndex;
77 this.lastIndex = lastIndex;
78 this.isAdjusting = isAdjusting;
79 }
80
81 /**
82 * Returns the index of the first row whose selection may have changed.
83 * {@code getFirstIndex() <= getLastIndex()}
84 *
85 * @return the first row whose selection value may have changed,
86 * where zero is the first row
87 */
88 public int getFirstIndex() { return firstIndex; }
89
90 /**
91 * Returns the index of the last row whose selection may have changed.
92 * {@code getLastIndex() >= getFirstIndex()}
93 *
94 * @return the last row whose selection value may have changed,
95 * where zero is the first row
96 */
97 public int getLastIndex() { return lastIndex; }
98
99 /**
100 * Returns whether or not this is one in a series of multiple events,
101 * where changes are still being made. See the documentation for
102 * {@link javax.swing.ListSelectionModel#setValueIsAdjusting} for
103 * more details on how this is used.
104 *
105 * @return {@code true} if this is one in a series of multiple events,
106 * where changes are still being made
107 */
108 public boolean getValueIsAdjusting() { return isAdjusting; }
109
110 /**
111 * Returns a {@code String} that displays and identifies this
112 * object's properties.
|
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
67 * @param firstIndex the first index in the range, <= lastIndex
68 * @param lastIndex the last index in the range, >= firstIndex
69 * @param isAdjusting whether or not this is one in a series of
70 * multiple events, where changes are still being made
71 */
72 public ListSelectionEvent(Object source, int firstIndex, int lastIndex,
73 boolean isAdjusting)
74 {
75 super(source);
76 this.firstIndex = firstIndex;
77 this.lastIndex = lastIndex;
78 this.isAdjusting = isAdjusting;
79 }
80
81 /**
82 * Returns the index of the first row whose selection may have changed.
83 * {@code getFirstIndex() <= getLastIndex()}
84 *
85 * @return the first row whose selection value may have changed,
86 * where zero is the first row
87 */
88 public int getFirstIndex() { return firstIndex; }
89
90 /**
91 * Returns the index of the last row whose selection may have changed.
92 * {@code getLastIndex() >= getFirstIndex()}
93 *
94 * @return the last row whose selection value may have changed,
95 * where zero is the first row
96 */
97 public int getLastIndex() { return lastIndex; }
98
99 /**
100 * Returns whether or not this is one in a series of multiple events,
101 * where changes are still being made. See the documentation for
102 * {@link javax.swing.ListSelectionModel#setValueIsAdjusting} for
103 * more details on how this is used.
104 *
105 * @return {@code true} if this is one in a series of multiple events,
106 * where changes are still being made
107 */
108 public boolean getValueIsAdjusting() { return isAdjusting; }
109
110 /**
111 * Returns a {@code String} that displays and identifies this
112 * object's properties.
|