SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatTimeZoneEntry
public class SwatTimeZoneEntry
extends SwatInputControl
| Field Summary | |
|---|---|
| string | Time-zone identifier. |
| Fields inherited from Swat.SwatInputControl | |
|---|---|
| required | |
| Constructor Summary | |
|---|---|
SwatTimeZoneEntry(string id) Creates a new time-zone selector widget. |
|
| Method Summary | |
|---|---|
| protected void | Creates all internal widgets required for this time-zone entry. |
| void | display() Displays this time-zone entry widget. |
| private string | getArea(string time_zone) Gets an area from a time-zone identifier. |
| protected array | Gets the array of CSS classes that are applied to this time zone entry widget. |
| private string | getRegion(string time_zone) Gets a region from a time-zone identifier. |
| private string | getRegionTitle(string region) Gets a formatted region title from the region part of a time-zone identifier. |
| string | getState() Gets the current state of this time-zone entry widget. |
| private array | parseAreaWhitelist(array area_whitelist) Parses a whitelist of valid areas. |
| void | process() Processes this time-zone entry widget. |
| private void | setAreas(array time_zone_list) Sets areas. |
| private void | setRegions(array regions, string area) Builds the internal array of SwatOptions for the specified regions. |
| void | setState(string state) Sets the current state of this time-zone entry widget. |
| 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 string $value = null
Time-zone identifier
The id of the selected time-zone.
public SwatTimeZoneEntry(string id)
Creates a new time-zone selector widget
id - a non-visible unique id for this widget.protected void createCompositeWidgets()
Creates all internal widgets required for this time-zone entry
public void display()
Displays this time-zone entry widget
Outputs a cascading list of time-zones.
private string getArea(string time_zone)
Gets an area from a time-zone identifier
Returns the area part of a full time-zone.
time_zone - the time-zone identifier to get the area from.protected array getCSSClassNames()
Gets the array of CSS classes that are applied to this time zone entry widget
private string getRegion(string time_zone)
Gets a region from a time-zone identifier
time_zone - the time-zone identifier from which to get the region.private string getRegionTitle(string region)
Gets a formatted region title from the region part of a time-zone identifier
region - the region part of the time-zone identifier.public string getState()
Gets the current state of this time-zone entry widget
private array parseAreaWhitelist(array area_whitelist)
Parses a whitelist of valid areas
Filters the full list of areas down to a select list and returns a tree-structured array of areas, regions, and subregions.
area_whitelist - an array of valid area names.public void process()
Processes this time-zone entry widget
If any validation type errors occur, an error message is attached to this entry widget.
private void setAreas(array time_zone_list)
Sets areas
Builds the class variable array $areas.
time_zone_list - a tree structured array of areas and regions.private void setRegions(array regions, string area)
Builds the internal array of SwatOptions for the specified
regions
regions - an array of regions.area - the region's area.public void setState(string state)
Sets the current state of this time-zone entry widget
state - the new state of this time-zone entry widget.
A time-zone selection widget