org.nakedobjects.plugins.dnd
Class SimpleInternalDrag
java.lang.Object
org.nakedobjects.plugins.dnd.PointerEvent
org.nakedobjects.plugins.dnd.Drag
org.nakedobjects.plugins.dnd.InternalDrag
org.nakedobjects.plugins.dnd.SimpleInternalDrag
public class SimpleInternalDrag
- extends InternalDrag
|
Method Summary |
void |
cancel(Viewer viewer)
Indicates the drag has been cancelled; no action should be taken. |
void |
drag(View target,
Location location,
int mods)
Indicates that the drag state has changed. |
void |
end(Viewer viewer)
Indicates the drag has properly ended (the mouse button has been released) |
Location |
getLocation()
Gets the location of the pointer relative to the view. |
View |
getOverlay()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SimpleInternalDrag
public SimpleInternalDrag(View view,
Location location)
- Creates a new drag event. The source view has its pickup(), and then, exited() methods called on it.
The view returned by the pickup method becomes this event overlay view, which is moved continuously so
that it tracks the pointer,
- Parameters:
view - the view over which the pointer was when this event startedlocation - the location within the viewer (the Frame/Applet/Window etc)
TODO combine the two constructors
SimpleInternalDrag
public SimpleInternalDrag(View view,
Offset off)
cancel
public void cancel(Viewer viewer)
- Description copied from class:
Drag
- Indicates the drag has been cancelled; no action should be taken.
- Specified by:
cancel in class Drag
drag
public void drag(View target,
Location location,
int mods)
- Description copied from class:
Drag
- Indicates that the drag state has changed.
- Specified by:
drag in class Drag
end
public void end(Viewer viewer)
- Description copied from class:
Drag
- Indicates the drag has properly ended (the mouse button has been released)
- Specified by:
end in class Drag
getLocation
public Location getLocation()
- Gets the location of the pointer relative to the view.
- Specified by:
getLocation in class InternalDrag
getOverlay
public View getOverlay()
- Specified by:
getOverlay in class Drag
toString
public java.lang.String toString()
- Overrides:
toString in class PointerEvent
Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.