| Package | org.un.flex.graphLayout.visual |
| Interface | public interface IVisualGraph extends mx.core.IUIComponent, mx.core.IInvalidating |
| Implementors | VisualGraph |
| Property | Defined by | ||
|---|---|---|---|
| center : Point [read-only]
Provide access to the center point of the VGraph's
drawing surface, used by layouters to properly center
their layout.
| IVisualGraph | ||
| currentRootVNode : IVisualNode
Set or get the current root node (or focused node).
| IVisualGraph | ||
| displayEdgeLabels : Boolean
Specify whether to display edge labels or not.
| IVisualGraph | ||
| edgeLabelRenderer : IFactory
Allow to provide an EdgeLabelRenderer in order to
display edge labels.
| IVisualGraph | ||
| edgeRenderer : IEdgeRenderer
Allow the provision of an EdgeRenderer to
allow drawing of edges in a customised way.
| IVisualGraph | ||
| graph : IGraph
Access to the underlying Graph datastructure object.
| IVisualGraph | ||
| itemRenderer : IFactory
Access to a parameter Object to preset various
settings for the drawing of Edges.
| IVisualGraph | ||
| layouter : ILayoutAlgorithm
Access to the layouter to be used for the
layout of the graph.
| IVisualGraph | ||
| maxVisibleDistance : int
Limit the currently visible nodes to those in a limited
distance (in terms of degrees of separation) from the current
root node.
| IVisualGraph | ||
| noVisibleVNodes : uint [read-only]
Returns the number of currently visible nodes.
| IVisualGraph | ||
| origin : Point [read-only]
Provide access to the current origin of the of the Visual Graph
which is required for proper drawing.
| IVisualGraph | ||
| scale : Number
The scale property of VGraph will affect
the scaleX and scaleY properties and also
will ensure drag&drop works properly.
| IVisualGraph | ||
| showHistory : Boolean
This property controls whether to show the history of
root nodes (or focused nodes) or not.
| IVisualGraph | ||
| visibilityLimitActive : Boolean
Specifies if any visibility limits should be active
or not.
| IVisualGraph | ||
| visibleEdges : Dictionary [read-only]
Provide access to a list of currently visible edges,
i.e.
| IVisualGraph | ||
| visibleVNodes : Dictionary [read-only]
Provide access to a list of currently visible VNodes.
| IVisualGraph | ||
| Method | Defined by | ||
|---|---|---|---|
|
calcNodesBoundingBox():Rectangle
Calculate and return the current bounding box of all visible nodes.
| IVisualGraph | ||
|
clearHistory():void
Clears the current history of root nodes.
| IVisualGraph | ||
|
createNode(sid:String = "", o:Object = null):IVisualNode
Create a new Node in this VisualGraph, this automatically
creates an underlying Node in the Graph object.
| IVisualGraph | ||
|
draw():void
Calling this forces a full calculation and redraw of the layout
including all edges.
| IVisualGraph | ||
|
initFromGraph():void
Initializes the VisualGraph from its currently set Graph object,
basically removing all existing VNodes and VEdges and
recreating them based on the information found in the associated
Graph object.
| IVisualGraph | ||
|
Links two nodes, thus creating an edge.
| IVisualGraph | ||
|
redrawEdges():void
This forces a redraw of all edges
| IVisualGraph | ||
|
refresh():void
| IVisualGraph | ||
|
removeNode(vn:IVisualNode):void
Removes a node from this VisualGraph.
| IVisualGraph | ||
|
scroll(sx:Number, sy:Number):void
Scrolls all objects according to the specified coordinates
(used as an offset).
| IVisualGraph | ||
|
Unlinks two nodes, thus removing the edge between them, if it
exists.
| IVisualGraph | ||
| center | property |
center:Point [read-only]Provide access to the center point of the VGraph's drawing surface, used by layouters to properly center their layout.
Implementation public function get center():Point
| currentRootVNode | property |
currentRootVNode:IVisualNode [read-write]Set or get the current root node (or focused node). Setting this property will result in a redraw of the graph to reflect the change (if it was actually a change).
Implementation public function get currentRootVNode():IVisualNode
public function set currentRootVNode(value:IVisualNode):void
| displayEdgeLabels | property |
displayEdgeLabels:Boolean [read-write]Specify whether to display edge labels or not. If no edge label renderer is present a default will be used.
Implementation public function get displayEdgeLabels():Boolean
public function set displayEdgeLabels(value:Boolean):void
| edgeLabelRenderer | property |
edgeLabelRenderer:IFactory [read-write]Allow to provide an EdgeLabelRenderer in order to display edge labels. The created instances must be UIComponents.
Implementation public function get edgeLabelRenderer():IFactory
public function set edgeLabelRenderer(value:IFactory):void
| edgeRenderer | property |
edgeRenderer:IEdgeRenderer [read-write]Allow the provision of an EdgeRenderer to allow drawing of edges in a customised way. The edgeRenderer has to implement the IEdgeRenderer interface.
Implementation public function get edgeRenderer():IEdgeRenderer
public function set edgeRenderer(value:IEdgeRenderer):void
| graph | property |
graph:IGraph [read-write]Access to the underlying Graph datastructure object.
Implementation public function get graph():IGraph
public function set graph(value:IGraph):void
| itemRenderer | property |
itemRenderer:IFactory [read-write]Access to a parameter Object to preset various settings for the drawing of Edges. The Object is a hash with the following properties: "alpha" "thickness" "color" "distcolor" which are to be used by an Edge Renderer
Implementation public function get itemRenderer():IFactory
public function set itemRenderer(value:IFactory):void
See also
| layouter | property |
layouter:ILayoutAlgorithm [read-write]Access to the layouter to be used for the layout of the graph.
Implementation public function get layouter():ILayoutAlgorithm
public function set layouter(value:ILayoutAlgorithm):void
| maxVisibleDistance | property |
maxVisibleDistance:int [read-write]Limit the currently visible nodes to those in a limited distance (in terms of degrees of separation) from the current root node. If showHistory is enabled, the previous root nodes will be shown regardless of this limit.
Implementation public function get maxVisibleDistance():int
public function set maxVisibleDistance(value:int):void
See also
| noVisibleVNodes | property |
noVisibleVNodes:uint [read-only]Returns the number of currently visible nodes.
Implementation public function get noVisibleVNodes():uint
| origin | property |
origin:Point [read-only]Provide access to the current origin of the of the Visual Graph which is required for proper drawing.
Implementation public function get origin():Point
| scale | property |
scale:Number [read-write]The scale property of VGraph will affect the scaleX and scaleY properties and also will ensure drag&drop works properly.
Implementation public function get scale():Number
public function set scale(value:Number):void
| showHistory | property |
showHistory:Boolean [read-write]This property controls whether to show the history of root nodes (or focused nodes) or not. If enabled, these previous root nodes will be shown even though they are are now more degrees of separation away from the current root node than the limit allows. Also any intermediate node from a previous root node to the current root node will be shown to have a complete link and not a disconnected graph.
Implementation public function get showHistory():Boolean
public function set showHistory(value:Boolean):void
See also
| visibilityLimitActive | property |
visibilityLimitActive:Boolean [read-write]Specifies if any visibility limits should be active or not. If not active, always all nodes are visible. If you have many nodes, this could have a severe impact on your performance so handle with care.
The default value is true.
public function get visibilityLimitActive():Boolean
public function set visibilityLimitActive(value:Boolean):void
| visibleEdges | property |
visibleEdges:Dictionary [read-only]Provide access to a list of currently visible edges, i.e. edges whose both nodes are visible and thus need to be drawn. Likewise this can save a lot of CPU if the layouter only needs to consider the currently visible edges.
Implementation public function get visibleEdges():Dictionary
| visibleVNodes | property |
visibleVNodes:Dictionary [read-only]Provide access to a list of currently visible VNodes. This is very important for layouters, if we have many many nodes, but only a few of them are visible at a time. Layouters typically will only layout the currently visible nodes.
Implementation public function get visibleVNodes():Dictionary
| calcNodesBoundingBox | () | method |
public function calcNodesBoundingBox():RectangleCalculate and return the current bounding box of all visible nodes. This is required by some layouters.
ReturnsRectangle — The bounding box rectangle of all visible nodes.
|
| clearHistory | () | method |
public function clearHistory():voidClears the current history of root nodes.
See also
| createNode | () | method |
public function createNode(sid:String = "", o:Object = null):IVisualNodeCreate a new Node in this VisualGraph, this automatically creates an underlying Node in the Graph object. It does not link the node to any other node, yet and it does not trigger a layout pass. The reason is that currently all layouters require a CONNECTED graph, since the new node would create a disconnected graph (since it is not linked, yet) this would break things.
Parameterssid:String (default = "") — The string id of the new node.
|
|
o:Object (default = null) — The data object of this new node.
|
IVisualNode —
The created VisualNode object.
|
| draw | () | method |
public function draw():voidCalling this forces a full calculation and redraw of the layout including all edges.
| initFromGraph | () | method |
public function initFromGraph():voidInitializes the VisualGraph from its currently set Graph object, basically removing all existing VNodes and VEdges and recreating them based on the information found in the associated Graph object.
| linkNodes | () | method |
public function linkNodes(v1:IVisualNode, v2:IVisualNode):IVisualEdgeLinks two nodes, thus creating an edge. If the underlying Graph is directional, the order matters, not otherwise. If the nodes are already linked, simply returns the existing edge between them.
Parametersv1:IVisualNode — The first node (from node) to link.
|
|
v2:IVisualNode — The second node (to node) to link.
|
IVisualEdge —
The created VisualEdge.
|
| redrawEdges | () | method |
public function redrawEdges():voidThis forces a redraw of all edges
| refresh | () | method |
public function refresh():void
| removeNode | () | method |
public function removeNode(vn:IVisualNode):voidRemoves a node from this VisualGraph. This removes any associated VEdges and Edges with the node and of course the underlying Node from the Graph datastructure.
Parametersvn:IVisualNode — The VisualNode to be removed.
|
| scroll | () | method |
public function scroll(sx:Number, sy:Number):voidScrolls all objects according to the specified coordinates (used as an offset).
Parameterssx:Number |
|
sy:Number |
| unlinkNodes | () | method |
public function unlinkNodes(v1:IVisualNode, v2:IVisualNode):voidUnlinks two nodes, thus removing the edge between them, if it exists. Does nothing if the nodes were not linked. Again, order matters of the graph is directional.
Parametersv1:IVisualNode — The first node to unlink.
|
|
v2:IVisualNode — The second node to unlink.
|