org.nakedobjects.viewer.lightweight
Class DragHandler

java.lang.Object
  extended byorg.nakedobjects.viewer.lightweight.DragHandler
Direct Known Subclasses:
InternalDrag, ObjectDrag, ViewDrag

public abstract class DragHandler
extends java.lang.Object

Wraps mouse events that occur within the ApplicationFrame before passing them to the frames components.


Field Summary
protected  DragView dragging
           
 
Constructor Summary
protected DragHandler(View source, java.awt.event.MouseEvent me, Location downAt)
           
 
Method Summary
abstract  void dragEnd(View identified)
           
abstract  void dragIn(View over)
           
abstract  void dragOut(View over)
           
 DragView getDragging()
           
 Location getRelativeLocation()
           
 Location getRelativeOrigin()
          Returns the location of the mouse within the view it is over.
 Location getViewLocation()
          Returns the location of the view that the mouse is over.
 boolean isAlt()
          Determines whether the ALT key is depressed.
 boolean isAlts()
           
 boolean isButton1()
          Determines whether the left mouse button is depressed.
 boolean isButton2()
          Determines whether the middle mouse button is depressed.
 boolean isButton3()
          Determines whether the right mouse button is depressed.
 boolean isCtrl()
          Determines whether the CTRL key is depressed.
 boolean isShift()
          Determines whether the SHIFT key is depressed.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dragging

protected DragView dragging
Constructor Detail

DragHandler

protected DragHandler(View source,
                      java.awt.event.MouseEvent me,
                      Location downAt)
Method Detail

isAlt

public boolean isAlt()
Determines whether the ALT key is depressed.

Returns:
boolean

isAlts

public boolean isAlts()
Returns:
boolean

isButton1

public boolean isButton1()
Determines whether the left mouse button is depressed.

Returns:
boolean

isButton2

public boolean isButton2()
Determines whether the middle mouse button is depressed.

Returns:
boolean

isButton3

public boolean isButton3()
Determines whether the right mouse button is depressed.

Returns:
boolean

isCtrl

public boolean isCtrl()
Determines whether the CTRL key is depressed.

Returns:
boolean

getDragging

public DragView getDragging()

getRelativeLocation

public Location getRelativeLocation()

getRelativeOrigin

public Location getRelativeOrigin()
Returns the location of the mouse within the view it is over. Returns null if not over a view.


isShift

public boolean isShift()
Determines whether the SHIFT key is depressed.

Returns:
boolean

getViewLocation

public Location getViewLocation()
Returns the location of the view that the mouse is over.


dragEnd

public abstract void dragEnd(View identified)

dragIn

public abstract void dragIn(View over)

dragOut

public abstract void dragOut(View over)

toString

public java.lang.String toString()