ch.unifr.pai.twice.dragndrop.client.intf
Class DropTargetHandlerAdapter
java.lang.Object
ch.unifr.pai.twice.dragndrop.client.intf.DropTargetHandlerAdapter
- All Implemented Interfaces:
- DropTargetHandler
- Direct Known Subclasses:
- HighlightDropTargetHandler
public class DropTargetHandlerAdapter
- extends java.lang.Object
- implements DropTargetHandler
An adapter of the DropTargetHandler
providing typical standard implementations and values
- Author:
- Oliver Schmid
Method Summary |
DropTargetHandlerFactory.Priority |
getPriority()
|
boolean |
onDrop(java.lang.String deviceId,
com.google.gwt.user.client.ui.Widget widget,
com.google.gwt.dom.client.Element dragProxy,
com.google.gwt.user.client.Event event,
java.lang.Double intersectionPercentage,
java.lang.Double intersectionPercentageWithTarget)
Invoked when a widget is dropped above the drop target |
void |
onHover(java.lang.String deviceId,
com.google.gwt.user.client.ui.Widget widget,
com.google.gwt.dom.client.Element dragProxy,
com.google.gwt.user.client.Event event,
java.lang.Double intersectionPercentage,
java.lang.Double intersectionPercentageWithTarget)
Invoked when a widget hovers the drop target |
void |
onHoverEnd(java.lang.String deviceId,
com.google.gwt.user.client.ui.Widget widget,
com.google.gwt.dom.client.Element dragProxy,
com.google.gwt.user.client.Event event)
Invoked when a widget leaves the region of the drop target |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
p
private DropTargetHandlerFactory.Priority p
DropTargetHandlerAdapter
public DropTargetHandlerAdapter()
DropTargetHandlerAdapter
public DropTargetHandlerAdapter(DropTargetHandlerFactory.Priority p)
getPriority
public DropTargetHandlerFactory.Priority getPriority()
- Specified by:
getPriority
in interface DropTargetHandler
- Returns:
- the
DropTargetHandlerFactory.Priority
of the drop target
onDrop
public boolean onDrop(java.lang.String deviceId,
com.google.gwt.user.client.ui.Widget widget,
com.google.gwt.dom.client.Element dragProxy,
com.google.gwt.user.client.Event event,
java.lang.Double intersectionPercentage,
java.lang.Double intersectionPercentageWithTarget)
- Description copied from interface:
DropTargetHandler
- Invoked when a widget is dropped above the drop target
- Specified by:
onDrop
in interface DropTargetHandler
- Parameters:
deviceId
- - the identifier of the device that triggered the dropwidget
- - the widget which is dragged (this is the original widget and not the dragging proxy!)dragProxy
- - the HTML element of the proxyevent
- - the event that has caused the invocation of the onEndOfDrop (e.g. a mouse up event)intersectionPercentage
- - the percentage of intersection with the drop target
- Returns:
- true if the drop shall be accepted, false if the drop shall be rejected
onHover
public void onHover(java.lang.String deviceId,
com.google.gwt.user.client.ui.Widget widget,
com.google.gwt.dom.client.Element dragProxy,
com.google.gwt.user.client.Event event,
java.lang.Double intersectionPercentage,
java.lang.Double intersectionPercentageWithTarget)
- Description copied from interface:
DropTargetHandler
- Invoked when a widget hovers the drop target
- Specified by:
onHover
in interface DropTargetHandler
- Parameters:
deviceId
- - the identifier of the device that triggered the dropwidget
- - the widget which is dragged (this is the original widget and not the dragging proxy!)dragProxy
- - the HTML element of the proxyevent
- - the event that has caused the invocation of the onEndOfDrop (e.g. a mouse up event)intersectionPercentage
- - the percentage of intersection with the drop target
onHoverEnd
public void onHoverEnd(java.lang.String deviceId,
com.google.gwt.user.client.ui.Widget widget,
com.google.gwt.dom.client.Element dragProxy,
com.google.gwt.user.client.Event event)
- Description copied from interface:
DropTargetHandler
- Invoked when a widget leaves the region of the drop target
- Specified by:
onHoverEnd
in interface DropTargetHandler
- Parameters:
deviceId
- - the identifier of the device that triggered the dropwidget
- - the widget which is dragged (this is the original widget and not the dragging proxy!)dragProxy
- - the HTML element of the proxyevent
- - the event that has caused the invocation of the onEndOfDrop (e.g. a mouse up event)