| 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.
public function get count():uint| domain | property |
domain:ICollectionModelGets 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.
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.
public function get selectedObjects():Iterable| selection | property |
selection:ICollectionModel [read-only] Provides a collection model view over the selected items.
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.
Parameters
item: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.
Parameters
item:IModelItem |
| onItemSelected | () | method |
protected function onItemSelected(item:IModelItem):voidCalled when an item gets selected.
Parameters
item:IModelItem |
| setSelected | () | method |
public function setSelected(item:IModelItem, selected:Boolean):voidSets the selection state of an item.
Parameters
item:IModelItem — The object to set the selection state for.
| |
selected:Boolean — Whether to select the object.
|
| deselect | Event |
com.yworks.graph.model.SelectionEventcom.yworks.graph.model.SelectionEvent.DESELECTDispatched when an item has been deselected
| select | Event |
com.yworks.graph.model.SelectionEventcom.yworks.graph.model.SelectionEvent.SELECTDispatched when an item has been selected