Class R.ui.CheckboxControl
Extends
R.ui.AbstractUIControl.
UI checkbox control.
Defined in: checkboxcontrol.js.
Constructor Attributes | Constructor Name and Description |
---|---|
R.ui.CheckboxControl(checked)
|
- Fields borrowed from class R.struct.Container:
- EMPTY
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 checkbox control.
|
|
drawControl(renderContext, worldTime, dt)
Draw the input component within the
|
|
Get the class name of this object
|
|
Returns a bean which represents the read or read/write properties
of the object.
|
|
Get the "checked" state of the control.
|
|
release()
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.
|
- Methods borrowed from class R.ui.AbstractUIControl:
- addClass, calcHeight, calcWidth, destroy, 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.CheckboxControl(checked)
- Parameters:
- 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.CheckboxControl}
deserialize(obj, clazz)
Deserialize the object back into a checkbox control.
- Parameters:
- obj
- {Object} The object to deserialize
- clazz Optional
- {Class} The object class to populate
- Returns:
- {R.ui.CheckboxControl} The object which was deserialized
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.CheckboxControl"
{Object}
getProperties()
Returns a bean which represents the read or read/write properties
of the object.
- Returns:
- {Object} The properties object
{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.CheckboxControl} The checkbox 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"