|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.plugins.dnd.PointerEvent
org.nakedobjects.plugins.dnd.Drag
org.nakedobjects.plugins.dnd.ViewDrag
public class ViewDrag
Details a drag event that affects a view. The target of a ViewDrag is always the workspace of the source view.
An overlay view, as returned by the pickup() method on the source view, is moved by this drag objects so its location follows the pointer by an offset equivalent to the mouse location within the view.
| Field Summary |
|---|
| Fields inherited from class org.nakedobjects.plugins.dnd.PointerEvent |
|---|
mods |
| Constructor Summary | |
|---|---|
ViewDrag(View view,
Offset offset,
View dragView)
Creates a new drag event. |
|
| Method Summary | |
|---|---|
void |
cancel(Viewer viewer)
Cancel drag by changing cursor back to pointer. |
protected void |
drag(Viewer viewer)
Moves the overlay view so it follows the pointer |
void |
drag(View target,
Location location,
int mods)
Indicates that the drag state has changed. |
void |
end(Viewer viewer)
Ends the drag by calling drop() on the workspace. |
Location |
getLocation()
|
View |
getOverlay()
|
View |
getSourceView()
|
Location |
getViewDropLocation()
|
void |
subtract(int x,
int y)
|
void |
subtract(Location location)
|
java.lang.String |
toString()
|
| Methods inherited from class org.nakedobjects.plugins.dnd.PointerEvent |
|---|
button1, button2, button3, isAlt, isCtrl, isMeta, isShift |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ViewDrag(View view,
Offset offset,
View dragView)
view - the view over which the pointer was when this event started| Method Detail |
|---|
public void cancel(Viewer viewer)
cancel in class Dragprotected void drag(Viewer viewer)
public void drag(View target,
Location location,
int mods)
Drag
drag in class Dragpublic void end(Viewer viewer)
end in class Dragpublic View getOverlay()
getOverlay in class Dragpublic Location getLocation()
public View getSourceView()
public Location getViewDropLocation()
public void subtract(Location location)
public java.lang.String toString()
toString in class PointerEvent
public void subtract(int x,
int y)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||