| Package | org.aswing |
| Interface | public interface SingleSelectionModel |
| Implementors | DefaultSingleSelectionModel |
| Method | Defined by | ||
|---|---|---|---|
|
addStateListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Adds a listener to listen the Model's state change event.
| SingleSelectionModel | ||
|
clearSelection(programmatic:Boolean = true):void
Clears the selection (to -1).
| SingleSelectionModel | ||
|
getSelectedIndex():int
Returns the model's selection.
| SingleSelectionModel | ||
|
isSelected():Boolean
Returns true if the selection model currently has a selected value.
| SingleSelectionModel | ||
|
removeStateListener(listener:Function):void
Removes a state listener.
| SingleSelectionModel | ||
|
setSelectedIndex(index:int, programmatic:Boolean = true):void
Sets the model's selected index to index.
| SingleSelectionModel | ||
| addStateListener | () | method |
public function addStateListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):voidAdds a listener to listen the Model's state change event.
Parameterslistener:Function — the listener
|
|
priority:int (default = 0) — the priority
|
|
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak.
|
See also
| clearSelection | () | method |
public function clearSelection(programmatic:Boolean = true):voidClears the selection (to -1).
Parametersprogrammatic:Boolean (default = true) — indicate if this is a programmatic change.
|
| getSelectedIndex | () | method |
public function getSelectedIndex():intReturns the model's selection.
Returnsint — the model's selection, or -1 if there is no selection
|
See also
| isSelected | () | method |
public function isSelected():BooleanReturns true if the selection model currently has a selected value.
ReturnsBoolean — true if a value is currently selected
|
| removeStateListener | () | method |
public function removeStateListener(listener:Function):voidRemoves a state listener.
Parameterslistener:Function — the listener to be removed.
|
See also
| setSelectedIndex | () | method |
public function setSelectedIndex(index:int, programmatic:Boolean = true):voidSets the model's selected index to index. Notifies any listeners if the model changes.
Parametersindex:int — an int specifying the model selection.
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change.
|
See also