Class Index | File Index

Classes


Class dijit.HasDropDown


Defined in: _HasDropDown.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Mixin for widgets that need drop down ability.
Field Summary
Field Attributes Field Name and Description
<private>  
The node to display the popup around.
<private>  
Will set CSS class dijitUpArrow, dijitDownArrow, dijitRightArrow etc.
<private>  
The button/icon/node to click to display the drop down.
<private>  
The node to set the popupActive class on.
<private>  
When set to false, the click events will not be stopped, in case you want to use them in your subwidget
 
Set to true to make the drop down at least as wide as this widget.
 
The widget to display as a popup.
 
This variable controls the position of the drop down.
 
Set to true to make the drop down exactly as wide as this widget.
 
The max height for our dropdown.
Method Summary
Method Attributes Method Name and Description
<private>  
Callback when the user mousedown's on the arrow icon
<private>  
Callback when the user lifts their mouse after mouse down on the arrow icon.
<private>  
_onKey(e)
Callback when the user presses a key while focused on the button node
<private>  
set up nodes and connect our mouse and keypress events
 
Closes the drop down on this widget
 
Returns whether or not the dropdown is loaded.
 
loadDropDown(loadCallback)
Loads the data for the dropdown, and at some point, calls the given callback.
 
Opens the dropdown for this widget.
 
Toggle the drop-down widget; if it is up, close it, if not, open it.
Class Detail
dijit.HasDropDown()
Mixin for widgets that need drop down ability.
Field Detail
<private> {DomNode} _aroundNode
The node to display the popup around. Can be set via a dojoAttachPoint assignment. If missing, then domNode will be used.

<private> {DomNode} _arrowWrapperNode
Will set CSS class dijitUpArrow, dijitDownArrow, dijitRightArrow etc. on this node depending on where the drop down is set to be positioned. Can be set via a dojoAttachPoint assignment. If missing, then _buttonNode will be used.

<private> {DomNode} _buttonNode
The button/icon/node to click to display the drop down. Can be set via a dojoAttachPoint assignment. If missing, then either focusNode or domNode (if focusNode is also missing) will be used.

<private> {DomNode} _popupStateNode
The node to set the popupActive class on. Can be set via a dojoAttachPoint assignment. If missing, then focusNode or _buttonNode (if focusNode is missing) will be used.

<private> {Boolean} _stopClickEvents
When set to false, the click events will not be stopped, in case you want to use them in your subwidget

{Boolean} autoWidth
Set to true to make the drop down at least as wide as this widget. Set to false if the drop down should just be its default width

{dijit.Widget} dropDown
The widget to display as a popup. This widget *must* be defined before the startup function is called.

{String[]} dropDownPosition
This variable controls the position of the drop down. It's an array of strings with the following values: The list is positions is tried, in order, until a position is found where the drop down fits within the viewport.

{Boolean} forceWidth
Set to true to make the drop down exactly as wide as this widget. Overrides autoWidth.

{Integer} maxHeight
The max height for our dropdown. Set to 0 for no max height. any dropdown taller than this will have scrollbars
Method Detail
<private> _onDropDownMouseDown(e)
Callback when the user mousedown's on the arrow icon
Parameters:
{Event} e

<private> _onDropDownMouseUp(e)
Callback when the user lifts their mouse after mouse down on the arrow icon. If the drop is a simple menu and the mouse is over the menu, we execute it, otherwise, we focus our dropDown node. If the event is missing, then we are not a mouseup event. This is useful for the common mouse movement pattern with native browser <select> nodes:
  1. mouse down on the select node (probably on the arrow)
  2. move mouse to a menu item while holding down the mouse button
  3. mouse up. this selects the menu item as though the user had clicked it.
Parameters:
e

<private> _onKey(e)
Callback when the user presses a key while focused on the button node
Parameters:
{Event} e

<private> _setupDropdown()
set up nodes and connect our mouse and keypress events

closeDropDown(focus)
Closes the drop down on this widget
Parameters:
{Boolean} focus

{Boolean} isLoaded()
Returns whether or not the dropdown is loaded. This can be overridden in order to force a call to loadDropDown().
Returns:
{Boolean}

loadDropDown(loadCallback)
Loads the data for the dropdown, and at some point, calls the given callback.
Parameters:
{Function} loadCallback

{Object} openDropDown()
Opens the dropdown for this widget.
Returns:
{Object} return value of dijit.popup.open()

toggleDropDown()
Toggle the drop-down widget; if it is up, close it, if not, open it.

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Sep 20 2010 21:52:25 GMT+0900 (JST)