SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatOptionControl
└─SwatChangeOrder
public class SwatChangeOrder
extends SwatOptionControl
| Field Summary | |
|---|---|
| string | Height of the order box (in stylesheet units). |
| array | Value ordered array. |
| string | Width of the order box (in stylesheet units). |
| Fields inherited from Swat.SwatOptionControl | |
|---|---|
| options, serialize_values | |
| Fields inherited from Swat.SwatInputControl | |
|---|---|
| required | |
| Constructor Summary | |
|---|---|
SwatChangeOrder(string id) Creates a new change-order widget. |
|
| Method Summary | |
|---|---|
| void | display() Displays this change-order control. |
| private void | |
| protected array | Gets the array of CSS classes that are applied to this change-order widget. |
| protected string | Gets the inline JavaScript required by this change-order control. |
| SwatMessage | getNote() Gets a note letting the user know drag-and-drop is available for ordering items. |
| array | Gets the options of this change-order control ordered by the values of this change-order. |
| void | getState() |
| void | process() Processes this widget. |
| void | setState(mixed state) |
| Methods inherited from Swat.SwatOptionControl | |
|---|---|
| addOption, addOptionsByArray, getOption, getOptions, getOptionsByValue, removeOption, removeOptionsByValue | |
| Methods inherited from Swat.SwatInputControl | |
|---|---|
| getForm, getValidationMessage, 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 | |
public string $height = '180px'
Height of the order box (in stylesheet units)
public array $values = null
Value ordered array
The current ordering of options in the widget. If null, options are displayed in the order of the options array.
public string $width = '300px'
Width of the order box (in stylesheet units)
public SwatChangeOrder(string id)
Creates a new change-order widget
id - a non-visible unique id for this widget.public void display()
Displays this change-order control
private void displayButtons()
protected array getCSSClassNames()
Gets the array of CSS classes that are applied to this change-order widget
protected string getInlineJavaScript()
Gets the inline JavaScript required by this change-order control
public SwatMessage getNote()
Gets a note letting the user know drag-and-drop is available for ordering items
public array getOrderedOptions()
Gets the options of this change-order control ordered by the values of this change-order
If this control has two or more equivalent values, the order of options having those values is arbitrary.
public void getState()
public void process()
Processes this widget
After a form submit, this widget processes itself and its dependencies and then recursively processes any of its child widgets.
Composite widgets of this widget are automatically processed as well.
If this widget has not been initialized, it is automatically initialized before processing.
public void setState(mixed state)
An element ordering widget
This widget uses JavaScript to present an orderable list of elements. The ordering of elements is what this widget returns.
If two options are added to this control with equivalent values the returned order of the two options is arbitrary.