Package | twaver.network.layout |
Class | public class CloudLayouter |
Inheritance | CloudLayouter ![]() |
See the left-bottom corner demo pictures in TWaver Flex online demo to know more about cloud layout.
Property | Defined By | ||
---|---|---|---|
active : Boolean
Check whether layouter now is active. | CloudLayouter | ||
ceaseLimit : Number
Get cease limit. | CloudLayouter | ||
ceaseRate : Number
Get cease rate of this layout. | CloudLayouter | ||
count : int [read-only]
Get total node counts. | CloudLayouter | ||
elliptical : Boolean
Whether layout shape is elliptical. | CloudLayouter | ||
layoutRect : Rectangle [read-only]
Get the layouted area. | CloudLayouter | ||
mouseMoveFunction : Function
Get the function that will be called when mouse is moved. | CloudLayouter | ||
mouseOverFunction : Function
Get the function that will be called when mouse is moved over
network canvas. | CloudLayouter | ||
moveSpeed : Number
Get the node movement speed. | CloudLayouter | ||
network : Network [read-only]
Get connected network component. | CloudLayouter | ||
percentPadding : Number
Get padding percent. | CloudLayouter | ||
reloadOnDataBoxChanged : Boolean
Whether need to reload data when network data box has been changed. | CloudLayouter | ||
running : Boolean [read-only]
Check whether this layouter is running now. | CloudLayouter | ||
timer : Timer [read-only]
Get the timer of this layouter. | CloudLayouter | ||
timerDelay : Number
Get the delay value of internal timer. | CloudLayouter | ||
updateLayoutRectOnResized : Boolean
Update the layout of related rectangle area if element is resized. | CloudLayouter | ||
updateNodeFunction : Function
Get the function used to update node. | CloudLayouter |
Method | Defined By | ||
---|---|---|---|
CloudLayouter(network:Network)
Cloud layout constructor. | CloudLayouter | ||
centerNode(node:Node):void
Centralize specified node to the center location of the cloud. | CloudLayouter | ||
isLayoutable(node:Node):Boolean
Check whether specified node element is layoutable. | CloudLayouter | ||
reload():void
Reload all layout data. | CloudLayouter | ||
start(needToReset:Boolean = true):void
Call this to start the layouter. | CloudLayouter | ||
stop(removeListeners:Boolean = true):void
Call this to stop layout. | CloudLayouter | ||
updateLayoutRect(needToReload:Boolean = false):void
update the layout for the layout rectangle. | CloudLayouter |
Method | Defined By | ||
---|---|---|---|
createControlPoint(node:Node):Point
Calculate the control point for specified node. | CloudLayouter | ||
This method to handle data box change event. | CloudLayouter | ||
handleMouseMove(e:MouseEvent):void
This method to handle mouse move event. | CloudLayouter | ||
handleMouseOver(e:MouseEvent):void
This method to handle mouse over event. | CloudLayouter | ||
handleNetworkPropertyChange(e:PropertyChangeEvent):void
This method handle network property change event. | CloudLayouter | ||
handleResize(e:ResizeEvent):void
Handle element resize event. | CloudLayouter | ||
handleRollOut(e:MouseEvent):void
Handle mouse roll out event. | CloudLayouter | ||
This method to handle the data selection change. | CloudLayouter | ||
isAtCenter(node:Node, perspective:Number, cx:Number, cy:Number, cz:Number):Boolean
Whether specified node is at center location of the cloud. | CloudLayouter | ||
updateNode(node:Node, zIndex:int, count:int, alpha:Number):void
Update a node by calling updateNodeFunction function. | CloudLayouter |
active | property |
active:Boolean
Check whether layouter now is active.
public function get active():Boolean
public function set active(value:Boolean):void
ceaseLimit | property |
ceaseLimit:Number
Get cease limit. Default value is 0.01.
public function get ceaseLimit():Number
public function set ceaseLimit(value:Number):void
ceaseRate | property |
ceaseRate:Number
Get cease rate of this layout. Default value is 0.9.
public function get ceaseRate():Number
public function set ceaseRate(value:Number):void
count | property |
count:int
[read-only] Get total node counts.
public function get count():int
elliptical | property |
elliptical:Boolean
Whether layout shape is elliptical. Default value is true.
public function get elliptical():Boolean
public function set elliptical(value:Boolean):void
layoutRect | property |
layoutRect:Rectangle
[read-only] Get the layouted area.
public function get layoutRect():Rectangle
mouseMoveFunction | property |
mouseMoveFunction:Function
Get the function that will be called when mouse is moved.
public function get mouseMoveFunction():Function
public function set mouseMoveFunction(value:Function):void
mouseOverFunction | property |
mouseOverFunction:Function
Get the function that will be called when mouse is moved over network canvas.
public function get mouseOverFunction():Function
public function set mouseOverFunction(value:Function):void
moveSpeed | property |
moveSpeed:Number
Get the node movement speed. Default value is 2.
public function get moveSpeed():Number
public function set moveSpeed(value:Number):void
network | property |
network:Network
[read-only] Get connected network component.
public function get network():Network
percentPadding | property |
percentPadding:Number
Get padding percent. Default value is 0.25.
public function get percentPadding():Number
public function set percentPadding(value:Number):void
reloadOnDataBoxChanged | property |
reloadOnDataBoxChanged:Boolean
Whether need to reload data when network data box has been changed. Default value is true.
public function get reloadOnDataBoxChanged():Boolean
public function set reloadOnDataBoxChanged(value:Boolean):void
running | property |
running:Boolean
[read-only] Check whether this layouter is running now.
public function get running():Boolean
timer | property |
timer:Timer
[read-only] Get the timer of this layouter.
public function get timer():Timer
timerDelay | property |
timerDelay:Number
Get the delay value of internal timer. Default value is 50.
public function get timerDelay():Number
public function set timerDelay(value:Number):void
updateLayoutRectOnResized | property |
updateLayoutRectOnResized:Boolean
Update the layout of related rectangle area if element is resized. Default value is true.
public function get updateLayoutRectOnResized():Boolean
public function set updateLayoutRectOnResized(value:Boolean):void
updateNodeFunction | property |
updateNodeFunction:Function
Get the function used to update node. It will be called when node is layouted and moved.
public function get updateNodeFunction():Function
public function set updateNodeFunction(value:Function):void
CloudLayouter | () | Constructor |
public function CloudLayouter(network:Network)
Cloud layout constructor. Layout elements on specified network in cloud effect.
Parametersnetwork:Network — the network component to be layout.
|
centerNode | () | method |
public function centerNode(node:Node):void
Centralize specified node to the center location of the cloud.
Parameters
node:Node — the node to be centralized.
|
createControlPoint | () | method |
protected function createControlPoint(node:Node):Point
Calculate the control point for specified node.
Parameters
node:Node — a node element
|
Point — the control point for specified node.
|
handleDataBoxChange | () | method |
protected function handleDataBoxChange(e:DataBoxChangeEvent):void
This method to handle data box change event.
Parameters
e:DataBoxChangeEvent — the data box change event.
|
handleMouseMove | () | method |
protected function handleMouseMove(e:MouseEvent):void
This method to handle mouse move event.
Parameters
e:MouseEvent — mouse move event.
|
handleMouseOver | () | method |
protected function handleMouseOver(e:MouseEvent):void
This method to handle mouse over event.
Parameters
e:MouseEvent — the mouse over event.
|
handleNetworkPropertyChange | () | method |
protected function handleNetworkPropertyChange(e:PropertyChangeEvent):void
This method handle network property change event.
Parameters
e:PropertyChangeEvent — network property change event.
|
handleResize | () | method |
protected function handleResize(e:ResizeEvent):void
Handle element resize event.
Parameters
e:ResizeEvent — element resize event.
|
handleRollOut | () | method |
protected function handleRollOut(e:MouseEvent):void
Handle mouse roll out event.
Parameters
e:MouseEvent — mouse roll out event
|
handleSelectionChange | () | method |
protected function handleSelectionChange(e:SelectionChangeEvent):void
This method to handle the data selection change.
Parameters
e:SelectionChangeEvent — data selection change event.
|
isAtCenter | () | method |
protected function isAtCenter(node:Node, perspective:Number, cx:Number, cy:Number, cz:Number):Boolean
Whether specified node is at center location of the cloud.
Parameters
node:Node — a node to be checked.
| |
perspective:Number — the perspective to be used.
| |
cx:Number — number in x axis.
| |
cy:Number — number in y axis.
| |
cz:Number — number in z axis.
|
Boolean — true if specified node is at center location of the cloud,
false otherwise.
|
isLayoutable | () | method |
public function isLayoutable(node:Node):Boolean
Check whether specified node element is layoutable. A layoutable node will be layouted by this layouter. The non-layoutable node will fixed and not moved.
Parameters
node:Node — a node to be check.
|
Boolean — true if layoutable, false otherwise.
|
reload | () | method |
public function reload():void
Reload all layout data.
start | () | method |
public function start(needToReset:Boolean = true):void
Call this to start the layouter.
Parameters
needToReset:Boolean (default = true ) — whether need to reset layout before start.
True if need to reset, false otherwise. Default value is true.
|
stop | () | method |
public function stop(removeListeners:Boolean = true):void
Call this to stop layout.
Parameters
removeListeners:Boolean (default = true ) — whether need to remove all
installed listeners after layouter is stop.
True if need to remove listeners, false otherwise.
Default value is true.
|
updateLayoutRect | () | method |
public function updateLayoutRect(needToReload:Boolean = false):void
update the layout for the layout rectangle.
Parameters
needToReload:Boolean (default = false ) — whether need to reload data. True
if need to reload, false otherwise. Default value is false.
|
updateNode | () | method |
protected function updateNode(node:Node, zIndex:int, count:int, alpha:Number):void
Update a node by calling updateNodeFunction
function.
Parameters
node:Node — the node to be layout
| |
zIndex:int — index in z order.
| |
count:int — node total count.
| |
alpha:Number — alpha transparency.
|