| Package | com.somerandomdude.coordy.layouts.twodee |
| Class | public class Scatter |
| Inheritance | Scatter Layout2d Layout flash.events.EventDispatcher |
| Implements | ILayout2d |
| Property | Defined by | ||
|---|---|---|---|
![]() | height : Number
Mutator/accessor for layout height property
| Layout2d | |
| jitter : Number
Mutator/accessor for jitter property
| Scatter | ||
| jitterRotation : Boolean
Mutator/accessor for property determining whether the layout's nodes' rotation is randomly jittered
| Scatter | ||
![]() | jitterX : Number
Mutator/accessor for the jitterX property.
| Layout2d | |
![]() | jitterY : Number
Mutator/accessor for the jitterY property.
| Layout2d | |
![]() | nodes : Array
Returns an array of node objects
| Layout | |
![]() | proxyUpdater : IProxyUpdater
Sets a proxy update method for altering layouts as opposed to internal update methods
such as update(), render() or updateAndRender()
This allows more customization for the updating sequence.
| Layout2d | |
![]() | rotation : Number
Mutator/accessor for rotation property
| Layout2d | |
![]() | size : int
Returns the number of nodes currently stored and managed
| Layout | |
![]() | updateMethod : String
Specifies whether layout properties (x, y, width, height, etc.) adjust the layout
automatically without calling apply() method.
| Layout2d | |
![]() | width : Number
Mutator/accessor for layout width property
| Layout2d | |
![]() | x : Number
Mutator/accessor for layout x property
| Layout2d | |
![]() | y : Number
Mutator/accessor for layout y property
| Layout2d | |
| Method | Defined by | ||
|---|---|---|---|
|
Scatter(width:Number, height:Number, x:Number = 0, y:Number = 0, jitter:Number = 1, jitterRotation:Boolean = false)
Distributes nodes in a scattered fashion.
| Scatter | ||
![]() |
addLinkAt(object:Object, index:uint):void
Adds a link between the specified display object to the node object at the specified index
| Layout | |
|
Adds object to layout in next available position.
| Scatter | ||
![]() |
addNodes(count:int):void
Adds a specified number of empty nodes to the layout
| Layout | |
|
addToLayout(object:Object, moveToCoordinates:Boolean = true):INode
Adds object to layout in next available position This method is depreceated.
| Scatter | ||
|
Clones the current object's properties (does not include links to DisplayObjects)
| Scatter | ||
![]() |
executeUpdateMethod():void
Performs the update method defined by the updateMethod property.
| Layout2d | |
![]() |
Returns node object at specified index of collection
| Layout | |
![]() |
getNodeByLink(link:Object):INode
Returns node object by specified display object
| Layout | |
![]() |
getNodeIndex(node:INode):uint
Returns specified node object's index in the collection
| Layout | |
![]() |
linkExists(link:Object):Boolean
Returns true if a link (DisplayObject owned by a layout's node) exists in the layout
| Layout | |
![]() |
removeAllNodes():void
Removes all nodes from the layout
| Layout | |
![]() |
removeLinkAt(index:uint):void
Removed the link between the node and display object at the specified index
| Layout | |
![]() |
removeLinks():void
Removes all links between nodes and display objects
| Layout | |
![]() |
removeNode(node:INode):void
Removes specified cell and its link from layout organizer and adjusts layout appropriately
| Layout2d | |
![]() |
removeNodeByLink(link:Object):void
Removes the node that is linked to the specified object
| Layout | |
|
render():void
Applies all layout property values to all cells/display objects in the collection
| Scatter | ||
![]() |
renderNode(node:INode2d):void
Renders all layout property values of a specified node
| Layout2d | |
|
scatter():void
Re-scatters layout and adjusts cell links appropriately
| Scatter | ||
![]() |
Swaps links of two node objects
| Layout | |
![]() |
toJSON():String
Serializes the layout data of each node as a JSON string.
| Layout | |
|
toString():String
Returns the type of layout in a string format
| Scatter | ||
![]() |
toXML():XML
Generates XML for the layout's properties.
| Layout | |
|
update():void
Updates the nodes' virtual coordinates.
| Scatter | ||
![]() |
updateAndRender():void
Performs an update on all the nodes' positions and renders each node's corresponding link
| Layout2d | |
| jitter | property |
jitter:Number [read-write]Mutator/accessor for jitter property
Implementation public function get jitter():Number
public function set jitter(value:Number):void
| jitterRotation | property |
jitterRotation:Boolean [read-write]Mutator/accessor for property determining whether the layout's nodes' rotation is randomly jittered
Implementation public function get jitterRotation():Boolean
public function set jitterRotation(value:Boolean):void
| Scatter | () | constructor |
public function Scatter(width:Number, height:Number, x:Number = 0, y:Number = 0, jitter:Number = 1, jitterRotation:Boolean = false)Distributes nodes in a scattered fashion.
Parameterswidth:Number — Width of the scatter
|
|
height:Number — Height of the scatter
|
|
x:Number (default = 0) — Jitter multiplier of scatter
|
|
y:Number (default = 0) — x position of the scatter
|
|
jitter:Number (default = 1) — y position of the scatter
|
|
jitterRotation:Boolean (default = false) — Boolean determining if nodes are randomly rotated
|
| addNode | () | method |
public override function addNode(object:Object = null, moveToCoordinates:Boolean = true):INodeAdds object to layout in next available position.
Parametersobject:Object (default = null) — object Object to add to layout
|
|
moveToCoordinates:Boolean (default = true) — moveToCoordinates automatically move DisplayObject to corresponding nodes's coordinates
|
INode —
newly created node object containing a link to the object
|
| addToLayout | () | method |
public override function addToLayout(object:Object, moveToCoordinates:Boolean = true):INodeAdds object to layout in next available position This method is depreceated.
Parametersobject:Object — object Object to add to layout
|
|
moveToCoordinates:Boolean (default = true) — moveToCoordinates automatically move DisplayObject to corresponding node's coordinates
|
INode —
newly created node object containing a link to the object
|
| clone | () | method |
public override function clone():ILayout2dClones the current object's properties (does not include links to DisplayObjects)
ReturnsILayout2d —
Scatter clone of object
|
| render | () | method |
public override function render():voidApplies all layout property values to all cells/display objects in the collection
| scatter | () | method |
public function scatter():voidRe-scatters layout and adjusts cell links appropriately
| toString | () | method |
public override function toString():StringReturns the type of layout in a string format
ReturnsString — Layout's type
|
See also
| update | () | method |
public override function update():voidUpdates the nodes' virtual coordinates. Note - this method does not update the actual objects linked to the layout.