silverorange Code


Swat.SwatCheckboxTree
/Swat/SwatCheckboxTree.php at line 18

Class SwatCheckboxTree

SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatOptionControl
└─SwatCheckboxList
└─SwatCheckboxTree

public class SwatCheckboxTree
extends SwatCheckboxList

A checkbox array widget formatted into a tree

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

Field Summary
protected SwatHtmltag

$input_tag

An input tag used for displaying tree nodes.

protected SwatHtmltag

$label_tag

A label tag used for displaying tree nodes.

protected SwatDataTreeNode

$tree

Checkbox tree structure.

Fields inherited from Swat.SwatCheckboxList
columns, show_check_all, values
Fields inherited from Swat.SwatOptionControl
options, serialize_values
Fields inherited from Swat.SwatInputControl
required
Constructor Summary

SwatCheckboxTree(string id)

Creates a new checkbox list.

Method Summary
void

display()

Displays this widget.

private integer

displayNode(SwatDataTreeNode node, integer nodes, string parent_index)

Displays a node in a tree as a checkbox input.

protected array

getCSSClassNames()

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

SwatTreeNode

getTree()

Gets the tree collection of SwatTreeNode objects for this tree flydown.

void

setTree(SwatDataTreeNode tree)

Sets the tree to use for display.

Methods inherited from Swat.SwatCheckboxList
createCompositeWidgets, display, displayOption, getCSSClassNames, getInlineJavaScript, getLiTag, getState, init, process, processValues, reset, setState
Methods inherited from Swat.SwatOptionControl
addOption, addOptionsByArray, getOption, getOptions, getOptionsByValue, removeOption, removeOptionsByValue
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/SwatCheckboxTree.php at line 48

input_tag

protected SwatHtmltag $input_tag = null

An input tag used for displaying tree nodes

See Also:
SwatCheckboxTree::displayNode()

/Swat/SwatCheckboxTree.php at line 39

label_tag

protected SwatHtmltag $label_tag = null

A label tag used for displaying tree nodes

See Also:
SwatCheckboxTree::displayNode()

/Swat/SwatCheckboxTree.php at line 30

tree

protected SwatDataTreeNode $tree = null

Checkbox tree structure

An tree structure of SwatTreeNode objects. This structure overwrites the public options property.


Constructor Detail

/Swat/SwatCheckboxTree.php at line 60

SwatCheckboxTree

public SwatCheckboxTree(string id)

Creates a new checkbox list

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

Method Detail

/Swat/SwatCheckboxTree.php at line 69

display

public void display()

Displays this widget

Displays this widget displays as well as recursively displays any child widgets of this widget.

If this widget has not been initialized, it is automatically initialized before displaying.


/Swat/SwatCheckboxTree.php at line 161

displayNode

private integer displayNode(SwatDataTreeNode node, integer nodes, string parent_index)

Displays a node in a tree as a checkbox input

Parameters:
node - the node to display.
nodes - the current number of nodes.
parent_index - the path of the parent node.
Returns:
the number of checkable nodes in the tree.

/Swat/SwatCheckboxTree.php at line 142

getCSSClassNames

protected array getCSSClassNames()

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

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

/Swat/SwatCheckboxTree.php at line 128

getTree

public SwatTreeNode getTree()

Gets the tree collection of SwatTreeNode objects for this tree flydown

Returns:
Tree of nodes

/Swat/SwatCheckboxTree.php at line 114

setTree

public void setTree(SwatDataTreeNode tree)

Sets the tree to use for display

Parameters:
tree - the tree to use for display.

silverorange Code