Package com.sun.jna.platform.dnd
Class GhostedDragImage
- java.lang.Object
- 
- com.sun.jna.platform.dnd.GhostedDragImage
 
- 
 public class GhostedDragImage extends java.lang.ObjectProvide a ghosted drag image for use during drags whereDragSource.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, orreturnToOrigin(), which moves the image to its original location and then disposes it.
- 
- 
Constructor SummaryConstructors Constructor Description 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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Make all ghosted images go away.voidmove(java.awt.Point screenLocation)Move the ghosted image to the requested location.voidreturnToOrigin()Animate the ghosted image returning to its origin.voidsetAlpha(float alpha)Set the transparency of the ghosted image.
 
- 
- 
- 
Constructor Detail- 
GhostedDragImagepublic 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.- Parameters:
- dragSource- source of the drag
- icon- image to be drawn
- initialScreenLoc- initial screen location of the image
- cursorOffset- offset of the cursor from the image origin
 
 
- 
 - 
Method Detail- 
setAlphapublic void setAlpha(float alpha) Set the transparency of the ghosted image.- Parameters:
- alpha- transparency level
 
 - 
disposepublic void dispose() Make all ghosted images go away.
 - 
movepublic void move(java.awt.Point screenLocation) Move the ghosted image to the requested location.- Parameters:
- screenLocation- Where to draw the image, in screen coordinates
 
 - 
returnToOriginpublic void returnToOrigin() Animate the ghosted image returning to its origin.
 
- 
 
-