silverorange Code


Swat.SwatCheckbox
/Swat/SwatCheckbox.php at line 16

Class SwatCheckbox

SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatCheckbox

public class SwatCheckbox
extends SwatInputControl

A checkbox entry widget

Copyright:
2004-2006 silverorange
License:
http://www.gnu.org/copyleft/lesser.html LGPL License 2.1

Field Summary
string

$access_key

Access key.

boolean

$value

Checkbox value.

Fields inherited from Swat.SwatInputControl
required
Constructor Summary

SwatCheckbox(string id)

Creates a new checkbox.

Method Summary
void

display()

Displays this checkbox.

protected array

getCSSClassNames()

Gets the array of CSS classes that are applied to this checkbox.

string

getFocusableHtmlId()

Gets the id attribute of the XHTML element displayed by this widget that should receive focus.

boolean

getState()

Gets the current state of this checkbox.

void

process()

Processes this checkbox.

void

setState(boolean state)

Sets the current state of this checkbox.

Methods inherited from Swat.SwatInputControl
getForm, init
Methods inherited from Swat.SwatControl
addMessage, getNote, printWidgetTree
Methods inherited from Swat.SwatWidget
addCompositeWidget, addMessage, confirmCompositeWidgets, copy, createCompositeWidgets, display, displayHtmlHeadEntries, getCSSClassNames, getCompositeWidget, getCompositeWidgets, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, isDisplayed, isInitialized, isProcessed, isSensitive, printWidgetTree, process, replaceWithContainer
Methods inherited from Swat.SwatUIObject
addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible

Field Detail

/Swat/SwatCheckbox.php at line 36

access_key

public string $access_key = null

Access key

Access key for this checkbox input, for keyboard nagivation.


/Swat/SwatCheckbox.php at line 27

value

public boolean $value = false

Checkbox value

The state of the widget.


Constructor Detail

/Swat/SwatCheckbox.php at line 48

SwatCheckbox

public SwatCheckbox(string id)

Creates a new checkbox

Parameters:
id - a non-visible unique id for this widget.
See Also:
SwatWidget::__construct()

Method Detail

/Swat/SwatCheckbox.php at line 62

display

public void display()

Displays this checkbox

Outputs an appropriate XHTML tag.


/Swat/SwatCheckbox.php at line 164

getCSSClassNames

protected array getCSSClassNames()

Gets the array of CSS classes that are applied to this checkbox

Returns:
the array of CSS classes that are applied to this checkbox.
See Also:
SwatUIObject::getCSSClassString()

/Swat/SwatCheckbox.php at line 150

getFocusableHtmlId

public string getFocusableHtmlId()

Gets the id attribute of the XHTML element displayed by this widget that should receive focus

Returns:
the id attribute of the XHTML element displayed by this widget that should receive focus or null if there is no such element.
See Also:
SwatWidget::getFocusableHtmlId()

/Swat/SwatCheckbox.php at line 117

getState

public boolean getState()

Gets the current state of this checkbox

Returns:
the current state of this checkbox.
See Also:
SwatState::getState()

/Swat/SwatCheckbox.php at line 96

process

public void process()

Processes this checkbox

Sets the internal value of this checkbox based on submitted form data.


/Swat/SwatCheckbox.php at line 132

setState

public void setState(boolean state)

Sets the current state of this checkbox

Parameters:
state - the new state of this checkbox.
See Also:
SwatState::setState()

silverorange Code