Class DateWidget
Object
|
+--DateWidget
- class DateWidget
Defined in DateWidget.js
Field Summary | |
Object |
day1 The currently selected low Day |
Object |
day2 The currently selected high Day |
Object |
dayHi The Day associated with the latest valid date. |
Object |
dayLo The Day associated with the earliest valid date. |
Object |
deltaMinutes The number of minutes between options in the Time selector. |
Object |
hour1 The currently selected low Hour |
Object |
hour2 The currently selected high Hour |
Object |
hourHi The Hour associated with the latest valid date. |
Object |
hourLo The Hour associated with the earliest valid date. |
Object |
minute1 The currently selected low Minute |
Object |
minute2 The currently selected high Minute |
Object |
minuteHi The Minute associated with the latest valid date. |
Object |
minuteLo The Minute associated with the earliest valid date. |
Object |
month1 The currently selected low Month |
Object |
month2 The currently selected high Month |
Object |
monthHi The Month associated with the latest valid date. |
Object |
monthLo The Month associated with the earliest valid date. |
Object |
offsetMinutes The number of minutes by which to offset the Time selector from "00:00:00". |
Object |
second1 The currently selected low Second |
Object |
second2 The currently selected high Second |
Object |
secondHi The Second associated with the latest valid date. |
Object |
secondLo The Second associated with the earliest valid date. |
Object |
widgetType The SlideSorter requires that each widget must have a type attribute identifying it. |
Object |
year1 The currently selected low Year |
Object |
year2 The currently selected high Year |
Object |
yearHi The Year associated with the latest valid date. |
Object |
yearLo The Year associated with the earliest valid date. |
Constructor Summary | |
DateWidget (<string> lo,<string> hi,deltaMinutes,<int> offsetMinutes,<int> add_sub_1,<int> add_sub_2) Constructs a new DateWidget object. |
Method Summary | |
void |
alert() Displays an alert box with the ascii representation of the DateWidget object. |
void |
disable() Disables all Select objects in the Widget. |
void |
enable() Enables all Select objects in the Widget. |
void |
flash(Menu) Flash a Select menu to indicate that it has been changed internally. |
string |
getDate1() Returns an ascii representation of Date1. |
string |
getDate1_Ferret() Returns an ascii representation of Date1 for use by Ferret. |
string |
getDate2() Returns an ascii representation of Date2. |
string |
getDate2_Ferret() Returns an ascii representation of Date2 for use by Ferret. |
string |
getDateHi() Returns an ascii representation of DateHi. |
string |
getDateLo() Returns an ascii representation of DateLo. |
string |
getValue() Returns an ascii representation of the entire DateWidget for use in building LASRequests with the ImageSlideSorter. |
void |
hide() Set's the Widget container's visibility to 'hidden' |
void |
render(<string> element_id,<string> menu_set_1,menu_set_2) Creates the table of menus associated with the DateWidget. |
void |
resetDate1() Resets Date1 to DateLo. |
void |
resetDate2() Resets Date2 to DateHi. |
void |
resetDateRange() Resets Date1 to DateLo. |
void |
selectChange(e) 'onchange' event handler for all DateWidget selectors. |
void |
selectDay(DayMenu) Method called by event handler for the 'Day1' and 'Day2' selectors. |
void |
selectMonth(MonthMenu) Method called by event handler for the 'Month1' and 'Month2' selectors. |
void |
selectTime(TimeMenu) Method called by event handler for the 'Time1' and 'Time2' selectors. |
void |
selectYear(YearMenu) Method called by event handler for the 'Year1' and 'Year2' selectors. |
void |
setCallback(callback) Attaches a callback function to the DateWidget that will be executed after every interaction with the widget. |
void |
setDate1(<string> String1,<int> add_sub_1) Sets the date to appear in the Date1 DateWidget. |
void |
setDate2(<string> String2,<int> add_sub_2) Resets the date to appear in the Date2 DateWidget. |
void |
setDateRange(<string> String1,<string> String2,<int> add_sub_1,<int> add_sub_2) Resets the valid date range to the specified values. |
void |
setDeltaMinutes(min) Sets the deltaMinutes property. |
void |
setOffsetMinutes(min) Sets the offsetMinutes property. |
string |
setValue(value,<int> index) Sets the value of the DateWidget. |
void |
show() Set's the Widget container's visibility to 'visible' |
string |
toString() Returns an ascii representation of the current state. |
Field Detail |
day1
Object day1
- The currently selected low Day
day2
Object day2
- The currently selected high Day
dayHi
Object dayHi
- The Day associated with the latest valid date.
dayLo
Object dayLo
- The Day associated with the earliest valid date.
deltaMinutes
Object deltaMinutes
- The number of minutes between options in the Time selector.
For example, setting deltaMinutes to 60 will result in the Time selector presenting an option for every hour, on the hour.
The default setting of 1440 (= 24 hours) shows only a single value of "00:00:00".
hour1
Object hour1
- The currently selected low Hour
hour2
Object hour2
- The currently selected high Hour
hourHi
Object hourHi
- The Hour associated with the latest valid date.
hourLo
Object hourLo
- The Hour associated with the earliest valid date.
minute1
Object minute1
- The currently selected low Minute
minute2
Object minute2
- The currently selected high Minute
minuteHi
Object minuteHi
- The Minute associated with the latest valid date.
minuteLo
Object minuteLo
- The Minute associated with the earliest valid date.
month1
Object month1
- The currently selected low Month
month2
Object month2
- The currently selected high Month
monthHi
Object monthHi
- The Month associated with the latest valid date.
monthLo
Object monthLo
- The Month associated with the earliest valid date.
offsetMinutes
Object offsetMinutes
- The number of minutes by which to offset the Time selector from "00:00:00".
- "00:30:00"
- "06:30:00"
- "12:30:00"
- "18:30:00"
For example, setting deltaMinutes to 360 and offsetMinutes to 30 will cause the Time selector to show the following values:
This may be useful for forecast data that is available at offsetMinutes after some regular interval.
second1
Object second1
- The currently selected low Second
second2
Object second2
- The currently selected high Second
secondHi
Object secondHi
- The Second associated with the latest valid date.
secondLo
Object secondLo
- The Second associated with the earliest valid date.
widgetType
Object widgetType
- The SlideSorter requires that each widget must have a type attribute identifying it.
year1
Object year1
- The currently selected low Year
year2
Object year2
- The currently selected high Year
yearHi
Object yearHi
- The Year associated with the latest valid date.
yearLo
Object yearLo
- The Year associated with the earliest valid date.
Constructor Detail |
DateWidget
DateWidget(<string> lo,<string> hi,deltaMinutes,<int> offsetMinutes,<int> add_sub_1,<int> add_sub_2)
- Constructs a new DateWidget object.
- Parameters:
lo
- end of the domain of valid times of the form 'YYYY-MM-DD [HH:mm:SS]'hi
- end of the domain of valid times of the form 'YYYY-MM-DD [HH:mm:SS]'offsetMinutes
- offset from 00:00:00 in the time selectoradd_sub_1
- minutes by which to adjust Date1add_sub_2
- minutes by which to adjust Date2deltaMintues
- interval in the time selector- Returns:
- new DateWidget object
Method Detail |
alert
void alert()
- Displays an alert box with the ascii representation of the DateWidget object.
disable
void disable()
- Disables all Select objects in the Widget.
enable
void enable()
- Enables all Select objects in the Widget.
flash
void flash(Menu)
- Flash a Select menu to indicate that it has been changed internally.
- Parameters:
Menu
- Select object that is being changedgetDate1
string getDate1()
- Returns an ascii representation of Date1.
Date1 is the lower of the user specified dates.
- Returns:
- date string in the form 'YYYY-MM-DD [HH:mm:SS]'
getDate1_Ferret
string getDate1_Ferret()
- Returns an ascii representation of Date1 for use by Ferret.
This is the format that the Ferret analysis and visualization tool requires.
- Returns:
- date string in the form 'DD-MMM-YYYY [HH:mm:SS]' (e.g. '15-JAN-2006 00:00:00')
getDate2
string getDate2()
- Returns an ascii representation of Date2.
Date2 is the higher of the user specified dates.
- Returns:
- date string in the form 'YYYY-MM-DD [HH:mm:SS]'
getDate2_Ferret
string getDate2_Ferret()
- Returns an ascii representation of Date2 for use by Ferret.
This is the format that the Ferret analysis and visualization tool requires.
- Returns:
- date string in the form 'DD-MMM-YYYY [HH:mm:SS]' (e.g. '15-JAN-2006 00:00:00')
getDateHi
string getDateHi()
- Returns an ascii representation of DateHi.
DateHi is the high end of the valid range of dates.
- Returns:
- date string in the form 'YYYY-MM-DD [HH:mm:SS]'
getDateLo
string getDateLo()
- Returns an ascii representation of DateLo.
DateLo is the low end of the valid range of dates.
- Returns:
- date string in the form 'YYYY-MM-DD [HH:mm:SS]'
getValue
string getValue()
- Returns an ascii representation of the entire DateWidget for use in building LASRequests with the ImageSlideSorter.
- Returns:
- Date1 and Date2 strings (separated by a comma) for use in an LASRequest
hide
void hide()
- Set's the Widget container's visibility to 'hidden'
render
void render(<string> element_id,<string> menu_set_1,menu_set_2)
- Creates the table of menus associated with the DateWidget.
Any children of element_id will be removed and replaced with a set of menus from the following collection: [Y]ear, [M]onth, [D]ay, [T]ime. The order in which these are specified determiens the order in which they appear in the interface.
If menu_set_2 is omitted, only a single set of menus will appear.
- Parameters:
element_id
- 'id' attribute of the element into which the menus are inserted.menu_set_1
- one or more of the characters 'YMDT', in any order, specifying which menus will be shown for Date1menu_set_1
- one or more of the characters 'YMDT', in any order, specifying which menus will be shown for Date2resetDate1
void resetDate1()
- Resets Date1 to DateLo.
resetDate2
void resetDate2()
- Resets Date2 to DateHi.
resetDateRange
void resetDateRange()
- Resets Date1 to DateLo. Resets Date2 to DateHi.
selectChange
void selectChange(e)
- 'onchange' event handler for all DateWidget selectors. This event handler tests for the 'id' of the Selector and then calls the appropriate selectYear(), selectMonth(), selectDay() or selectTime() method of the DateWidget.
- Parameters:
e
- eventselectDay
void selectDay(DayMenu)
- Method called by event handler for the 'Day1' and 'Day2' selectors.
- Parameters:
DayMenu
- document select object for dayselectMonth
void selectMonth(MonthMenu)
- Method called by event handler for the 'Month1' and 'Month2' selectors.
- Parameters:
MonthMenu
- document Select object for MonthselectTime
void selectTime(TimeMenu)
- Method called by event handler for the 'Time1' and 'Time2' selectors.
- Parameters:
TimeMenu
- document select object for timeselectYear
void selectYear(YearMenu)
- Method called by event handler for the 'Year1' and 'Year2' selectors.
- Parameters:
YearMenu
- document select object for yearsetCallback
void setCallback(callback)
- Attaches a callback function to the DateWidget that will be executed after every interaction with the widget.
- Parameters:
external
- callback functionsetDate1
void setDate1(<string> String1,<int> add_sub_1)
- Sets the date to appear in the Date1 DateWidget.
This need not be identical to the lowest valid date.
Frst the year is set and then the month and day selectors are re-initialized.
NOTE: If (! Date1 <= String1 <= Date2 ) this routine will not work properly. The internal logic will prevent this from happening but any resetting of dates from external javascript code should ALWAYS use setDateRange().
- Parameters:
String1
- Date1 date value of the form 'YYYY-MM-DD [HH:mm:SS]'add_sub_1
- minutes by which to adjust the datesetDate2
void setDate2(<string> String2,<int> add_sub_2)
- Resets the date to appear in the Date2 DateWidget.
This need not be identical to the highest valid date.
Frst the year is set and then the month and day selectors are re-initialized.
- Parameters:
String2
- Date2 date value of the form 'YYYY-MM-DD [HH:mm:SS]'add_sub_2
- minutes by which to adjust the datesetDateRange
void setDateRange(<string> String1,<string> String2,<int> add_sub_1,<int> add_sub_2)
- Resets the valid date range to the specified values.
Frst the years are set and then the month and day selectors are re-initialized.
- Parameters:
String1
- lo date value of the form 'YYYY-MM-DD [HH:mm:SS]'String2
- hi date value of the form 'YYYY-MM-DD [HH:mm:SS]'add_sub_1
- minutes to adjust if String1 is 'TODAY' or 'NOW'add_sub_2
- minutes to adjust if String2 is 'TODAY' or 'NOW'setDeltaMinutes
void setDeltaMinutes(min)
- Sets the deltaMinutes property.
- Parameters:
deltaMintues
- interval in the time selectorsetOffsetMinutes
void setOffsetMinutes(min)
- Sets the offsetMinutes property.
- Parameters:
offsetMinutes
- offset from 00:00:00 in the time selectorsetValue
string setValue(value,<int> index)
- Sets the value of the DateWidget.
- Parameters:
index
- [1 | 2] identifying which Date to set (optional)Date
- string- Returns:
- Date1 and Date2 strings (separated by a comma) for use in an LASRequest
show
void show()
- Set's the Widget container's visibility to 'visible'
toString
string toString()
- Returns an ascii representation of the current state.
- Returns:
- string ascii representation of DateWidget object