| public interface javax.swing ListSelectionModel
|
Java SE 6 |
| version | 1.23 07/11/06 |
| See also | javax.swing.DefaultListSelectionModel |
| Fields | |||
|---|---|---|---|
| final public static int | SINGLE_SELECTION Details
A value for the selectionMode property: select one list index
at a time.
| ||
| final public static int | SINGLE_INTERVAL_SELECTION Details
A value for the selectionMode property: select one contiguous
range of indices at a time.
| ||
| final public static int | MULTIPLE_INTERVAL_SELECTION Details
A value for the selectionMode property: select one or more
contiguous ranges of indices at a time.
| ||
| Methods | |||||||
|---|---|---|---|---|---|---|---|
| public void | addListSelectionListener(ListSelectionListener x) Details
Add a listener to the list that's notified each time a change
to the selection occurs.
| ||||||
| public void | addSelectionInterval(int index0, int index1) Details
Changes the selection to be the set union of the current selection
and the indices between index0 and index1 inclusive.
index0 doesn't have to be less than or equal to index1.
In
If this represents a change to the current selection, then each
| ||||||
| public void | clearSelection() Details
Change the selection to the empty set. If this represents
a change to the current selection then notify each ListSelectionListener.
| ||||||
| public void | insertIndexInterval(int index, int length, boolean before) Insert length indices beginning before/after index. This is typically called to sync the selection model with a corresponding change in the data model. | ||||||
| public void | removeIndexInterval(int index0, int index1) Remove the indices in the interval index0,index1 (inclusive) from the selection model. This is typically called to sync the selection model width a corresponding change in the data model. | ||||||
| public void | removeListSelectionListener(ListSelectionListener x) Details
Remove a listener from the list that's notified each time a
change to the selection occurs.
| ||||||
| public void | removeSelectionInterval(int index0, int index1) Details
Changes the selection to be the set difference of the current selection
and the indices between index0 and index1 inclusive.
index0 doesn't have to be less than or equal to index1.
In
If this represents a change to the current selection, then each
| ||||||
| Properties | |||||||
|---|---|---|---|---|---|---|---|
| public void | setAnchorSelectionIndex(int index) Details
Set the anchor selection index.
| ||||||
| public int | getAnchorSelectionIndex() Details
Return the first index argument from the most recent call to
setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
The most recent index0 is considered the "anchor" and the most recent
index1 is considered the "lead". Some interfaces display these
indices specially, e.g. Windows95 displays the lead index with a
dotted yellow outline.
| ||||||
| public void | setLeadSelectionIndex(int index) Details
Set the lead selection index.
| ||||||
| public int | getLeadSelectionIndex() Details
Return the second index argument from the most recent call to
setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
| ||||||
| public int | getMaxSelectionIndex() Returns the last selected index or -1 if the selection is empty. | ||||||
| public int | getMinSelectionIndex() Returns the first selected index or -1 if the selection is empty. | ||||||
| public boolean | isSelectedIndex(int index) Returns true if the specified index is selected. | ||||||
| public boolean | isSelectionEmpty() Returns true if no indices are selected. | ||||||
| public void | setSelectionInterval(int index0, int index1) Details
Changes the selection to be between index0 and index1
inclusive. index0 doesn't have to be less than or equal to
index1.
In
If this represents a change to the current selection, then each
| ||||||
| public void | setSelectionMode(int selectionMode) Details
Sets the selection mode. The following list describes the accepted
selection modes:
| ||||||
| public int | getSelectionMode() Details
Returns the current selection mode.
| ||||||
| public void | setValueIsAdjusting(boolean valueIsAdjusting) Details
Sets the valueIsAdjusting property, which indicates whether
or not upcoming selection changes should be considered part of a single
change. The value of this property is used to initialize the
valueIsAdjusting property of the ListSelectionEvents that
are generated.
For example, if the selection is being updated in response to a user
drag, this property can be set to
Setting this property to
| ||||||
| public boolean | getValueIsAdjusting() Details
Returns true if the selection is undergoing a series of changes.
| ||||||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|