Class Index | File Index

Classes


Class lime.Node


Defined in: node.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Node.
Field Summary
Field Attributes Field Name and Description
<private>  
<private>  
Hash of active event handlers
 
Node has been added to DOM tree
 
Supported renderers for Node
 
type {Object.
 
type {Object.
Method Summary
Method Attributes Method Name and Description
 
 
addEventListener(type, handler, opt_capture, opt_handlerScope)
 
addTransition(property, value, duration, ease)
Register transition property.
 
appendChild(child, opt_pos)
Append element to the end of childrens array
 
Calculates relative quality change from the parent objects quality
 
clearTransition(property)
Clear previously set transition
<static>  
lime.Node.compareNode(n1, n2)
Compare two node positions in the tree
 
Create DOM element to render the node
 
Returns anchor point for the element.
 
Returns autoresize rules bitmask.
 
getBoundingBox(opt_frame)
Returns bounding box for element in parents coordinate space.
 
getChildAt(index)
Return the child at defined index.
 
Return the index position of a child.
 
Return deepest element in DOM tree that is used for drawing the Node.
 
Return deepest parent node that requires DOM element for drawing on screen.
 
Return the Director instance related to the node.
 
Return a bitmask of dirty values that need to be updated before next drawing The bitmask parts are values of lime.Dirty enum
 
Returns bounding box for element is elements own coordinate space
 
Returns true if element currently not visible
 
Returns element used as a mask for current element
 
Return number of childnodes current element has.
 
Returns the opacity value of the Node.
 
Return the parent object.
<private>  
Return array of parent nodes until scene object
 
Returns element's position coordinate
<static>  
lime.Node.getPropertyForTransition(transition)
Return CSS property name for transition constant
 
Returns elements quality value.
 
Return cumulative quality value relative to screen full quality.
 
Returns rotation angle for element in degrees
 
Returns scale vector for the element.
 
Returns the Scene instance related to the node.
 
Returns elements dimension
 
Checks if event should fire on element based on the position.
 
localToNode(coord, node)
Convert coordinate in node space to other nodes coordinate space
 
Convert coordinate from current node space to parent node space
 
Convert coordinate in node space to screen coordinate
 
Return box containing current element and all its children
 
Does node require DOM element for drawing?
 
Covert coordinate form parent node space to current node space
 
 
Removes all children of a node.
 
removeChild(child)
Remove element from the childrens array
 
Remove element at a given index from the childrens array
 
 
Remove DOM element connected to teh node
 
removeEventListener(type, handler, opt_capture, opt_handlerScope)
 
runAction(action)
Add Node to action targets list and start the animation
 
Convert screen coordinate to node coordinate space
 
setAnchorPoint(value, opt_y)
Sets elements anchor point to new value.
 
Sets new autoresixe rules.
 
setChildIndex(child, index)
Move a child to another index in the childrens array.
 
setDirty(value, opt_pass, opt_nextframe)
Sets a dirty value true.
 
setHidden(value)
Sets if element is visible or not
 
setMask(value)
Sets element as a mask for current element
 
setOpacity(value)
Sets the opacity value of the Node object
 
setPosition(value, opt_y)
Sets new position for element.
 
setQuality(value)
Sets quality value used while drawing.
 
setRenderer(value)
Set renderer for the node.
 
setRotation(value)
Rotates element to specific angle in degrees
 
setScale(value, opt_y)
Sets new scale vector for element.
 
setSize(value, opt_height)
Sets dimensions for element.
 
 
update(opt_pass)
Update modified dirty parameters to visible elements properties
 
Update DOM element connected to the node
 
Update node's layout (tree relations)
 
Handle adding Node to the DOM tree
 
Handle removing Node from DOM tree
Class Detail
lime.Node()
Node. Abstract drawable object in lime.
Field Detail
<private> customEvent_

<private> eventHandlers_
Hash of active event handlers

inTree_
Node has been added to DOM tree

supportedRenderers
Supported renderers for Node

transitionsAdd_
type {Object.}

transitionsClear_
type {Object.}
Method Detail
addDependency(other)
Parameters:
other

addEventListener(type, handler, opt_capture, opt_handlerScope)
Parameters:
type
handler
opt_capture
opt_handlerScope

addTransition(property, value, duration, ease)
Register transition property. Use through animations.
Parameters:
{number} property
Transition property constant.
{*} value
New value.
{number} duration
Transition duration.
{Array.<*>} ease
Easing function.

{lime.Node} appendChild(child, opt_pos)
Append element to the end of childrens array
Parameters:
{lime.Node|Element|Node} child
Child node.
{number=} opt_pos
Position of new child.
Returns:
{lime.Node} obejct itself.

calcRelativeQuality()
Calculates relative quality change from the parent objects quality

clearTransition(property)
Clear previously set transition
Parameters:
{number} property
Transition property.

<static> {number} lime.Node.compareNode(n1, n2)
Compare two node positions in the tree
Parameters:
{lime.Node} n1
First node.
{lime.Node} n2
Second node.
Returns:
{number} Comparison result.

createDomElement()
Create DOM element to render the node

{goog.math.Vec2} getAnchorPoint()
Returns anchor point for the element.
Returns:
{goog.math.Vec2} Anchorpoint vector.

{number} getAutoResize()
Returns autoresize rules bitmask.
Returns:
{number} Autoresize bitmask.

{goog.math.Box} getBoundingBox(opt_frame)
Returns bounding box for element in parents coordinate space.
Parameters:
{goog.math.Box} opt_frame
Optional frame box for element.
Returns:
{goog.math.Box} Bounding box.

{lime.Node|Element|null} getChildAt(index)
Return the child at defined index.
Parameters:
{number} index
Child index.
Returns:
{lime.Node|Element|null} Child element.

{number} getChildIndex(child)
Return the index position of a child.
Parameters:
{lime.Node|Element} child
Child to search.
Returns:
{number} Index number.

{Element} getDeepestDomElement()
Return deepest element in DOM tree that is used for drawing the Node.
Returns:
{Element} Deepest DOM element.

{lime.Node} getDeepestParentWithDom()
Return deepest parent node that requires DOM element for drawing on screen.
Returns:
{lime.Node} Deepest parent.

{lime.Director} getDirector()
Return the Director instance related to the node. Returns null if no director connection.
Returns:
{lime.Director} Current director.

{number} getDirty()
Return a bitmask of dirty values that need to be updated before next drawing The bitmask parts are values of lime.Dirty enum
Returns:
{number} Dirty propertiest bitmask.

{goog.math.Box} getFrame()
Returns bounding box for element is elements own coordinate space
Returns:
{goog.math.Box} Contents frame in node space.

{boolean} getHidden()
Returns true if element currently not visible
Returns:
{boolean} True if node is hidden.

{lime.Node} getMask()
Returns element used as a mask for current element
Returns:
{lime.Node} Mask node.

{number} getNumberOfChildren()
Return number of childnodes current element has.
Returns:
{number} Number of children.

{number} getOpacity()
Returns the opacity value of the Node. 0.0=100% trasparent, 1.0=100% opaque
Returns:
{number} Opacity value.

{lime.Node} getParent()
Return the parent object. Returns null in not in tree
Returns:
{lime.Node} Parent node.

<private> {Array.} getParentStack_()
Return array of parent nodes until scene object
Returns:
{Array.} Array of parents.

{goog.math.Coordinate} getPosition()
Returns element's position coordinate
Returns:
{goog.math.Coordinate} Current position coordinate.

<static> {string} lime.Node.getPropertyForTransition(transition)
Return CSS property name for transition constant
Parameters:
{number} transition
Transition constant.
Returns:
{string} Property name.

{number} getQuality()
Returns elements quality value.
Returns:
{number} Quality value.

{number} getRelativeQuality()
Return cumulative quality value relative to screen full quality.
Returns:
{number} Quality value.

{number} getRotation()
Returns rotation angle for element in degrees
Returns:
{number} Rotation angle.

{goog.math.Vec2} getScale()
Returns scale vector for the element. 1,1 means no scale.
Returns:
{goog.math.Vec2} scale vector.

{lime.Scene} getScene()
Returns the Scene instance related to the node. Returns null if no scene connection.
Returns:
{lime.Scene} Current scene.

{goog.math.Size} getSize()
Returns elements dimension
Returns:
{goog.math.Size} Current element dimensions.

{boolean} hitTest(e)
Checks if event should fire on element based on the position. Before returning true this function should set the position property of the event to the hit position in elements coordinate space
Parameters:
{lime.events.Event} e
Event object.
Returns:
{boolean} If node should handle the event.

{goog.math.Coordinate} localToNode(coord, node)
Convert coordinate in node space to other nodes coordinate space
Parameters:
{goog.math.Coordinate} coord
Local coordinate.
{lime.Node} node
Node for new coordinate space.
Returns:
{goog.math.Coordinate} Coordinate in node space.

{goog.math.Coordinate} localToParent(coord)
Convert coordinate from current node space to parent node space
Parameters:
{goog.math.Coordinate} coord
Local coordinate.
Returns:
{goog.math.Coordinate} Parent coordinate.

{goog.math.Coordinate} localToScreen(coord)
Convert coordinate in node space to screen coordinate
Parameters:
{goog.math.Coordinate} coord
Local coordinate.
Returns:
{goog.math.Coordinate} Screen coordinate.

{goog.math.Box} measureContents()
Return box containing current element and all its children
Returns:
{goog.math.Box} Bounding box.

{boolean} needsDomElement()
Does node require DOM element for drawing?
Returns:
{boolean} True if DOM is required.

{goog.math.Coordinate} parentToLocal(coord)
Covert coordinate form parent node space to current node space
Parameters:
{goog.math.Coordinate} coord
Parent coordinate.
Returns:
{goog.math.Coordinate} Local coordinate.

releaseDependencies()

{lime.Node} removeAllChildren()
Removes all children of a node.
Returns:
{lime.Node} object itself.

{lime.Node} removeChild(child)
Remove element from the childrens array
Parameters:
{lime.Node|Element} child
Child node.
Returns:
{lime.Node} object itself.

{lime.Node} removeChildAt(index)
Remove element at a given index from the childrens array
Parameters:
{number} index
Index of element to remove.
Returns:
{lime.Node} object itself.

removeDependency(other)
Parameters:
other

removeDomElement()
Remove DOM element connected to teh node

removeEventListener(type, handler, opt_capture, opt_handlerScope)
Parameters:
type
handler
opt_capture
opt_handlerScope

runAction(action)
Add Node to action targets list and start the animation
Parameters:
{lime.animation.Animation} action
Animation to run.

{goog.math.Coordinate} screenToLocal(coord)
Convert screen coordinate to node coordinate space
Parameters:
{goog.math.Coordinate} coord
Screen coordinate.
Returns:
{goog.math.Coordinate} Local coordinate.

{lime.Node} setAnchorPoint(value, opt_y)
Sets elements anchor point to new value. Anchor point is used when positioning the element to position coordinate. [0,0] means top left corner, [1,1] bottom right, [.5,.5] means that element is position by the center. You can also pass in 2 numbers.
Parameters:
{(goog.math.Vec2|number)} value
AnchorPoint vector.
{number=} opt_y
Optionaly set anchorpoint with x,y.
Returns:
{lime.Node} object itself.

{lime.Node} setAutoResize(value)
Sets new autoresixe rules. NOT IMPLEMENTED!
Parameters:
{number} value
New autoresize bitmask.
Returns:
{lime.Node} object itself.

{lime.Node} setChildIndex(child, index)
Move a child to another index in the childrens array.
Parameters:
{lime.Node} child
Child node.
{number} index
New index for the child.
Returns:
{lime.Node} object itself.

{lime.Node} setDirty(value, opt_pass, opt_nextframe)
Sets a dirty value true. This means that object needs that kind of updates before next draw.
Parameters:
{number} value
Values to be added to the bitmask.
{number=} opt_pass
Pass number (0-1).
{boolean=} opt_nextframe
Register for next frame.
Returns:
{lime.Node} Node itself.

{lime.Node} setHidden(value)
Sets if element is visible or not
Parameters:
{boolean} value
Hide(true) or show(false).
Returns:
{lime.Node} object itself.

{lime.Node} setMask(value)
Sets element as a mask for current element
Parameters:
{lime.Node} value
Mask node.
Returns:
{lime.Node} object itself.

{lime.Node} setOpacity(value)
Sets the opacity value of the Node object
Parameters:
{number} value
New opacity value(0-1).
Returns:
{lime.Node} The node object itself.

{lime.Node} setPosition(value, opt_y)
Sets new position for element. Also accepts 2 numbers(x and y value)
Parameters:
{(goog.math.Coordinate|number)} value
Position coordinate.
{number=} opt_y
Optionaly set position using x,y.
Returns:
{lime.Node} object itself.

{lime.Node} setQuality(value)
Sets quality value used while drawing. Not all rendermodes can draw more effectively on lower quality. 1.0 full quality, 0.5 half quality. Setting this walue larger than 1.0 almost never does anything good.
Parameters:
{number} value
New quality value.
Returns:
{lime.Node} object itself.

{lime.Node} setRenderer(value)
Set renderer for the node. Renderer defines what lower level technology will be used for drawing node on screen
Parameters:
{lime.Renderer} value
Renderer object.
Returns:
{lime.Node} Node itself.

{lime.Node} setRotation(value)
Rotates element to specific angle in degrees
Parameters:
{number} value
New rotation angle.
Returns:
{lime.Node} object itself.

{lime.Node} setScale(value, opt_y)
Sets new scale vector for element. This function also accepts 2 numbers or 1 number that would be coverted to vector before use
Parameters:
{(goog.math.Vec2|number)} value
New scale vector.
{number=} opt_y
Optionaly set scale using x,y.
Returns:
{lime.Node} Node itself.

{lime.Node} setSize(value, opt_height)
Sets dimensions for element. This funciton also accepts 2 numbers: width,height
Parameters:
{(goog.math.Size|number)} value
Elements new size.
{number=} opt_height
Optionaly use widht,height as parameter.
Returns:
{lime.Node} object itself.

setupDependencies()

update(opt_pass)
Update modified dirty parameters to visible elements properties
Parameters:
{number=} opt_pass
Pass number.

updateDomElement()
Update DOM element connected to the node

updateLayout()
Update node's layout (tree relations)

wasAddedToTree()
Handle adding Node to the DOM tree

wasRemovedFromTree()
Handle removing Node from DOM tree

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 30 2011 11:27:24 GMT+0300 (EEST)