org.cruxframework.crux.widgets.client.util.draganddrop
Class GenericDragEventHandler.DragAction<D extends GenericDragEventHandler.Draggable<?>>

java.lang.Object
  extended by org.cruxframework.crux.widgets.client.util.draganddrop.GenericDragEventHandler.DragAction<D>
Direct Known Subclasses:
MoveCapability.DragMoveAction, ResizeCapability.DragResizeAction
Enclosing class:
GenericDragEventHandler

public abstract static class GenericDragEventHandler.DragAction<D extends GenericDragEventHandler.Draggable<?>>
extends Object

The contract to implement the logic associated to a drag action

Author:
Gesse Dafe

Constructor Summary
GenericDragEventHandler.DragAction(D draggable)
           
 
Method Summary
 D getDraggable()
           
abstract  GenericDragEventHandler.DragAndDropFeature getFeature()
          Gets the feature associated to this action
abstract  void onDrag(int x, int y, int dragStartX, int dragStartY)
          Action to me taken when drag happens
abstract  void onStartDrag()
          Action to me taken when drag starts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericDragEventHandler.DragAction

public GenericDragEventHandler.DragAction(D draggable)
Parameters:
draggable -
move -
Method Detail

onStartDrag

public abstract void onStartDrag()
Action to me taken when drag starts


getFeature

public abstract GenericDragEventHandler.DragAndDropFeature getFeature()
Gets the feature associated to this action

Returns:

onDrag

public abstract void onDrag(int x,
                            int y,
                            int dragStartX,
                            int dragStartY)
Action to me taken when drag happens

Parameters:
x -
y -
dragStartX -
dragStartY -

getDraggable

public D getDraggable()
Returns:


Copyright © 2014. All rights reserved.