silverorange Code


Swat.SwatIntegerEntry
/Swat/SwatIntegerEntry.php at line 15

Class SwatIntegerEntry

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

public class SwatIntegerEntry
extends SwatNumericEntry

An integer entry widget

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

Fields inherited from Swat.SwatNumericEntry
maximum_value, minimum_value, show_thousands_separator
Fields inherited from Swat.SwatEntry
access_key, autocomplete, maxlength, minlength, nonce, read_only, size, tab_index, value
Fields inherited from Swat.SwatInputControl
required
Method Summary
protected array

getCSSClassNames()

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

protected string

getDisplayValue(string value)

Formats an integer value to display.

protected mixed

getNumericValue(string value)

Gets the numeric value of this widget.

protected SwatMessage

getValidationMessage(string id)

Gets a validation message for this integer entry.

void

process()

Checks to make sure value is an integer.

Methods inherited from Swat.SwatNumericEntry
getCSSClassNames, getNumericValue, getValidationMessage, process
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

Method Detail

/Swat/SwatIntegerEntry.php at line 156

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/SwatIntegerEntry.php at line 62

getDisplayValue

protected string getDisplayValue(string value)

Formats an integer value to display

Parameters:
value - the value to format for display.
Returns:
the formatted value.

/Swat/SwatIntegerEntry.php at line 92

getNumericValue

protected 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/SwatIntegerEntry.php at line 109

getValidationMessage

protected SwatMessage getValidationMessage(string id)

Gets a validation message for this integer entry

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

/Swat/SwatIntegerEntry.php at line 25

process

public void process()

Checks to make sure value is an integer

If the value of this widget is not an integer then an error message is attached to this widget.


silverorange Code