ch.unifr.pai.twice.dragndrop.client.factories
Class DropHandlerFactory

java.lang.Object
  extended by ch.unifr.pai.twice.dragndrop.client.factories.DropHandlerFactory

public class DropHandlerFactory
extends java.lang.Object

A factory for DragNDropHandler

Author:
Oliver Schmid

Field Summary
private static DragNDropHandler defaultDropHandler
           
private static DragNDropHandler resetDropHandler
           
private static DragNDropHandler resetWhenNotOnDropArea
           
 
Constructor Summary
DropHandlerFactory()
           
 
Method Summary
static DragNDropHandler defaultHandler()
           
static DragNDropHandler resetPositionOnOutOfBox()
           
static DragNDropHandler resetWhenNotOnDropArea()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultDropHandler

private static DragNDropHandler defaultDropHandler

resetDropHandler

private static DragNDropHandler resetDropHandler

resetWhenNotOnDropArea

private static DragNDropHandler resetWhenNotOnDropArea
Constructor Detail

DropHandlerFactory

public DropHandlerFactory()
Method Detail

resetWhenNotOnDropArea

public static DragNDropHandler resetWhenNotOnDropArea()
Returns:
a DragNDropHandler that resets the position of a dragged widget if it is not released on top of a drop target

defaultHandler

public static DragNDropHandler defaultHandler()
Returns:
a DragNDropHandler which accepts any drops and therefore positions the dragged widget where it has been dropped (unless a drop target does not override this function)

resetPositionOnOutOfBox

public static DragNDropHandler resetPositionOnOutOfBox()
Returns:
resets the position if it has been dropped outside of the boundary-box