| Package | com.yworks.graph.model |
| Class | public class GraphSelection |
| Inheritance | GraphSelection flash.events.EventDispatcher |
| Implements | IGraphSelection |
IGraphSelection interface,
which manages the selection state of items in an IGraph
instance.
See also
| Property | Defined By | ||
|---|---|---|---|
| count : uint [read-only]
The number of all selected items. | GraphSelection | ||
| graph : IGraph
Gets or sets the IGraph this instance
is using as the domain for the selection. | GraphSelection | ||
| selectedBends : Iterable [read-only]
Enumerates all currently selected bends. | GraphSelection | ||
| selectedEdges : Iterable [read-only]
Enumerates all currently selected edges. | GraphSelection | ||
| selectedLabels : Iterable [read-only]
Enumerates all currently selected labels. | GraphSelection | ||
| selectedNodes : Iterable [read-only]
Enumerates all currently selected nodes. | GraphSelection | ||
| selectedObjects : Iterable [read-only]
Gets an Iterable of all selected Objects. | GraphSelection | ||
| selectedPorts : Iterable [read-only]
Enumerates all currently selected ports. | GraphSelection | ||
| Method | Defined By | ||
|---|---|---|---|
GraphSelection(graph:IGraph = null)
Instanciates an instance using the the graph as the model. | GraphSelection | ||
clear():void
Deselect all. | GraphSelection | ||
isBendSelected(bend:IBend):Boolean
Queries the selection state for the given bend. | GraphSelection | ||
isEdgeSelected(edge:IEdge):Boolean
Queries the selection state for the given edge. | GraphSelection | ||
isLabelSelected(label:ILabel):Boolean
Queries the selection state for the given label. | GraphSelection | ||
isNodeSelected(node:INode):Boolean
Queries the selection state for the given node. | GraphSelection | ||
isPortSelected(port:IPort):Boolean
Queries the selection state for the given port. | GraphSelection | ||
isSelected(item:IModelItem):Boolean
Queries the selection state for the given item. | GraphSelection | ||
Returns an Iterator over all selected items. | GraphSelection | ||
setBendSelected(bend:IBend, selected:Boolean):void
Sets the selected state for the given bend. | GraphSelection | ||
setEdgeSelected(edge:IEdge, selected:Boolean):void
Sets the selected state for the given edge. | GraphSelection | ||
setLabelSelected(label:ILabel, selected:Boolean):void
Sets the selected state for the given label. | GraphSelection | ||
setNodeSelected(node:INode, selected:Boolean):void
Sets the selected state for the given node. | GraphSelection | ||
setPortSelected(port:IPort, selected:Boolean):void
Sets the selected state for the given port. | GraphSelection | ||
setSelected(item:IModelItem, selected:Boolean):void
Sets the selected state for the given item. | GraphSelection | ||
| Method | Defined By | ||
|---|---|---|---|
Factory method that creates the DefaultSelectionModel to use for the bends. | GraphSelection | ||
Factory method that creates the DefaultSelectionModel to use for the edges. | GraphSelection | ||
Factory method that creates the DefaultSelectionModel to use for the labels. | GraphSelection | ||
Factory method that creates the DefaultSelectionModel to use for the nodes. | GraphSelection | ||
Factory method that creates the DefaultSelectionModel to use for the ports. | GraphSelection | ||
| count | property |
count:uint [read-only] The number of all selected items.
public function get count():uint| graph | property |
graph:IGraph
Gets or sets the IGraph this instance
is using as the domain for the selection.
public function get graph():IGraph public function set graph(value:IGraph):void| selectedBends | property |
selectedBends:Iterable [read-only] Enumerates all currently selected bends.
public function get selectedBends():Iterable| selectedEdges | property |
selectedEdges:Iterable [read-only] Enumerates all currently selected edges.
public function get selectedEdges():Iterable| selectedLabels | property |
selectedLabels:Iterable [read-only] Enumerates all currently selected labels.
public function get selectedLabels():Iterable| selectedNodes | property |
selectedNodes:Iterable [read-only] Enumerates all currently selected nodes.
public function get selectedNodes():Iterable| selectedObjects | property |
selectedObjects:Iterable [read-only]
Gets an Iterable of all selected Objects.
public function get selectedObjects():Iterable| selectedPorts | property |
selectedPorts:Iterable [read-only] Enumerates all currently selected ports.
public function get selectedPorts():Iterable| GraphSelection | () | Constructor |
public function GraphSelection(graph:IGraph = null)Instanciates an instance using the the graph as the model.
Parametersgraph:IGraph (default = null) — the graph instance to sync with. The graph property
can also be set later.
|
| clear | () | method |
public function clear():voidDeselect all. Removes all items from the list of selected items.
| createBendSelectionModel | () | method |
protected function createBendSelectionModel():DefaultSelectionModel
Factory method that creates the DefaultSelectionModel to use for the bends.
DefaultSelectionModel |
| createEdgeSelectionModel | () | method |
protected function createEdgeSelectionModel():DefaultSelectionModel
Factory method that creates the DefaultSelectionModel to use for the edges.
DefaultSelectionModel |
| createLabelSelectionModel | () | method |
protected function createLabelSelectionModel():DefaultSelectionModel
Factory method that creates the DefaultSelectionModel to use for the labels.
DefaultSelectionModel |
| createNodeSelectionModel | () | method |
protected function createNodeSelectionModel():DefaultSelectionModel
Factory method that creates the DefaultSelectionModel to use for the nodes.
DefaultSelectionModel |
| createPortSelectionModel | () | method |
protected function createPortSelectionModel():DefaultSelectionModel
Factory method that creates the DefaultSelectionModel to use for the ports.
DefaultSelectionModel |
| isBendSelected | () | method |
public function isBendSelected(bend:IBend):BooleanQueries the selection state for the given bend.
Parameters
bend:IBend — the bend to query the state for
|
Boolean — whether the bend is currently selected
|
| isEdgeSelected | () | method |
public function isEdgeSelected(edge:IEdge):BooleanQueries the selection state for the given edge.
Parameters
edge:IEdge — the edge to query the state for
|
Boolean — whether the edge is currently selected
|
| isLabelSelected | () | method |
public function isLabelSelected(label:ILabel):BooleanQueries the selection state for the given label.
Parameters
label:ILabel — the label to query the state for
|
Boolean — whether the label is currently selected
|
| isNodeSelected | () | method |
public function isNodeSelected(node:INode):BooleanQueries the selection state for the given node.
Parameters
node:INode — the node to query the state for
|
Boolean — whether the node is currently selected
|
| isPortSelected | () | method |
public function isPortSelected(port:IPort):BooleanQueries the selection state for the given port.
Parameters
port:IPort — the port to query the state for
|
Boolean — whether the port is currently selected
|
| isSelected | () | method |
public function isSelected(item:IModelItem):BooleanQueries the selection state for the given item.
Parameters
item:IModelItem — the item to query the state for
|
Boolean — whether the item is currently selected
|
| iterator | () | method |
public function iterator():Iterator
Returns an Iterator over all selected items.
Iterator — An Iterator over all selected items.
|
| setBendSelected | () | method |
public function setBendSelected(bend:IBend, selected:Boolean):voidSets 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):voidSets 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):voidSets 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):voidSets 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):voidSets 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):voidSets the selected state for the given item.
Parameters
item:IModelItem — the item to set the selection state for
| |
selected:Boolean — the new selection state
|