Class Index | File Index

Classes


Class R.ui.RadioControl


Extends R.ui.AbstractUIControl.
UI checkbox control.
Defined in: radiocontrol.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
R.ui.RadioControl(group, value, checked)
Fields borrowed from class R.struct.Container:
EMPTY
Method Summary
Method Attributes Method Name and Description
 
click(mouseInfo)
Respond to a "click" action on the checkbox.
 
deserialize(obj, clazz)
Deserialize the object back into a radio control.
 
drawBox(renderContext, width, height, fillColor)
Override drawing the box and draw a circle instead.
 
drawControl(renderContext, worldTime, dt)
Draw the input component within the
 
Get the class name of this object
 
Get the value of the selected control within the entire group.
 
Returns a bean which represents the read or read/write properties of the object.
 
Get the value of this radio control.
 
Get the "checked" state of the control.
 
Releases the object back into the object pool.
 
serialize(obj, defaults)
Get a properties object with values for the given object.
 
setChecked(state)
Set the "checked" state of the control.
 
setValue(value)
Set the value of this radio control.
Methods borrowed from class R.ui.AbstractUIControl:
addClass, calcHeight, calcWidth, destroy, 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.RadioControl(group, value, checked)
Parameters:
group
{String} The name of the group this control is a part of.
value
{String} The value of this radio within the group
checked Optional
{Boolean} Whether the checkbox is checked, or not.
Method Detail
click(mouseInfo)
Respond to a "click" action on the checkbox.
Parameters:
mouseInfo
{R.struct.MouseInfo} A mouse info structure

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

drawBox(renderContext, width, height, fillColor)
Override drawing the box and draw a circle instead.
Parameters:
renderContext
width
height
fillColor

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.RadioControl"

{String} getGroupValue()
Get the value of the selected control within the entire group.
Returns:
{String} The checked radio control's value, or null if no control has been checked.

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

{String} getValue()
Get the value of this radio control.
Returns:
{String}

{String} isChecked()
Get the "checked" state of the control.
Returns:
{String}

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.RadioControl} The radio control to query
defaults Optional
{Object} Default values that don't need to be serialized unless they are different.
Returns:
{Object}

setChecked(state)
Set the "checked" state of the control. Triggers the "change" event on the control.
Parameters:
state
{Boolean} true to mark the control as "checked"

setValue(value)
Set the value of this radio control.
Parameters:
value
{String} The value of the control

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