|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DragController
Common interface which all drag controllers must implement.
Method Summary | |
---|---|
void |
addDragHandler(DragHandler handler)
Register a drag handler which will listen for DragStartEvents and and
DragEndEvents . |
void |
clearSelection()
All currently selected widgets are deselected. |
void |
dragEnd()
Callback method for MouseDragHandler . |
void |
dragMove()
Callback method for MouseDragHandler . |
void |
dragStart()
Callback method for MouseDragHandler when a drag operation is initiated for this drag
controller. |
boolean |
getBehaviorCancelDocumentSelections()
Whether or not any selected regions should be unselected by dragging. |
boolean |
getBehaviorConstrainedToBoundaryPanel()
Determine whether or not drag operations are constrained to the boundary panel. |
int |
getBehaviorDragStartSensitivity()
Gets the number of pixels the mouse must be moved to initiate a drag operation. |
boolean |
getBehaviorMultipleSelection()
Determines whether multiple widget selection behavior is enabled. |
boolean |
getBehaviorScrollIntoView()
Determines whether containing panels and the browser window should be scrolled during dragging in order to keep draggable widgets visible. |
com.google.gwt.user.client.ui.AbsolutePanel |
getBoundaryPanel()
Get the boundary panel provided in the constructor. |
void |
makeDraggable(com.google.gwt.user.client.ui.Widget draggable)
Enable dragging on widget. |
void |
makeDraggable(com.google.gwt.user.client.ui.Widget draggable,
com.google.gwt.user.client.ui.Widget dragHandle)
Enable dragging on widget, specifying the child widget serving as a drag handle. |
void |
makeNotDraggable(com.google.gwt.user.client.ui.Widget widget)
Performs the reverse of makeDraggable(Widget) , making the widget no longer draggable
by this drag controller. |
void |
previewDragEnd()
Callback method for MouseDragHandler . |
void |
previewDragStart()
Callback method for MouseDragHandler . |
void |
removeDragHandler(DragHandler handler)
Unregister drag handler. |
void |
resetCache()
Reset the internal drop controller (drop target) cache which is initialized primarily by AbstractDragController.dragStart() . |
void |
setBehaviorCancelDocumentSelections(boolean cancelDocumentSelections)
Set whether or not document selections should be canceled by dragging. |
void |
setBehaviorConstrainedToBoundaryPanel(boolean constrainedToBoundaryPanel)
Set whether or not movable widget is to be constrained to the boundary panel during dragging. |
void |
setBehaviorDragStartSensitivity(int pixels)
Sets the number of pixels the mouse must be moved in either horizontal or vertical direction in order to initiate a drag operation. |
void |
setBehaviorMultipleSelection(boolean multipleSelectionAllowed)
Sets whether multiple widgets can be selected for dragging at one time via CTRL /
META -click. |
void |
setBehaviorScrollIntoView(boolean scrollIntoView)
Set whether or not to scroll containing panels and the browser window during drag operations in order to keep the draggable widgets visible. |
void |
toggleSelection(com.google.gwt.user.client.ui.Widget draggable)
Toggle the selection of the specified widget. |
Method Detail |
---|
void addDragHandler(DragHandler handler)
DragStartEvents
and and
DragEndEvents
.
addDragHandler
in interface FiresDragEvents
handler
- the drag handler to registerremoveDragHandler(DragHandler)
void clearSelection()
void dragEnd()
MouseDragHandler
.
void dragMove()
MouseDragHandler
.
void dragStart()
MouseDragHandler
when a drag operation is initiated for this drag
controller.
boolean getBehaviorCancelDocumentSelections()
true
if cancel selections behavior in onboolean getBehaviorConstrainedToBoundaryPanel()
true
if drags are constrained to the boundary panelint getBehaviorDragStartSensitivity()
0
(zero) if mouse down starts the dragboolean getBehaviorMultipleSelection()
true
if multiple widget selection behavior is enabledboolean getBehaviorScrollIntoView()
true
if containing panels and the browser window are to be scrolled during
dragging to keep draggable widgets visiblecom.google.gwt.user.client.ui.AbsolutePanel getBoundaryPanel()
void makeDraggable(com.google.gwt.user.client.ui.Widget draggable)
draggable
- the widget to be made draggablevoid makeDraggable(com.google.gwt.user.client.ui.Widget draggable, com.google.gwt.user.client.ui.Widget dragHandle)
draggable
- the widget to be made draggabledragHandle
- the widget by which widget can be draggedvoid makeNotDraggable(com.google.gwt.user.client.ui.Widget widget)
makeDraggable(Widget)
, making the widget no longer draggable
by this drag controller.
widget
- the widget which should no longer be draggablevoid previewDragEnd() throws VetoDragException
MouseDragHandler
.
VetoDragException
- if the proposed operation is unacceptablevoid previewDragStart() throws VetoDragException
MouseDragHandler
.
VetoDragException
- if the proposed operation is unacceptablevoid removeDragHandler(DragHandler handler)
removeDragHandler
in interface FiresDragEvents
handler
- the drag handler to removeaddDragHandler(DragHandler)
void resetCache()
AbstractDragController.dragStart()
. This method should be called when a drop target's
size and/or location changes, or when drop target eligibility changes.
void setBehaviorCancelDocumentSelections(boolean cancelDocumentSelections)
true
.
cancelDocumentSelections
- true
if dragging should cancel document selectionsvoid setBehaviorConstrainedToBoundaryPanel(boolean constrainedToBoundaryPanel)
constrainedToBoundaryPanel
- whether or not to constrain to the boundary panelvoid setBehaviorDragStartSensitivity(int pixels)
0
(zero). Use a value of at least
1
(one) in order to allow registered click listeners to receive click events.
pixels
- number of pixels or 0
(zero) to start dragging on mouse downvoid setBehaviorMultipleSelection(boolean multipleSelectionAllowed)
CTRL
/
META
-click. Defaults to true
.
multipleSelectionAllowed
- whether multiple selections are enabledvoid setBehaviorScrollIntoView(boolean scrollIntoView)
true
.
scrollIntoView
- whether or not to scroll panels and browser window to keep draggable
widgets visiblevoid toggleSelection(com.google.gwt.user.client.ui.Widget draggable)
draggable
- the widget whose selection is to be toggled
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |