Main Page | Packages | Class Tree | Index | Help

xp.system

class TreeDragManager

Object
  |
  +--xp.system.TreeDragManager


class TreeDragManager
extends Object

Manages dragging a tree node

Creates, displays and tracks the drag row and the actions to take when it is dropped on a target.
A tree activates dragging by calling the activate method passing a dragContext object. Draging does not start immediatley but waits for an period of tiem. If the mouse remains down at the end of that period then draggin starts.
When a draggable rwo is dragged over another tree or row drop target support is activate by calling onDragOver.
This activates the autoOpen feature, a node will open if the mosue is held over it for a period of time, also it activates autoScroll if the mouse is held over the top or bottom row or the sides of the tree the tree will scroll in the relevant direction.


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public static
AUTOSCROLL_EDGE_SENSE: Number
Controls the dimension of the area used to determine if the list should be autoscrolled

public
dragContext
A drag context object

public
dragRow
Our draggable row object that we are managing

public static
DROP_BAND_HEIGHT: Number
Controls the height of the band used to "sense" whether droping before or after a row

public
dropContext
A drag context object

public
isDragging
Are we currently dragging

Constructor

public
TreeDragManager ( )
Constructs a new instance of the TreeDragManager

Method Summary

public
activate ( context: Object ): Void
Activates the DragManager

public
deactivate ( ): Void
Deactivates the DragManager Turns off dragging support and stops all dragging in process.

public static
getInstance ( ): TreeDragManager
Get a shared instance of the TreeDragManager

public
onDragOut ( ): Void
Handles the onDragOut event

public
onDragOver ( context: Object ): Void
Handles the onDragOver event



Field Documentation

AUTOSCROLL_EDGE_SENSE

public static var AUTOSCROLL_EDGE_SENSE: Number
Controls the dimension of the area used to determine if the list should be autoscrolled

When the mouse is placed over the list and within the edge sense area the list wil scroll automatically. This dimenision is in pixels.

dragContext

public var dragContext
A drag context object

dragRow

public var dragRow
Our draggable row object that we are managing

DROP_BAND_HEIGHT

public static var DROP_BAND_HEIGHT: Number
Controls the height of the band used to "sense" whether droping before or after a row

The height in pixels of the area of a row that is used to sense whether to drop before or after the row. The standard height of a row is 21 pixels. The default band height is 3 pixels. That gives three segments, the top 3 pixels for drop before, 15 pixels for drop over and 3 pixels for drop after.

dropContext

public var dropContext
A drag context object

isDragging

public var isDragging
Are we currently dragging


Constructor Documentation

TreeDragManager

public function TreeDragManager()
Constructs a new instance of the TreeDragManager


Method Documentation

activate

public function activate(context: Object): Void
Activates the DragManager

Parameters:
context
A DragContext object. An object with the properties: tree - The TreeView object that is activating drag support row - The row object that is to be dragged

deactivate

public function deactivate(): Void
Deactivates the DragManager Turns off dragging support and stops all dragging in process.

getInstance

public static function getInstance(): TreeDragManager
Get a shared instance of the TreeDragManager

onDragOut

public function onDragOut(): Void
Handles the onDragOut event

When a drag row is dragged over and out of a TreeView cell this event handler is called
This deactivates drop target support on the target tree.

onDragOver

public function onDragOver(context: Object): Void
Handles the onDragOver event

When a drag row is dragged over a TreeView this event handler is called
This activates drop target support on the target tree.

Parameters:
context
The dropContext object - An object with the properties: tree - The TreeView object that has been dragged over and is activating drop support row - The row dragged over i.e. the drop target bounds - The bounds of the row

The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc