Packagecom.yworks.graph.model
Interfacepublic interface IGraphSelection extends ISelectionModel, flash.events.IEventDispatcher, Iterable
Implementors CompositeStripeSelection, GraphSelection

Manages the selection state of items in an IGraph instance.



Public Properties
 PropertyDefined By
 Inheritedcount : uint
[read-only] Returns the number of selected items.
ISelectionModel
  selectedBends : Iterable
[read-only] Enumerates all currently selected bends.
IGraphSelection
  selectedEdges : Iterable
[read-only] Enumerates all currently selected edges.
IGraphSelection
  selectedLabels : Iterable
[read-only] Enumerates all currently selected labels.
IGraphSelection
  selectedNodes : Iterable
[read-only] Enumerates all currently selected nodes.
IGraphSelection
 InheritedselectedObjects : Iterable
[read-only] Gets an iterable that enumerates all currently selected items.
ISelectionModel
  selectedPorts : Iterable
[read-only] Enumerates all currently selected ports.
IGraphSelection
Public Methods
 MethodDefined By
 Inherited
clear():void
Clears the selection.
ISelectionModel
  
isBendSelected(bend:IBend):Boolean
Queries the selection state for the given bend.
IGraphSelection
  
isEdgeSelected(edge:IEdge):Boolean
Queries the selection state for the given edge.
IGraphSelection
  
isLabelSelected(label:ILabel):Boolean
Queries the selection state for the given label.
IGraphSelection
  
isNodeSelected(node:INode):Boolean
Queries the selection state for the given node.
IGraphSelection
  
isPortSelected(port:IPort):Boolean
Queries the selection state for the given port.
IGraphSelection
 Inherited
isSelected(item:IModelItem):Boolean
Determines whether an item is currently selected.
ISelectionModel
 Inherited
Returns an iterator over a set of elements.
Iterable
  
setBendSelected(bend:IBend, selected:Boolean):void
Sets the selected state for the given bend.
IGraphSelection
  
setEdgeSelected(edge:IEdge, selected:Boolean):void
Sets the selected state for the given edge.
IGraphSelection
  
setLabelSelected(label:ILabel, selected:Boolean):void
Sets the selected state for the given label.
IGraphSelection
  
setNodeSelected(node:INode, selected:Boolean):void
Sets the selected state for the given node.
IGraphSelection
  
setPortSelected(port:IPort, selected:Boolean):void
Sets the selected state for the given port.
IGraphSelection
 Inherited
setSelected(item:IModelItem, selected:Boolean):void
Sets the selection state of an item.
ISelectionModel
Events
 Event Summary Defined By
  An event that will be triggered if an item changed its selection state from selected to unselected.IGraphSelection
  An event that will be triggered if an item changed its selection state from unselected to selected.IGraphSelection
Property Detail
selectedBendsproperty
selectedBends:Iterable  [read-only]

Enumerates all currently selected bends.


Implementation
    public function get selectedBends():Iterable
selectedEdgesproperty 
selectedEdges:Iterable  [read-only]

Enumerates all currently selected edges.


Implementation
    public function get selectedEdges():Iterable
selectedLabelsproperty 
selectedLabels:Iterable  [read-only]

Enumerates all currently selected labels.


Implementation
    public function get selectedLabels():Iterable
selectedNodesproperty 
selectedNodes:Iterable  [read-only]

Enumerates all currently selected nodes.


Implementation
    public function get selectedNodes():Iterable
selectedPortsproperty 
selectedPorts:Iterable  [read-only]

Enumerates all currently selected ports.


Implementation
    public function get selectedPorts():Iterable
Method Detail
isBendSelected()method
public function isBendSelected(bend:IBend):Boolean

Queries the selection state for the given bend.

Parameters

bend:IBend — the bend to query the state for

Returns
Boolean — whether the bend is currently selected
isEdgeSelected()method 
public function isEdgeSelected(edge:IEdge):Boolean

Queries the selection state for the given edge.

Parameters

edge:IEdge — the edge to query the state for

Returns
Boolean — whether the edge is currently selected
isLabelSelected()method 
public function isLabelSelected(label:ILabel):Boolean

Queries the selection state for the given label.

Parameters

label:ILabel — the label to query the state for

Returns
Boolean — whether the label is currently selected
isNodeSelected()method 
public function isNodeSelected(node:INode):Boolean

Queries the selection state for the given node.

Parameters

node:INode — the node to query the state for

Returns
Boolean — whether the node is currently selected
isPortSelected()method 
public function isPortSelected(port:IPort):Boolean

Queries the selection state for the given port.

Parameters

port:IPort — the port to query the state for

Returns
Boolean — whether the port is currently selected
setBendSelected()method 
public function setBendSelected(bend:IBend, selected:Boolean):void

Sets the selected state for the given bend.

Parameters

bend:IBend — the bend to set the selection state for
 
selected:Boolean — the new selection state

setEdgeSelected()method 
public function setEdgeSelected(edge:IEdge, selected:Boolean):void

Sets the selected state for the given edge.

Parameters

edge:IEdge — the edge to set the selection state for
 
selected:Boolean — the new selection state

setLabelSelected()method 
public function setLabelSelected(label:ILabel, selected:Boolean):void

Sets the selected state for the given label.

Parameters

label:ILabel — the label to set the selection state for
 
selected:Boolean — the new selection state

setNodeSelected()method 
public function setNodeSelected(node:INode, selected:Boolean):void

Sets the selected state for the given node.

Parameters

node:INode — the node to set the selection state for
 
selected:Boolean — the new selection state

setPortSelected()method 
public function setPortSelected(port:IPort, selected:Boolean):void

Sets the selected state for the given port.

Parameters

port:IPort — the port to set the selection state for
 
selected:Boolean — the new selection state

Event Detail
itemDeselected Event
Event Object Type: com.yworks.graph.model.SelectionEvent
SelectionEvent.type property = com.yworks.graph.model.SelectionEvent.DESELECT

An event that will be triggered if an item changed its selection state from selected to unselected.

itemSelected Event  
Event Object Type: com.yworks.graph.model.SelectionEvent
SelectionEvent.type property = com.yworks.graph.model.SelectionEvent.SELECT

An event that will be triggered if an item changed its selection state from unselected to selected.