| Package | com.yworks.graph.model |
| Class | public class DefaultSelectionModel |
| Inheritance | DefaultSelectionModel flash.events.EventDispatcher |
| Implements | ISelectionModel |
ISelectionModel that
is based on a second collection model to hold the selected elements.
| Property | Defined by | ||
|---|---|---|---|
| count : uint [read-only]
Returns the number of selected items.
| DefaultSelectionModel | ||
| domain : ICollectionModel
Gets or sets the domain of the selection model.
| DefaultSelectionModel | ||
| selectedObjects : Iterable
[read-only]
Gets an iterable that enumerates all currently selected items.
| DefaultSelectionModel | ||
| selection : ICollectionModel
[read-only]
Provides a collection model view over the selected items.
| DefaultSelectionModel | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a default selection model implementation that uses a
DefaultCollectionModel
to hold the selection. | DefaultSelectionModel | ||
|
clear():void
Clears the selection.
| DefaultSelectionModel | ||
|
isSelected(item:IModelItem):Boolean
Determines whether an item is currently selected.
| DefaultSelectionModel | ||
|
Returns an
Iterator over the selected items. | DefaultSelectionModel | ||
|
setSelected(item:IModelItem, selected:Boolean):void
Sets the selection state of an item.
| DefaultSelectionModel | ||
| Method | Defined by | ||
|---|---|---|---|
|
onItemDeselected(item:IModelItem):void
Called when an item gets deselected.
| DefaultSelectionModel | ||
|
onItemSelected(item:IModelItem):void
Called when an item gets selected.
| DefaultSelectionModel | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when an item has been deselected | DefaultSelectionModel | |||
| Dispatched when an item has been selected | DefaultSelectionModel | |||
| count | property |
count:uint [read-only]Returns the number of selected items.
Implementation public function get count():uint
| domain | property |
domain:ICollectionModel [read-write]Gets or sets the domain of the selection model.
The domain describes items that can possibly be selected. This implementation automatically deselects items that get removed from the domain.
Implementation public function get domain():ICollectionModel
public function set domain(value:ICollectionModel):void
| selectedObjects | property |
selectedObjects:Iterable [read-only]Gets an iterable that enumerates all currently selected items.
Implementation public function get selectedObjects():Iterable
| selection | property |
selection:ICollectionModel [read-only]Provides a collection model view over the selected items.
Implementation public function get selection():ICollectionModel
| DefaultSelectionModel | () | constructor |
public function DefaultSelectionModel()
Creates a default selection model implementation that uses a DefaultCollectionModel
to hold the selection.
| clear | () | method |
public function clear():voidClears the selection.
| isSelected | () | method |
public function isSelected(item:IModelItem):BooleanDetermines whether an item is currently selected.
Parametersitem:IModelItem — The item to check.
|
Boolean — Whether the item is currently selected.
|
| iterator | () | method |
public function iterator():Iterator
Returns an Iterator over the selected items.
Iterator —
An Iterator over the selected items.
|
| onItemDeselected | () | method |
protected function onItemDeselected(item:IModelItem):voidCalled when an item gets deselected.
Parametersitem:IModelItem |
| onItemSelected | () | method |
protected function onItemSelected(item:IModelItem):voidCalled when an item gets selected.
Parametersitem:IModelItem |
| setSelected | () | method |
public function setSelected(item:IModelItem, selected:Boolean):voidSets the selection state of an item.
Parametersitem:IModelItem — The object to set the selection state for.
|
|
selected:Boolean — Whether to select the object.
|
| deselect | event |
com.yworks.graph.model.SelectionEvent
com.yworks.graph.model.SelectionEvent.DESELECT
Dispatched when an item has been deselected
| select | event |
com.yworks.graph.model.SelectionEvent
com.yworks.graph.model.SelectionEvent.SELECT
Dispatched when an item has been selected