| Package | org.aswing |
| Interface | public interface ListSelectionModel |
| Implementors | DefaultListSelectionModel |
See also
| Method | Defined by | ||
|---|---|---|---|
|
addListSelectionListener(listener:Function):void
Add a listener to the list that's notified each time a change
to the selection occurs.
| ListSelectionModel | ||
|
addSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Change the selection to be the set union of the current selection
and the indices between index0 and index1 inclusive.
| ListSelectionModel | ||
|
clearSelection(programmatic:Boolean = true):void
Change the selection to the empty set.
| ListSelectionModel | ||
|
getAnchorSelectionIndex():int
Return the first index argument from the most recent call to
setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
| ListSelectionModel | ||
|
getLeadSelectionIndex():int
Return the second index argument from the most recent call to
setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
| ListSelectionModel | ||
|
getMaxSelectionIndex():int
Returns the last selected index or -1 if the selection is empty.
| ListSelectionModel | ||
|
getMinSelectionIndex():int
Returns the first selected index or -1 if the selection is empty.
| ListSelectionModel | ||
|
getSelectionMode():int
Returns the current selection mode.
| ListSelectionModel | ||
|
insertIndexInterval(index:int, length:int, before:Boolean, programmatic:Boolean = true):void
Insert length indices beginning before/after index.
| ListSelectionModel | ||
|
isSelectedIndex(index:int):Boolean
Returns true if the specified index is selected.
| ListSelectionModel | ||
|
isSelectionEmpty():Boolean
Returns true if no indices are selected.
| ListSelectionModel | ||
|
removeIndexInterval(index0:int, index1:int, programmatic:Boolean = true):void
Remove the indices in the interval index0,index1 (inclusive) from
the selection model.
| ListSelectionModel | ||
|
removeListSelectionListener(listener:Function):void
Removes a listener from the list selection listeners.
| ListSelectionModel | ||
|
removeSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Change the selection to be the set difference of the current selection
and the indices between index0 and index1 inclusive.
| ListSelectionModel | ||
|
setAnchorSelectionIndex(index:int):void
Set the anchor selection index.
| ListSelectionModel | ||
|
setLeadSelectionIndex(index:int):void
Set the lead selection index.
| ListSelectionModel | ||
|
setSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Change the selection to be between index0 and index1 inclusive.
| ListSelectionModel | ||
|
setSelectionMode(selectionMode:int):void
Set the selection mode.
| ListSelectionModel | ||
| addListSelectionListener | () | method |
public function addListSelectionListener(listener:Function):voidAdd a listener to the list that's notified each time a change to the selection occurs.
Parameterslistener:Function — the listener to be add.
|
| addSelectionInterval | () | method |
public function addSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):voidChange the selection to be the set union of the current selection and the indices between index0 and index1 inclusive. If this represents a change to the current selection, then notify each ListSelectionListener. Note that index0 doesn't have to be less than or equal to index1.
Parametersindex0:int — one end of the interval.
|
|
index1:int — other end of the interval.
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change.
|
See also
| clearSelection | () | method |
public function clearSelection(programmatic:Boolean = true):voidChange the selection to the empty set. If this represents a change to the current selection then notify each ListSelectionListener.
Parametersprogrammatic:Boolean (default = true) — indicate if this is a programmatic change.
|
See also
| getAnchorSelectionIndex | () | method |
public function getAnchorSelectionIndex():intReturn 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.
Returnsint |
See also
| getLeadSelectionIndex | () | method |
public function getLeadSelectionIndex():intReturn the second index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
Returnsint |
See also
| getMaxSelectionIndex | () | method |
public function getMaxSelectionIndex():intReturns the last selected index or -1 if the selection is empty.
Returnsint |
| getMinSelectionIndex | () | method |
public function getMinSelectionIndex():intReturns the first selected index or -1 if the selection is empty.
Returnsint |
| getSelectionMode | () | method |
public function getSelectionMode():intReturns the current selection mode.
Returnsint — The value of the selectionMode property.
|
See also
| insertIndexInterval | () | method |
public function insertIndexInterval(index:int, length:int, before:Boolean, programmatic:Boolean = true):voidInsert length indices beginning before/after index. This is typically called to sync the selection model with a corresponding change in the data model.
Parametersindex:int — the index.
|
|
length:int — the length.
|
|
before:Boolean — whether before or after.
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change.
|
| isSelectedIndex | () | method |
public function isSelectedIndex(index:int):BooleanReturns true if the specified index is selected.
Parametersindex:int |
Boolean |
| isSelectionEmpty | () | method |
public function isSelectionEmpty():BooleanReturns true if no indices are selected.
ReturnsBoolean |
| removeIndexInterval | () | method |
public function removeIndexInterval(index0:int, index1:int, programmatic:Boolean = true):voidRemove 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.
Parametersindex0:int — the first index.
|
|
index1:int — the second index.
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change.
|
| removeListSelectionListener | () | method |
public function removeListSelectionListener(listener:Function):voidRemoves a listener from the list selection listeners.
Parameterslistener:Function — the listener to be removed.
|
| removeSelectionInterval | () | method |
public function removeSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):voidChange the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive. If this represents a change to the current selection, then notify each ListSelectionListener. Note that index0 doesn't have to be less than or equal to index1.
Parametersindex0:int — one end of the interval.
|
|
index1:int — other end of the interval.
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change.
|
See also
| setAnchorSelectionIndex | () | method |
public function setAnchorSelectionIndex(index:int):voidSet the anchor selection index.
Parametersindex:int |
See also
| setLeadSelectionIndex | () | method |
public function setLeadSelectionIndex(index:int):voidSet the lead selection index.
Parametersindex:int |
See also
| setSelectionInterval | () | method |
public function setSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):voidChange the selection to be between index0 and index1 inclusive. If this represents a change to the current selection, then notify each ListSelectionListener. Note that index0 doesn't have to be less than or equal to index1.
Parametersindex0:int — one end of the interval.
|
|
index1:int — other end of the interval.
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change.
|
See also
| setSelectionMode | () | method |
public function setSelectionMode(selectionMode:int):voidSet the selection mode. The following selectionMode values are allowed:
SINGLE_SELECTION
Only one list index can be selected at a time. In this
mode the setSelectionInterval and addSelectionInterval
methods are equivalent, and only the second index
argument (the "lead index") is used.MULTIPLE_SELECTION
In this mode, there's no restriction on what can be selected.selectionMode:int |
See also