OverviewSingleDeprecatedPropertiesEventsXSL Parameters

jsx3.gui

class RadioButton

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

All Implemented Interfaces:

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

class RadioButton
extends jsx3.gui.Block
A GUI control that implements a single radio button.

Several radio buttons may be organized into a group ("radio group") with the groupName property. No more than one radio button of the set of radio buttons sharing a single groupName value may be selected at one time.

Field Summary
static String
DEFAULTCLASSNAME
jsx30radio
static int
SELECTED
Value for the selected field indicating a selected radio button.
static int
UNSELECTED
Value for the selected field indicating an unselected radio button.
Constructor Summary
void
init(strName : String, vntLeft : int | String, vntTop : int | String, vntWidth : int | String, vntHeight : int | String, strText : String, strValue : String, strGroupName : String, intSelected : int)
The instance initializer.
Method Summary
int
Validates that this radio button is selected if it is required.
int
Returns the default selection state of this radio button.
String
Returns the group name of this radio button, which is equivalent to the name property on a standard HTML radio button.
String
Returns the value of the selected radio button in the radio group of this radio button.
int
Returns the current selection state of this radio button.
Array<jsx3.gui.RadioButton>
getSiblings(bRendered : boolean)
Returns the list of sibling radio buttons.
String
Returns the value of this radio button.
static String
getValue(strGroupName : String)
Deprecated. Use getGroupValue() instead.
static String
Deprecated.
String
Returns the serialized DHTML representation of this object.
jsx3.gui.RadioButton
setDefaultSelected(intSelected : int)
Sets the default selection state of this radio button.
void
setGroupName(strGroupName : String)
Sets the group name of this radio button.
void
setGroupValue(strValue : String)
Sets the selected radio button of the radio group of this radio button by value.
jsx3.gui.RadioButton
setSelected(intSelected : int, objGUI : Object)
Sets the current selection state of this radio button.
jsx3.gui.RadioButton
setValue(strValue : String)
Sets the value of this radio button.
static jsx3.gui.RadioButton
setValue(strGroupName : String, strValue : String)
Deprecated. Use setGroupValue() instead.
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

DEFAULTCLASSNAME

static String DEFAULTCLASSNAME
jsx30radio

SELECTED

static final int SELECTED
Value for the selected field indicating a selected radio button.

UNSELECTED

static final int UNSELECTED
Value for the selected field indicating an unselected radio button.
Constructor Detail

init

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

Parameters:

strNamea unique name distinguishing this object from all other JSX GUI objects in the JSX application.
vntLeftthe left offset of this object from the parent container as a number (in pixels) or a string css value.
vntTopthe top offset of this object from the parent container as a number (in pixels) or a string css value.
vntWidththe width of this object as a number (in pixels) or a string css value.
vntHeightthe height of this object as a number (in pixels) or a string css value.
strTextthe text/HTML markup to display with the radio button.
strValuethe value of the radio button (equivalent to the value property on a standard HTML radio button).
strGroupNamethe group name of the radio button (equivalent to the name property on a standard HTML radio button).
intSelectedthe default selection state of the radio button. SELECTED or UNSELECTED. null is equivalent to SELECTED.
Method Detail

doValidate

int doValidate()
Validates that this radio button is selected if it is required. A radiobutton will pass validation if it is optional or if it is required and it or one of its sibling radio buttons is selected.

Returns:

jsx3.gui.Form.STATEVALID or jsx3.gui.Form.INSTATEVALID.  

Overrides:

doValidate in jsx3.gui.Form

getDefaultSelected

int getDefaultSelected()
Returns the default selection state of this radio button. To get the current state use getSelected().

Returns:

SELECTED or UNSELECTED

See Also:

getSelected()

getGroupName

String getGroupName()
Returns the group name of this radio button, which is equivalent to the name property on a standard HTML radio button.

Returns:

 

getGroupValue

String getGroupValue()
Returns the value of the selected radio button in the radio group of this radio button.

Returns:

the value of the selected radio button or null if no button is selected.  

getSelected

int getSelected()
Returns the current selection state of this radio button.

Returns:

SELECTED or UNSELECTED

See Also:

SELECTED, UNSELECTED

getSiblings

Array<jsx3.gui.RadioButton> getSiblings(bRendered : boolean)
Returns the list of sibling radio buttons. This list is comprised of the radio buttons whose groupName property is equal to the groupName property of this radio button. The return value does not include this radio button. This method will only return siblings if this radio button is rendered and will only return sibling radio buttons that are also rendered on screen.

Parameters:

bRendered

Returns:

 

getValue

String getValue()
Returns the value of this radio button. When this radio button is selected, the value of its radio group is equal to the value of this radio button.

Returns:

the value of this radio button.  

Overrides:

getValue in jsx3.gui.Form

getValue

static String getValue(strGroupName : String)
Deprecated. Use getGroupValue() instead.
Returns the value of the selected radio button in a given radio group. If no radio button in the group is selected, null is returned. This method only queries radio groups that are currently rendered on screen.

Parameters:

strGroupNamethe name of the radio group to search.

Returns:

the value of the selected radio button in the radio group. 

Overrides:

getValue in jsx3.gui.Form

See Also:

getGroupValue()

getVersion

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

Returns:

 

paint

String paint()
Returns the serialized DHTML representation of this object.

Returns:

 

Overrides:

paint in jsx3.gui.Block

setDefaultSelected

jsx3.gui.RadioButton setDefaultSelected(intSelected : int)
Sets the default selection state of this radio button.

Parameters:

intSelectedSELECTED or UNSELECTED.

Returns:

this object.  

setGroupName

void setGroupName(strGroupName : String)
Sets the group name of this radio button. If this property is set, this radio button will be a member of the set of radio buttons sharing the same value for this property. No more than one member of this set may be selected at one time.

Parameters:

strGroupNamethe new group name.

setGroupValue

void setGroupValue(strValue : String)
Sets the selected radio button of the radio group of this radio button by value.

Parameters:

strValuethe value of the radio button of the radio group of this radio button to select.

setSelected

jsx3.gui.RadioButton setSelected(intSelected : int, objGUI : Object)
Sets the current selection state of this radio button. This method immediately updates the view of this object if it is currently rendered on the screen. If intSelected is equal to SELECTED any other radio buttons in the radio group of this object will be unselected.

Parameters:

intSelectedif SELECTED or null, this object is selected, otherwise it is unselected.
objGUI

Returns:

this object.  

setValue

jsx3.gui.RadioButton setValue(strValue : String)
Sets the value of this radio button.

Parameters:

strValuethe value of this radiobutton. In general, each radio button is a radio group has a unique value.

Returns:

this object.  

Overrides:

setValue in jsx3.gui.Form

setValue

static jsx3.gui.RadioButton setValue(strGroupName : String, strValue : String)
Deprecated. Use setGroupValue() instead.
Sets the selected radio button in a given radio group.

Parameters:

strGroupNamethe name of the radio group to search.
strValuethe value of the radio button in the radio group to select.

Returns:

the selected radio button. 

Overrides:

setValue in jsx3.gui.Form

See Also:

setGroupValue()