Class Index | File Index

Classes


Class R.ui.LabelControl


Extends R.ui.AbstractUIControl.
UI label control.
Defined in: labelcontrol.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
R.ui.LabelControl(text, forControl)
Fields borrowed from class R.struct.Container:
EMPTY
Method Summary
Method Attributes Method Name and Description
 
click(mouseInfo)
Called when a mouse button is pressed, then released on the control.
 
deserialize(obj, clazz)
Deserialize the object back into a label control.
 
Destroy the text input control, releasing its event handlers.
 
drawControl(renderContext, worldTime, dt)
Draw the input component within the
 
Get the class name of this object
 
Get the UI control this label is linked to.
 
Returns a bean which represents the read or read/write properties of the object.
 
Get the text of this label control.
 
linkTo(uiControl)
Link the label to a UI control.
 
Releases the object back into the object pool.
 
serialize(obj, defaults)
Get a properties object with values for the given object.
 
setText(text)
Set the text of this label control.
Methods borrowed from class R.ui.AbstractUIControl:
addClass, calcHeight, calcWidth, drawBox, getControlName, getGroup, getGroupName, getTextRenderer, hasFocus, isMouseInControl, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, removeClass, setControlName, setFocus, setGroup
Methods borrowed from class R.objects.Object2D:
getAABB, getBoundingBox, getBoundingCircle, getCollisionHull, getDefaultTransformComponent, getLastPosition, getOrigin, getOriginPosition, getPosition, getRenderPosition, getRenderRotation, getRotation, getScale, getScaleX, getScaleY, getTransformationMatrix, getWorldBox, getWorldCircle, getZIndex, setBoundingBox, setCollisionHull, setDefaultTransformComponent, setOrigin, setPosition, setRotation, setScale, setZIndex
Methods borrowed from class R.engine.GameObject:
add, componentSort, getComponent, getComponentByClass, getRenderContext, isDirty, isKeepAlive, markDirty, remove, setKeepAlive, setRenderContext, update, wasDirty
Methods borrowed from class R.struct.HashContainer:
cleanUp, clear, get, isInHash, removeAtIndex, removeHash
Methods borrowed from class R.struct.Container:
addAll, append, clone, concat, contains, filter, forEach, fromArray, getAll, getObjects, insert, iterator, reduce, replace, replaceAt, size, sort, subset, toXML
Methods borrowed from class R.engine.BaseObject:
addEvent, addEvents, getElement, jQ, removeEvent, setElement, triggerEvent
Methods borrowed from class R.engine.PooledObject:
clearObjectDataModel, getId, getName, getObjectDataModel, isDestroyed, setName, setObjectDataModel, toString
Class Detail
R.ui.LabelControl(text, forControl)
Parameters:
text
{String} The text to display for the button.
forControl Optional
{R.ui.AbstractUIControl} The control the label will set focus to if clicked
Method Detail
click(mouseInfo)
Called when a mouse button is pressed, then released on the control. Triggers the "click" event, passing the R.struct.MouseInfo structure.
Parameters:
mouseInfo
{R.struct.MouseInfo} The mouse info structure

{R.ui.LabelControl} deserialize(obj, clazz)
Deserialize the object back into a label control.
Parameters:
obj
{Object} The object to deserialize
clazz Optional
{Class} The object class to populate
Returns:
{R.ui.LabelControl} The object which was deserialized

destroy()
Destroy the text input control, releasing its event handlers.

drawControl(renderContext, worldTime, dt)
Draw the input component within the
Parameters:
renderContext
{R.rendercontexts.RenderContext2D} The render context where the control is drawn.
worldTime
{Number} The current world time, in milliseconds
dt
{Number} The time since the last frame was drawn by the engine, in milliseconds

{String} getClassName()
Get the class name of this object
Returns:
{String} The string "R.ui.LabelControl"

{R.ui.AbstractUIControl} getLinkTo()
Get the UI control this label is linked to.
Returns:
{R.ui.AbstractUIControl} The UI control, or null

{Object} getProperties()
Returns a bean which represents the read or read/write properties of the object.
Returns:
{Object} The properties object

{String} getText()
Get the text of this label control.
Returns:
{String}

linkTo(uiControl)
Link the label to a UI control. When the label is clicked, the UI control will receive focus.
Parameters:
uiControl
{R.ui.AbstractUIControl} The control to link to

release()
Releases the object back into the object pool. See R.engine.PooledObject#release for more information.

{Object} serialize(obj, defaults)
Get a properties object with values for the given object.
Parameters:
obj
{R.ui.LabelControl} The label control to query
defaults Optional
{Object} Default values that don't need to be serialized unless they are different.
Returns:
{Object}

setText(text)
Set the text of this label control.
Parameters:
text
{String} Text

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:21 GMT-0400 (EDT)