|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.allen_sauer.gwt.dnd.client.AbstractDragController
com.allen_sauer.gwt.dnd.client.PickupDragController
public class PickupDragController
| Field Summary |
|---|
| Fields inherited from class com.allen_sauer.gwt.dnd.client.AbstractDragController |
|---|
context |
| Constructor Summary | |
|---|---|
PickupDragController(com.google.gwt.user.client.ui.AbsolutePanel boundaryPanel,
boolean allowDroppingOnBoundaryPanel)
Create a new pickup-and-move style drag controller. |
|
| Method Summary | |
|---|---|
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 |
getBehaviorBoundaryPanelDrop()
Whether or not dropping on the boundary panel is permitted. |
boolean |
getBehaviorDragProxy()
Determine whether or not this controller automatically creates a drag proxy for each drag operation. |
protected com.google.gwt.user.client.ui.Widget |
getDragProxy()
|
protected java.util.ArrayList<DropController> |
getDropControllerList()
|
java.lang.Iterable<com.google.gwt.user.client.ui.Widget> |
getSelectedWidgets()
Retrieve currently selected widgets. |
protected BoundaryDropController |
newBoundaryDropController(com.google.gwt.user.client.ui.AbsolutePanel boundaryPanel,
boolean allowDroppingOnBoundaryPanel)
Create a new BoundaryDropController to manage our boundary panel as a drop target. |
protected com.google.gwt.user.client.ui.Widget |
newDragProxy(DragContext context)
Called by dragStart() to allow subclasses to provide their own
drag proxies. |
void |
previewDragEnd()
Callback method for MouseDragHandler. |
void |
registerDropController(DropController dropController)
Register a new DropController, representing a new drop target, with this drag controller. |
void |
resetCache()
Reset the internal drop controller (drop target) cache which is initialized primarily by AbstractDragController.dragStart(). |
protected void |
restoreSelectedWidgetsLocation()
Restore the selected widgets to their original location. |
protected void |
restoreSelectedWidgetsStyle()
Restore the selected widgets with their original style. |
protected void |
restoreWidgetLocation(com.google.gwt.user.client.ui.Widget widget,
SavedWidgetInfo info)
|
protected void |
saveSelectedWidgetsLocationAndStyle()
Save the selected widgets' current location in case they much be restored due to a cancelled drop. |
protected SavedWidgetInfo |
saveWidget(com.google.gwt.user.client.ui.Widget widget)
|
void |
setBehaviorBoundaryPanelDrop(boolean allowDroppingOnBoundaryPanel)
Set whether or not widgets may be dropped anywhere on the boundary panel. |
void |
setBehaviorDragProxy(boolean dragProxyEnabled)
Set whether or not this controller should automatically create a drag proxy for each drag operation. |
void |
unregisterDropController(DropController dropController)
Unregister a DropController from this drag controller. |
void |
unregisterDropControllers()
Unregister all DropControllers from this drag controller. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PickupDragController(com.google.gwt.user.client.ui.AbsolutePanel boundaryPanel,
boolean allowDroppingOnBoundaryPanel)
Note: An implicit BoundaryDropController is created and registered automatically.
boundaryPanel - the desired boundary panel or RootPanel.get() (read
http://code.google.com/p/gwt-dnd/wiki/GettingStarted) if entire document body is to be
the boundaryallowDroppingOnBoundaryPanel - whether or not boundary panel should allow dropping| Method Detail |
|---|
public void dragEnd()
DragControllerMouseDragHandler.
dragEnd in interface DragControllerdragEnd in class AbstractDragControllerpublic void dragMove()
DragControllerMouseDragHandler.
public void dragStart()
DragControllerMouseDragHandler when a drag operation is initiated for this drag
controller.
dragStart in interface DragControllerdragStart in class AbstractDragControllerpublic boolean getBehaviorBoundaryPanelDrop()
true if dropping on the boundary panel is allowedpublic boolean getBehaviorDragProxy()
true if drag proxy behavior is enabledpublic java.lang.Iterable<com.google.gwt.user.client.ui.Widget> getSelectedWidgets()
public void previewDragEnd()
throws VetoDragException
DragControllerMouseDragHandler.
previewDragEnd in interface DragControllerpreviewDragEnd in class AbstractDragControllerVetoDragException - if the proposed operation is unacceptablepublic void registerDropController(DropController dropController)
dropController - the controller to registerunregisterDropController(DropController)public void resetCache()
DragControllerAbstractDragController.dragStart(). This method should be called when a drop target's
size and/or location changes, or when drop target eligibility changes.
resetCache in interface DragControllerresetCache in class AbstractDragControllerpublic void setBehaviorBoundaryPanelDrop(boolean allowDroppingOnBoundaryPanel)
false when you only want explicitly registered drop controllers to accept drops.
Defaults to true.
allowDroppingOnBoundaryPanel - true to allow droppingpublic void setBehaviorDragProxy(boolean dragProxyEnabled)
dragProxyEnabled - true to enable drag proxy behaviorpublic void unregisterDropController(DropController dropController)
dropController - the controller to registerregisterDropController(DropController),
unregisterDropControllers()public void unregisterDropControllers()
registerDropController(DropController),
unregisterDropController(DropController)
protected BoundaryDropController newBoundaryDropController(com.google.gwt.user.client.ui.AbsolutePanel boundaryPanel,
boolean allowDroppingOnBoundaryPanel)
allowDroppingOnBoundaryPanel to false.
boundaryPanel - the panel to which our drag-and-drop operations are constrainedallowDroppingOnBoundaryPanel - whether or not dropping is allowed on the boundary panel
protected com.google.gwt.user.client.ui.Widget newDragProxy(DragContext context)
dragStart() to allow subclasses to provide their own
drag proxies.
context - the current drag context
protected void restoreSelectedWidgetsLocation()
saveSelectedWidgetsLocationAndStyle(),
restoreSelectedWidgetsStyle()protected void restoreSelectedWidgetsStyle()
saveSelectedWidgetsLocationAndStyle(),
restoreSelectedWidgetsLocation()protected void saveSelectedWidgetsLocationAndStyle()
restoreSelectedWidgetsLocation()
protected void restoreWidgetLocation(com.google.gwt.user.client.ui.Widget widget,
SavedWidgetInfo info)
protected SavedWidgetInfo saveWidget(com.google.gwt.user.client.ui.Widget widget)
protected java.util.ArrayList<DropController> getDropControllerList()
protected com.google.gwt.user.client.ui.Widget getDragProxy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||