Zimlet JavaScript API Reference - DwtCheckbox

Class DwtCheckbox


Extends DwtControl.

This class represents a checkbox.

Defined in: DwtCheckbox.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtCheckbox(params)
Creates a checkbox.
Field Summary
Field Attributes Field Name and Description
<static>  
DwtCheckbox.DEFAULT_POSITION
Defines the default text style position.
<static>  
DwtCheckbox.TEXT_LEFT
Defines the "left" text style position.
<static>  
DwtCheckbox.TEXT_RIGHT
Defines the "right" text style position.
Method Summary
Method Attributes Method Name and Description
 
Adds a selection listener.
 
getInputElement()
 
Gets the checkbox text.
 
Gets the text position.
 
Gets the value.
 
Checks if the checkbox is selected state.
 
Removes a selection listener.
 
setEnabled(enabled)
Sets the enabled state.
 
setSelected(selected)
Sets the selected state.
 
setText(text)
Sets the checkbox text.
 
setTextPosition(position)
Sets the text position.
 
setValue(value)
Sets the value.
Methods borrowed from class DwtControl:
addClassName, addControlListener, addDisposeListener, addListener, appendElement, blur, clearContent, clearHandler, condClassName, delClassName, dispose, focus, getBounds, getClassName, getContent, getCursor, getData, getDragBox, getDragSource, getDropTarget, getEnabled, getFocusElement, getH, getHtmlElement, getHTMLElId, getInsetBounds, getInsets, getLocation, getMargins, getOpacity, getOuterSize, getPosition, getScrollContainer, getScrollStyle, getSize, getTabGroupMember, getTooltipBase, getToolTipContent, getVisibility, getVisible, getW, getX, getXW, getY, getYH, getZIndex, hasFocus, isAlertShown, isDisposed, isInitialized, isListenerRegistered, notifyListeners, preventContextMenu, preventSelection, removeAllListeners, removeControlListener, removeDisposeListener, removeListener, reparent, reparentHtmlElement, replaceElement, setBounds, setClassName, setContent, setCursor, setData, setDisplay, setDisplayState, setDragBox, setDragSource, setDropTarget, setEventPropagation, setFocusElement, setHandler, setHtmlElementId, setLocation, setOpacity, setPosition, setScrollStyle, setSize, setToolTipContent, setVisibility, setVisible, setZIndex, showAlert, zShow
Class Detail
DwtCheckbox(params)
Creates a checkbox.
Parameters:
{hash} params
a hash of parameters
{DwtComposite} params.parent
the parent widget
{DwtCheckbox.TEXT_LEFT|DwtCheckbox.TEXT_RIGHT} params.style Optional, Default: DwtCheckbox.TEXT_RIGHT
the text style
{string} params.name
the input control name (required for IE)
{string} params.value
the input control value
{boolean} params.checked
the input control checked status (required for IE)
{string} params.className
the CSS class
{constant} params.posStyle
the positioning style (see Dwt)
{string} params.id
an explicit ID to use for the control's HTML element
{number} params.index
the index at which to add this control among parent's children
Field Detail
<static> DwtCheckbox.DEFAULT_POSITION
Defines the default text style position.

<static> DwtCheckbox.TEXT_LEFT
Defines the "left" text style position.

<static> DwtCheckbox.TEXT_RIGHT
Defines the "right" text style position.
Method Detail
addSelectionListener(listener)
Adds a selection listener.
Parameters:
{AjxListener} listener
the listener

getInputElement()

{string} getText()
Gets the checkbox text.
Returns:
{string} the text

Gets the text position.
Returns:
{DwtCheckbox.TEXT_LEFT|DwtCheckbox.TEXT_RIGHT} the position

{string} getValue()
Gets the value.
Returns:
{string} the value

{boolean} isSelected()
Checks if the checkbox is selected state.
Returns:
{boolean} true if the checkbox is selected

removeSelectionListener(listener)
Removes a selection listener.
Parameters:
{AjxListener} listener
the listener

setEnabled(enabled)
Sets the enabled state.
Parameters:
{boolean} enabled
if true, the checkbox is enabled

setSelected(selected)
Sets the selected state.
Parameters:
{boolean} selected
if true, the checkbox is selected

setText(text)
Sets the checkbox text.
Parameters:
{string} text
the text

setTextPosition(position)
Sets the text position.
Parameters:
{DwtCheckbox.TEXT_LEFT|DwtCheckbox.TEXT_RIGHT} position
the position

setValue(value)
Sets the value.
Parameters:
{string} value
the value

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:27 GMT-0400 (EDT)