OverviewSingleDeprecatedPropertiesEventsXSL Parameters

jsx3.gui

class CheckBox

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.gui.CheckBox

All Implemented Interfaces:

jsx3.gui.Form, jsx3.gui.Interactive, jsx3.util.EventDispatcher

class CheckBox
extends jsx3.gui.Block
This class is a wrapper of the standard HTML checkbox.

This class publishes the following model events:

Field Summary
static int
CHECKED
1: checked
static String
DEFAULTCLASSNAME
jsx30checkbox
static int
PARTIAL
2: dashed
static int
UNCHECKED
0: unchecked (default)
Constructor Summary
void
init(strName : String, vntLeft : int | String, vntTop : int | String, vntWidth : int | String, vntHeight : int | String, strText : String, CHECKED : int)
The instance initializer.
Method Summary
int
validates that the checkbox is checked if it is required (e.g.
int
Returns current state of checkbox; to get the state of the checkbox when it was first initialized, use: getDefaultChecked().
int
Returns state of checkbox when it was first initialized; to get the current state, use: getChecked();
int
Returns current state of checkbox; to get the state of the checkbox when it was first initialized, use: getDefaultChecked().
static String
Deprecated.
String
Returns the DHTML, used for this object's on-screen VIEW
jsx3.gui.CheckBox
setChecked(intChecked : int)
Sets the state of this checkbox.
jsx3.gui.CheckBox
setDefaultChecked(CHECKED : int)
Sets state of checkbox when it is first initialized; returns reference to self
jsx3.gui.CheckBox
setValue(vntValue : String)
Sets the state of this checkbox.
Methods Inherited From jsx3.gui.Form
doKeyBinding, doReset, getDisabledBackgroundColor, getDisabledColor, getEnabled, getKeyBinding, getRequired, getValidationState, setDisabledBackgroundColor, setDisabledColor, setEnabled, setKeyBinding, setRequired, setValidationState
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCDFAttribute, getCDFId, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getText, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, setBackground, setBackgroundColor, setBorder, setCDFAttribute, setCDFId, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setText, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask
Methods Inherited From jsx3.gui.Interactive
doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy
Methods Inherited From jsx3.gui.Painted
focus, getAbsolutePosition, getAttribute, getAttributes, getRendered, insertHTML, onAfterPaint, onAfterRestoreView, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute
Methods Inherited From jsx3.app.Model
adoptChild, assembleFromXML, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getDynamicProperty, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onChildAdded, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, selectDescendants, setChild, setDynamicProperty, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc, toXMLElm
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Field Detail

CHECKED

static final int CHECKED
1: checked

DEFAULTCLASSNAME

static String DEFAULTCLASSNAME
jsx30checkbox

PARTIAL

static final int PARTIAL
2: dashed

UNCHECKED

static final int UNCHECKED
0: unchecked (default)
Constructor Detail

init

void init(strName : String, vntLeft : int | String, vntTop : int | String, vntWidth : int | String, vntHeight : int | String, strText : String, CHECKED : int)
The instance initializer.

Parameters:

strNameunique name distinguishing this object from all other JSX GUI objects in the JSX application
vntLefteither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
vntTopeither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
vntWidtheither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
vntHeighteither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
strTexttext/HTML markup to display with the checkbox;
CHECKEDif jsx3.gui.CheckBox.CHECKED or null, checkbox is checked; if jsx3.gui.CheckBox.UNCHECKED checkbox is unchecked
Method Detail

doValidate

int doValidate()
validates that the checkbox is checked if it is required (e.g., [object].setRequired()); returns (as well as sets as a property on the object) one of: jsx3.gui.Form.STATEVALID jsx3.gui.Form.INSTATEVALID

Returns:

one of: jsx3.gui.Form.STATEVALID jsx3.gui.Form.INSTATEVALID  

Overrides:

doValidate in jsx3.gui.Form

getChecked

int getChecked()
Returns current state of checkbox; to get the state of the checkbox when it was first initialized, use: getDefaultChecked(). Default: jsx3.gui.CheckBox.CHECKED

Returns:

one of: jsx3.gui.CheckBox.CHECKED or jsx3.gui.CheckBox.UNCHECKED  

getDefaultChecked

int getDefaultChecked()
Returns state of checkbox when it was first initialized; to get the current state, use: getChecked();

Returns:

one of: jsx3.gui.CheckBox.CHECKED or jsx3.gui.CheckBox.UNCHECKED  

getValue

int getValue()
Returns current state of checkbox; to get the state of the checkbox when it was first initialized, use: getDefaultChecked(). Default: jsx3.gui.CheckBox.CHECKED

Returns:

one of: jsx3.gui.CheckBox.CHECKED or jsx3.gui.CheckBox.UNCHECKED  

Overrides:

getValue in jsx3.gui.Form

getVersion

static String getVersion()
Deprecated.
Returns the release/build for the class (i.e., "2.2.00")

Returns:

 

paint

String paint()
Returns the DHTML, used for this object's on-screen VIEW

Returns:

DHTML  

Overrides:

paint in jsx3.gui.Block

setChecked

jsx3.gui.CheckBox setChecked(intChecked : int)
Sets the state of this checkbox. This method will execute the TOGGLE model event only under the deprecated 3.0 model event protocol.

Parameters:

intCheckedCHECKED or UNCHECKED

Returns:

this object 

See Also:

CHECKED, UNCHECKED

setDefaultChecked

jsx3.gui.CheckBox setDefaultChecked(CHECKED : int)
Sets state of checkbox when it is first initialized; returns reference to self

Parameters:

CHECKEDone of: jsx3.gui.CheckBox.CHECKED or jsx3.gui.CheckBox.UNCHECKED

Returns:

this object  

setValue

jsx3.gui.CheckBox setValue(vntValue : String)
Sets the state of this checkbox. This method calls setChecked.

Parameters:

vntValuecheckbox is not checked if value is "false" "0" or "null".

Returns:

this object  

Overrides:

setValue in jsx3.gui.Form