SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatActionItem
public class SwatActionItem
extends SwatControl
| Field Summary | |
|---|---|
| string | A unique identifier for this action item. |
| string | A human readable title displayed for this item. |
| SwatWidget | A SwatWidget associated with this action item. |
| Method Summary | |
|---|---|
| void | addChild(SwatWidget child) Adds a child object. |
| SwatUIObject | copy(string id_suffix) Performs a deep copy of the UI tree starting with this UI object. |
| void | display() Displays this item. |
| array | Gets descendant states. |
| array | getDescendants(string class_name) Gets descendant UI-objects. |
| SwatUIObject | getFirstDescendant(string class_name) Gets the first descendant UI-object of a specific class. |
| SwatHtmlHeadEntrySet | Gets the SwatHtmlHeadEntry objects needed by this action item. |
| void | init() Initializes this action item. |
| void | setDescendantStates(array states) Sets descendant states. |
| void | setWidget(SwatWidget widget) Sets the widget to use for this item. |
| 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 | |
public string $id
A unique identifier for this action item
public string $title = ''
A human readable title displayed for this item
public SwatWidget $widget = null
A SwatWidget associated with this action item
public void addChild(SwatWidget child)
Adds a child object
This method fulfills the SwatUIParent interface. It is used
by SwatUI when building a widget tree and should not need to be
called elsewhere. To set the a widget in an action item, use
SwatActionItem::setWidget().
child - a reference to a child object to add.public SwatUIObject copy(string id_suffix)
Performs a deep copy of the UI tree starting with this UI object
id_suffix - optional. A suffix to append to copied UI objects in the UI tree.public void display()
Displays this item
Calls this item's widget display method.
public array getDescendantStates()
Gets descendant states
Retrieves an array of states of all stateful UI-objects in the widget subtree below this action item.
public array getDescendants(string class_name)
Gets descendant UI-objects
class_name - optional class name. If set, only UI-objects that are instances of $class_name are returned.public SwatUIObject getFirstDescendant(string class_name)
Gets the first descendant UI-object of a specific class
class_name - class name to look for.public SwatHtmlHeadEntrySet getHtmlHeadEntrySet()
Gets the SwatHtmlHeadEntry objects needed by this action item
public void init()
Initializes this action item
This initializes the widget contained in this action item if there is one.
public void setDescendantStates(array states)
Sets descendant states
Sets states on all stateful UI-objects in the widget subtree below this action item.
states - an array of UI-object states with UI-object identifiers as array keys.public void setWidget(SwatWidget widget)
Sets the widget to use for this item
Each SwatActionItem can have one associated SwatWidget. This method sets the widget for this item.
widget - the widget associated with this action.
A single entry in a
SwatActionswidget