| Previous | Next | Frames | No Frames |
| Summary: Field | Property | Contructor | Method | Detail: Field | Property | Contructor | Method |
Object | +--xp.system.TreeDragManager
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 | |
| 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. |
| public var dragContext |
| A drag context object |
| public var dragRow |
| Our draggable row object that we are managing |
| 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. |
| public var dropContext |
| A drag context object |
| public var isDragging |
| Are we currently dragging |
|
| Constructs a new instance of the TreeDragManager |
|
| Activates the DragManager | |||
|
|
| Deactivates the DragManager Turns off dragging support and stops all dragging in process. |
|
| Get a shared instance of the TreeDragManager |
|
| 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. |
|
| 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. | |||
|
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.