Packagecom.somerandomdude.coordy.layouts.twodee
Classpublic class Scatter
InheritanceScatter Inheritance Layout2d Inheritance Layout Inheritance flash.events.EventDispatcher
ImplementsILayout2d



Public Properties
 PropertyDefined by
 Inheritedheight : 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
 InheritedjitterX : Number
Mutator/accessor for the jitterX property.
Layout2d
 InheritedjitterY : Number
Mutator/accessor for the jitterY property.
Layout2d
 Inheritednodes : Array
Returns an array of node objects
Layout
 InheritedproxyUpdater : 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
 Inheritedrotation : Number
Mutator/accessor for rotation property
Layout2d
 Inheritedsize : int
Returns the number of nodes currently stored and managed
Layout
 InheritedupdateMethod : String
Specifies whether layout properties (x, y, width, height, etc.) adjust the layout automatically without calling apply() method.
Layout2d
 Inheritedwidth : Number
Mutator/accessor for layout width property
Layout2d
 Inheritedx : Number
Mutator/accessor for layout x property
Layout2d
 Inheritedy : Number
Mutator/accessor for layout y property
Layout2d
Protected Properties
 PropertyDefined by
 Inherited_height : Number
Layout2d
 Inherited_jitterX : Number
Layout2d
 Inherited_jitterY : Number
Layout2d
 Inherited_nodes : Array
Layout
 Inherited_proxyUpdater : IProxyUpdater
Layout2d
 Inherited_rotation : Number = 0
Layout2d
 Inherited_size : int
Layout
 Inherited_updateFunction : Function
Layout2d
 Inherited_updateMethod : String = "updateAndRender"
Layout2d
 Inherited_width : Number
Layout2d
 Inherited_x : Number
Layout2d
 Inherited_y : Number
Layout2d
Public Methods
 MethodDefined 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
 Inherited
addLinkAt(object:Object, index:uint):void
Adds a link between the specified display object to the node object at the specified index
Layout
  
addNode(object:Object = null, moveToCoordinates:Boolean = true):INode
Adds object to layout in next available position.
Scatter
 Inherited
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
 Inherited
Performs the update method defined by the updateMethod property.
Layout2d
 Inherited
getNodeAt(index:uint):INode
Returns node object at specified index of collection
Layout
 Inherited
getNodeByLink(link:Object):INode
Returns node object by specified display object
Layout
 Inherited
getNodeIndex(node:INode):uint
Returns specified node object's index in the collection
Layout
 Inherited
linkExists(link:Object):Boolean
Returns true if a link (DisplayObject owned by a layout's node) exists in the layout
Layout
 Inherited
Removes all nodes from the layout
Layout
 Inherited
removeLinkAt(index:uint):void
Removed the link between the node and display object at the specified index
Layout
 Inherited
removeLinks():void
Removes all links between nodes and display objects
Layout
 Inherited
removeNode(node:INode):void
Removes specified cell and its link from layout organizer and adjusts layout appropriately
Layout2d
 Inherited
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
 Inherited
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
 Inherited
swapNodeLinks(nodeTo:INode, nodeFrom:INode):void
Swaps links of two node objects
Layout
 Inherited
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
 Inherited
toXML():XML
Generates XML for the layout's properties.
Layout
  
update():void
Updates the nodes' virtual coordinates.
Scatter
 Inherited
Performs an update on all the nodes' positions and renders each node's corresponding link
Layout2d
Protected Methods
 MethodDefined by
 Inherited
clearNodes():void
Layout
 Inherited
Layout
 Inherited
storeNode(node:INode):int
Layout
 Inherited
storeNodeAt(node:INode, index:int):int
Layout
 Inherited
validateObject(object:Object):Boolean
Determines if an object added to the layout contains the properties/methods required from the layout.
Layout2d
Property detail
jitterproperty
jitter:Number  [read-write]

Mutator/accessor for jitter property

Implementation
    public function get jitter():Number
    public function set jitter(value:Number):void
jitterRotationproperty 
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
Constructor detail
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.

Parameters
width: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
Method detail
addNode()method
public override function addNode(object:Object = null, moveToCoordinates:Boolean = true):INode

Adds object to layout in next available position.

Parameters
object:Object (default = null) — object Object to add to layout
 
moveToCoordinates:Boolean (default = true) — moveToCoordinates automatically move DisplayObject to corresponding nodes's coordinates

Returns
INode — newly created node object containing a link to the object
addToLayout()method 
public override function addToLayout(object:Object, moveToCoordinates:Boolean = true):INode

Adds object to layout in next available position This method is depreceated.

Parameters
object:Object — object Object to add to layout
 
moveToCoordinates:Boolean (default = true) — moveToCoordinates automatically move DisplayObject to corresponding node's coordinates

Returns
INode — newly created node object containing a link to the object
clone()method 
public override function clone():ILayout2d

Clones the current object's properties (does not include links to DisplayObjects)

Returns
ILayout2d — Scatter clone of object
render()method 
public override function render():void

Applies all layout property values to all cells/display objects in the collection

scatter()method 
public function scatter():void

Re-scatters layout and adjusts cell links appropriately

toString()method 
public override function toString():String

Returns the type of layout in a string format

Returns
String — Layout's type

See also

com.somerandomdude.coordy.layouts.LayoutType
update()method 
public override function update():void

Updates the nodes' virtual coordinates. Note - this method does not update the actual objects linked to the layout.