Last modified: Mon, 04/03/2017 - 17:29
API for the LongitudeWidget javascript component.
Class LongitudeWidget
Object | +--LongitudeWidget
- class LongitudeWidget
Defined in LongitudeWidget.js
Field Summary | |
Object | callback Callback function attached to the onChange event. |
Object | delta Spacing beteen Select options (decimal degrees) |
Object | disabled Specifies whether this widget is currently disabled. |
Object | hi Highest value displayed in the Select menu. |
Object | length Number of Options in the Select menu. |
Object | lo Lowest value displayed in the Select menu. |
Object | type Select object type ['select-one' | 'select-multiple'] (currently only 'select-one' is supported) |
Object | visible Specifies whether this widget is currently visible. |
Object | widgetType ID string identifying this widget. |
Constructor Summary | |
LongitudeWidget (<float> lo, <float> hi, <float> delta) |
Method Summary | |
void | disable() Disables the Menu widget. |
void | enable() Enables the Menu widget. |
int | getSelectedIndex() Returns the selectedIndex of this LongitudeWidget when it is of type 'select-one'. |
string | getValue() Returns the selected value associated with a LongitudeWidget of type 'select-one'. |
string | getValues() Returns the selected values associated with a LongitudeWidget of type 'select-multiple'. |
void | hide() Set's the Widget container's visibility to 'hidden' |
void | render(<string> element_id,<string> type) Creates the javascript Select object associated with the LongitudeWidget inside the named DOM element. |
void | setCallback(callback) Sets the callback function to be attached to onChange events. |
void | setValue(lon) Sets the selected option of the Select menu to the value. |
void | setValueByIndex(<int> index) Sets the selected Option. |
void | show() Set's the Widget container's visibility to 'visible' |
Field Detail |
callback
Object callback
- Callback function attached to the onChange event.
delta
Object delta
- Spacing beteen Select options (decimal degrees)
disabled
Object disabled
- Specifies whether this widget is currently disabled.
hi
Object hi
- Highest value displayed in the Select menu.
length
Object length
- Number of Options in the Select menu.
lo
Object lo
- Lowest value displayed in the Select menu.
type
Object type
- Select object type ['select-one' | 'select-multiple'] (currently only 'select-one' is supported)
visible
Object visible
- Specifies whether this widget is currently visible.
widgetType
Object widgetType
- ID string identifying this widget.
Constructor Detail |
LongitudeWidget
LongitudeWidget(<float> lo, <float> hi, <float> delta)
- Parameters:
lo
- end of the domain of valid longitudes in decimal degrees hi
- end of the domain of valid longitudes in decimal degrees delta
- interval between longitudes in decimal degrees
- Returns:
- new LongitudeWidget object
Method Detail |
disable
void disable()
- Disables the Menu widget.
enable
void enable()
- Enables the Menu widget.
getSelectedIndex
int getSelectedIndex()
- Returns the selectedIndex of this LongitudeWidget when it is of type 'select-one'.
getValue
string getValue()
- Returns the selected value associated with a LongitudeWidget of type 'select-one'.
getValues
string getValues()
- Returns the selected values associated with a LongitudeWidget of type 'select-multiple'.
hide
void hide()
- Set's the Widget container's visibility to 'hidden'
render
void render(<string> element_id,<string> type)
- Creates the javascript Select object associated with the LongitudeWidget inside the named DOM element.
Any children of element_id will be removed and replaced with a Select object
- Parameters:
element_id
- 'id' attribute of the element into which the Select is inserted. type
- javascript Select type ['select-one' | 'select-multiple'] TODO: For now only supports 'select-one'. setCallback
void setCallback(callback)
- Sets the callback function to be attached to onChange events.
- Parameters:
function
- name setValue
void setValue(lon)
- Sets the selected option of the Select menu to the value. closest to the incoming value.
- Parameters:
lat
- numeric value to be selected setValueByIndex
void setValueByIndex(<int> index)
- Sets the selected Option.
- Parameters:
index
- index into the Options array [0
- Throws:
- - 'ERROR: LongitudeWidgetsetValueByIndex: index [...] does not match any options.'
show
void show()
- Set's the Widget container's visibility to 'visible'
Documentation generated by JSDoc on Sat Jul 28 07:25:06 2007