Packagecom.yworks.graph.model
Classpublic class CompositeStripeSelection
InheritanceCompositeStripeSelection Inheritance flash.events.EventDispatcher
Implements IGraphSelection

A specialized IGraphSelection implementation that wraps an existing IGraphSelection and an existing IStripeSelection and synchronises their state.

An instance of this class is returned by GraphEditorInputMode.graphSelection if a TableEditorInputMode is installed as a child mode and its synchronizeWithGraphSelection property is true.

See also

com.yworks.graph.input.GraphEditorInputMode
com.yworks.graph.input.GraphEditorInputMode.graphSelection
com.yworks.graph.input.TableEditorInputMode


Public Properties
 PropertyDefined By
  count : uint
[read-only] Returns the number of selected items.
CompositeStripeSelection
  mixedSelectionAllowed : Boolean
Whether to allow mixed selections of graph elements and table elements.
CompositeStripeSelection
  selectedBends : Iterable
[read-only] Enumerates all currently selected bends.
CompositeStripeSelection
  selectedEdges : Iterable
[read-only] Enumerates all currently selected edges.
CompositeStripeSelection
  selectedLabels : Iterable
[read-only] Enumerates all currently selected labels.
CompositeStripeSelection
  selectedNodes : Iterable
[read-only] Enumerates all currently selected nodes.
CompositeStripeSelection
  selectedObjects : Iterable
[read-only] Gets an iterable that enumerates all currently selected items.
CompositeStripeSelection
  selectedPorts : Iterable
[read-only] Enumerates all currently selected ports.
CompositeStripeSelection
Public Methods
 MethodDefined By
  
Wraps two existing selection models.
CompositeStripeSelection
  
clear():void
Clears the selection.
CompositeStripeSelection
  
dispose():void
Clean up.
CompositeStripeSelection
  
isBendSelected(bend:IBend):Boolean
Queries the selection state for the given bend.
CompositeStripeSelection
  
isEdgeSelected(edge:IEdge):Boolean
Queries the selection state for the given edge.
CompositeStripeSelection
  
isLabelSelected(label:ILabel):Boolean
Queries the selection state for the given label.
CompositeStripeSelection
  
isNodeSelected(node:INode):Boolean
Queries the selection state for the given node.
CompositeStripeSelection
  
isPortSelected(port:IPort):Boolean
Queries the selection state for the given port.
CompositeStripeSelection
  
isSelected(item:IModelItem):Boolean
Determines whether an item is currently selected.
CompositeStripeSelection
  
Returns an iterator over a set of elements.
CompositeStripeSelection
  
setBendSelected(bend:IBend, selected:Boolean):void
Sets the selected state for the given bend.
CompositeStripeSelection
  
setEdgeSelected(edge:IEdge, selected:Boolean):void
Sets the selected state for the given edge.
CompositeStripeSelection
  
setLabelSelected(label:ILabel, selected:Boolean):void
Sets the selected state for the given label.
CompositeStripeSelection
  
setNodeSelected(node:INode, selected:Boolean):void
Sets the selected state for the given node.
CompositeStripeSelection
  
setPortSelected(port:IPort, selected:Boolean):void
Sets the selected state for the given port.
CompositeStripeSelection
  
setSelected(item:IModelItem, selected:Boolean):void
Sets the selection state of an item.
CompositeStripeSelection
Protected Methods
 MethodDefined By
  
Raises the SelectionEvent.DESELECT event.
CompositeStripeSelection
  
Raises the SelectionEvent.SELECT event.
CompositeStripeSelection
Events
 Event Summary Defined By
  Dispatched when an item changed its selection state from selected to unselected.CompositeStripeSelection
  Dispatched when an item changed its selection state from unselected to selected.CompositeStripeSelection
Property Detail
countproperty
count:uint  [read-only]

Returns the number of selected items.


Implementation
    public function get count():uint
mixedSelectionAllowedproperty 
mixedSelectionAllowed:Boolean

Whether to allow mixed selections of graph elements and table elements.

The default value is true.


Implementation
    public function get mixedSelectionAllowed():Boolean
    public function set mixedSelectionAllowed(value:Boolean):void
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
selectedObjectsproperty 
selectedObjects:Iterable  [read-only]

Gets an iterable that enumerates all currently selected items.


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

Enumerates all currently selected ports.


Implementation
    public function get selectedPorts():Iterable
Constructor Detail
CompositeStripeSelection()Constructor
public function CompositeStripeSelection(graphSelection:IGraphSelection, stripeSelection:IStripeSelection)

Wraps two existing selection models.

Parameters
graphSelection:IGraphSelection — The original graph selection.
 
stripeSelection:IStripeSelection — The stripe selection.
Method Detail
clear()method
public function clear():void

Clears the selection.

dispose()method 
public function dispose():void

Clean up.

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
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.
iterator()method 
public function iterator():Iterator

Returns an iterator over a set of elements.

Returns
Iterator — an Iterator.
onItemDeselected()method 
protected function onItemDeselected(evt:SelectionEvent):void

Raises the SelectionEvent.DESELECT event.

Parameters

evt:SelectionEvent — The event which triggered this method.

onItemSelected()method 
protected function onItemSelected(evt:SelectionEvent):void

Raises the SelectionEvent.SELECT event.

Parameters

evt:SelectionEvent — The event which triggered this method.

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

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
deselect Event
Event Object Type: com.yworks.graph.model.SelectionEvent
SelectionEvent.type property = com.yworks.graph.model.SelectionEvent.DESELECT

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

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

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