Packagecom.yworks.graph.model
Interfacepublic interface ISelectionModel extends flash.events.IEventDispatcher, Iterable
SubinterfacesIGraphSelection
ImplementorsDefaultSelectionModel

An interface that models the selection state of a set of items.



Public Properties
 PropertyDefined by
  count : uint
[read-only] Returns the number of selected items.
ISelectionModel
  selectedObjects : Iterable
[read-only] Gets an iterable that enumerates all currently selected items.
ISelectionModel
Public Methods
 MethodDefined by
  
clear():void
Clears the selection.
ISelectionModel
  
isSelected(item:IModelItem):Boolean
Determines whether an item is currently selected.
ISelectionModel
 Inherited
Returns an iterator over a set of elements.
Iterable
  
setSelected(item:IModelItem, selected:Boolean):void
Sets the selection state of an item.
ISelectionModel
Events
 EventSummaryDefined by
   Dispatched when an item changed its selection state from selected to unselected.ISelectionModel
   Dispatched when an item changed its selection state from unselected to selected.ISelectionModel
Property detail
countproperty
count:uint  [read-only]

Returns the number of selected items.

Implementation
    public function get count():uint
selectedObjectsproperty 
selectedObjects:Iterable  [read-only]

Gets an iterable that enumerates all currently selected items.

Implementation
    public function get selectedObjects():Iterable
Method detail
clear()method
public function clear():void

Clears the selection.

isSelected()method 
public function isSelected(item:IModelItem):Boolean

Determines whether an item is currently selected.

Parameters
item:IModelItem — The item to check.

Returns
Boolean — Whether the item is currently selected.
setSelected()method 
public function setSelected(item:IModelItem, selected:Boolean):void

Sets the selection state of an item.

Parameters
item:IModelItem — The object to set the selection state for.
 
selected:Boolean — Whether to select the object.
Event detail
deselectevent 
Event object type: com.yworks.graph.model.SelectionEvent

Dispatched when an item changed its selection state from selected to unselected.

selectevent  
Event object type: com.yworks.graph.model.SelectionEvent

Dispatched when an item changed its selection state from unselected to selected.