SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatEntry
└─SwatNumericEntry
public abstract class SwatNumericEntry
extends SwatEntry
| Field Summary | |
|---|---|
| double | The largest valid number in this entry. |
| double | The smallest valid number in this entry. |
| boolean | Show Thousands Seperator. |
| Fields inherited from Swat.SwatEntry | |
|---|---|
| access_key, autocomplete, maxlength, minlength, nonce, read_only, size, tab_index, value | |
| Fields inherited from Swat.SwatInputControl | |
|---|---|
| required | |
| Constructor Summary | |
|---|---|
SwatNumericEntry(string id) Creates a new numeric entry widget. |
|
| Method Summary | |
|---|---|
| protected array | Gets the array of CSS classes that are applied to this entry. |
| protected abstract mixed | getNumericValue(string value) Gets the numeric value of this widget. |
| protected SwatMessage | getValidationMessage(string id) Gets a validation message for this numeric entry. |
| void | process() Checks the minimum and maximum values of this numeric entry widget. |
| Methods inherited from Swat.SwatEntry | |
|---|---|
| display, getCSSClassNames, getDisplayValue, getFocusableHtmlId, getInputTag, getNonce, getRawValue, getState, getValidationMessage, hasRawValue, process, setState | |
| 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 | |
public double $maximum_value = null
The largest valid number in this entry
This is inclusive. If set to null, there is no maximum value.
public double $minimum_value = null
The smallest valid number in this entry
This is inclusive. If set to null, there is no minimum value.
public boolean $show_thousands_separator = true
Show Thousands Seperator
Whether or not to show a thousands separator (shown depending on locale).
public SwatNumericEntry(string id)
Creates a new numeric entry widget
Sets the input size to 10 by default.
id - a non-visible unique id for this widget.protected array getCSSClassNames()
Gets the array of CSS classes that are applied to this entry
protected abstract mixed getNumericValue(string value)
Gets the numeric value of this widget
This allows each widget to parse raw values how they want to get numeric values.
value - the raw value to use to get the numeric value.protected SwatMessage getValidationMessage(string id)
Gets a validation message for this numeric entry
id - the string identifier of the validation message.public void process()
Checks the minimum and maximum values of this numeric entry widget
Base class for numeric entry widgets