silverorange Code


Swat.SwatNumericEntry
/Swat/SwatNumericEntry.php at line 15

Class SwatNumericEntry

SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatEntry
└─SwatNumericEntry

public abstract class SwatNumericEntry
extends SwatEntry

Base class for numeric entry widgets

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

Field Summary
double

$maximum_value

The largest valid number in this entry.

double

$minimum_value

The smallest valid number in this entry.

boolean

$show_thousands_separator

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

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.

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

Field Detail

/Swat/SwatNumericEntry.php at line 45

maximum_value

public double $maximum_value = null

The largest valid number in this entry

This is inclusive. If set to null, there is no maximum value.


/Swat/SwatNumericEntry.php at line 36

minimum_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.


/Swat/SwatNumericEntry.php at line 27

show_thousands_separator

public boolean $show_thousands_separator = true

Show Thousands Seperator

Whether or not to show a thousands separator (shown depending on locale).


Constructor Detail

/Swat/SwatNumericEntry.php at line 59

SwatNumericEntry

public SwatNumericEntry(string id)

Creates a new numeric entry widget

Sets the input size to 10 by default.

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

Method Detail

/Swat/SwatNumericEntry.php at line 170

getCSSClassNames

protected array getCSSClassNames()

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

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

/Swat/SwatNumericEntry.php at line 159

getNumericValue

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.

Parameters:
value - the raw value to use to get the numeric value.
Returns:
the numeric value of this entry widget or null if no numeric value is available.

/Swat/SwatNumericEntry.php at line 120

getValidationMessage

protected SwatMessage getValidationMessage(string id)

Gets a validation message for this numeric entry

See Also:
SwatEntry::getValidationMessage()
Parameters:
id - the string identifier of the validation message.
Returns:
the validation message.

/Swat/SwatNumericEntry.php at line 72

process

public void process()

Checks the minimum and maximum values of this numeric entry widget


silverorange Code