|
JNA API> 3.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jna.examples.dnd.GhostedDragImage
public class GhostedDragImage
Provide a ghosted drag image for use during drags where
DragSource.isDragImageSupported()
returns false.
Its location in screen coordinates may be changed via move(java.awt.Point)
.
When the image is no longer needed, invoke dispose()
, which
hides the graphic immediately, or returnToOrigin()
, which
moves the image to its original location and then disposes it.
Constructor Summary | |
---|---|
GhostedDragImage(java.awt.Component dragSource,
javax.swing.Icon icon,
java.awt.Point initialScreenLoc,
java.awt.Point cursorOffset)
Create a ghosted drag image, using the given icon. |
Method Summary | |
---|---|
void |
dispose()
Make all ghosted images go away. |
void |
move(java.awt.Point screenLocation)
Move the ghosted image to the requested location. |
void |
returnToOrigin()
Animate the ghosted image returning to its origin. |
void |
setAlpha(float alpha)
Set the transparency of the ghosted image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GhostedDragImage(java.awt.Component dragSource, javax.swing.Icon icon, java.awt.Point initialScreenLoc, java.awt.Point cursorOffset)
icon
- image to be drawninitialScreenLoc
- initial screen location of the imageMethod Detail |
---|
public void setAlpha(float alpha)
public void dispose()
public void move(java.awt.Point screenLocation)
screenLocation
- Where to draw the image, in screen coordinatespublic void returnToOrigin()
|
JNA API> 3.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |