|
|
|
_addItemClass(
node
: Node
type
: String
) :
void
Adds a class with prefix "dojoDndItem"
Parameter |
Type |
Usage |
Description |
node |
Node |
required |
A node |
type |
String |
required |
A variable suffix for a class name |
|
|
|
|
_changeState(
type
: String
newState
: String
) :
void
Changes a named state to new state value
Parameter |
Type |
Usage |
Description |
type |
String |
required |
A name of the state to change |
newState |
String |
required |
new state |
|
|
|
|
_isParentChildDrop(
source
: The
targetRow
: The
) :
void
Checks whether the dragged items are parent rows in the tree which are being
dragged into their own children.
Parameter |
Type |
Usage |
Description |
source |
The |
required |
DragSource object. |
targetRow |
The |
required |
tree row onto which the dragged nodes are being dropped. |
|
|
|
|
_markDndStatus(
copy
) :
void
Changes source's state based on "copy" status
Parameter |
Type |
Usage |
Description |
copy |
|
required |
|
|
|
|
|
_onDragMouse(
e
) :
void
Helper method for processing onmousemove/onmouseover events while drag is in progress.
Keeps track of current drop target.
Parameter |
Type |
Usage |
Description |
e |
|
required |
|
|
|
|
|
_removeAnchor(
) :
void
Removes the Anchor CSS class from a node.
According to dojo.dnd.Selector , anchor means that
"an item is selected, and is an anchor for a 'shift' selection".
It's not relevant for Tree at this point, since we don't support multiple selection.
|
|
|
|
_removeItemClass(
node
: Node
type
: String
) :
void
Removes a class with prefix "dojoDndItem"
Parameter |
Type |
Usage |
Description |
node |
Node |
required |
A node |
type |
String |
required |
A variable suffix for a class name |
|
|
|
|
_removeSelection(
) :
void
|
|
|
|
_unmarkTargetAnchor(
) :
void
Removes hover class of the current target anchor
|
|
|
|
checkAcceptance(
source
: dijit.tree.dndSource
nodes
: DOMNode[]
) :
void
Checks if the target can accept nodes from this source
Parameter |
Type |
Usage |
Description |
source |
dijit.tree.dndSource |
required |
The source which provides items |
nodes |
DOMNode[] |
required |
Array of DOM nodes corresponding to nodes being dropped, dijitTreeRow nodes if
source is a dijit.Tree. |
|
|
|
|
checkItemAcceptance(
target
: DOMNode
source
: dijit.tree.dndSource
position
: String
) :
void
Stub function to be overridden if one wants to check for the ability to drop at the node/item level
In the base case, this is called to check if target can become a child of source.
When betweenThreshold is set, position="before" or "after" means that we
are asking if the source node can be dropped before/after the target node.
Parameter |
Type |
Usage |
Description |
target |
DOMNode |
required |
The dijitTreeRoot DOM node inside of the TreeNode that we are dropping on to
Use dijit.getEnclosingWidget(target) to get the TreeNode. |
source |
dijit.tree.dndSource |
required |
The (set of) nodes we are dropping |
position |
String |
required |
"over", "before", or "after" |
|
|
|
|
constructor(
tree
: dijit.Tree
params
: dijit.tree.__SourceArgs
) :
void
a constructor of the Tree DnD Source
Parameter |
Type |
Usage |
Description |
tree |
dijit.Tree |
required |
|
params |
dijit.tree.__SourceArgs |
required |
|
|
|
|
|
copyState(
keyPressed
: Boolean
) :
void
Returns true, if we need to copy items, false to move.
It is separated to be overwritten dynamically, if needed.
Parameter |
Type |
Usage |
Description |
keyPressed |
Boolean |
required |
The "copy" control key was pressed |
|
|
|
|
destroy(
) :
void
Prepares the object to be garbage-collected.
|
|
|
|
forInSelectedItems(
f
: Function
o
: Object
) :
void
Iterates over selected items;
see dojo.dnd.Container.forInItems() for details
Parameter |
Type |
Usage |
Description |
f |
Function |
required |
|
o |
Object |
optional |
|
|
|
|
|
getItem(
key
: String
) :
void
Returns the dojo.dnd.Item (representing a dragged node) by it's key (id).
Called by dojo.dnd.Source.checkAcceptance().
Parameter |
Type |
Usage |
Description |
key |
String |
required |
|
|
|
|
|
getSelectedNodes(
) :
void
Returns the set of selected nodes.
Used by dndSource on the start of a drag.
|
|
|
|
itemCreator(
nodes
: DomNode[]
target
source
: dojo.dnd.Source
) :
void
Returns objects passed to Tree.model.newItem() based on DnD nodes
dropped onto the tree. Developer must override this method to enable
dropping from external sources onto this Tree, unless the Tree.model's items
For each node in nodes[], which came from source, create a hash of name/value
pairs to be passed to Tree.model.newItem(). Returns array of those hashes.
Parameter |
Type |
Usage |
Description |
nodes |
DomNode[] |
required |
|
target |
|
required |
|
source |
dojo.dnd.Source |
required |
|
|
|
|
|
onDndCancel(
) :
void
Topic event processor for /dnd/cancel, called to cancel the DnD operation
|
|
|
|
onDndDrop(
source
: Object
nodes
: DomNode[]
copy
: Boolean
) :
void
Topic event processor for /dnd/drop, called to finish the DnD operation.
Updates data store items according to where node was dragged from and dropped
to. The tree will then respond to those data store updates and redraw itself.
Parameter |
Type |
Usage |
Description |
source |
Object |
required |
The dijit.tree.dndSource / dojo.dnd.Source which is providing the items |
nodes |
DomNode[] |
required |
The list of transferred items, dndTreeNode nodes if dragging from a Tree |
copy |
Boolean |
required |
Copy items, if true, move items otherwise |
|
|
|
|
onDndSourceOver(
source
: Object
) :
void
Topic event processor for /dnd/source/over, called when detected a current source.
Parameter |
Type |
Usage |
Description |
source |
Object |
required |
The dijit.tree.dndSource / dojo.dnd.Source which has the mouse over it |
|
|
|
|
onDndStart(
source
: Object
nodes
: DomNode[]
copy
: Boolean
) :
void
Topic event processor for /dnd/start, called to initiate the DnD operation
Parameter |
Type |
Usage |
Description |
source |
Object |
required |
The dijit.tree.dndSource / dojo.dnd.Source which is providing the items |
nodes |
DomNode[] |
required |
The list of transferred items, dndTreeNode nodes if dragging from a Tree |
copy |
Boolean |
required |
Copy items, if true, move items otherwise |
|
|
|
|
onMouseDown(
e
: Event
) :
void
Event processor for onmousedown
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
onmousedown event |
|
|
|
|
onMouseMove(
e
: Event
) :
void
Called for any onmousemove events over the Tree
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
onmousemouse event |
|
|
|
|
onMouseOut(
) :
void
Event processor for when mouse is moved away from a TreeNode
|
|
|
|
onMouseOver(
widget
: TreeNode
evt
: Event
) :
void
Called when mouse is moved over a TreeNode
Parameter |
Type |
Usage |
Description |
widget |
TreeNode |
required |
|
evt |
Event |
required |
|
|
|
|
|
onMouseUp(
e
: Event
) :
void
Event processor for onmouseup
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
onmouseup event |
|
|
|
|
onOutEvent(
) :
void
This method is called when mouse is moved out of our container (like onmouseleave)
|
|
|
|
onOverEvent(
) :
void
This method is called when mouse is moved over our container (like onmouseenter)
|
|
|
|
selectNone(
) :
void
|