org.artoflife.util.dnd
Class ThumbnailIcon

java.lang.Object
  |
  +--org.artoflife.util.dnd.ThumbnailIcon
All Implemented Interfaces:
java.io.Serializable

public class ThumbnailIcon
extends java.lang.Object
implements java.io.Serializable

Used by ThumbnailTransferable as an icon dataflavor so that the ThumbnailIconDropTargetListener can paint the icon during drags over a DropTarget.

Author:
Steve Meyfroidt
See Also:
Serialized Form

Constructor Summary
ThumbnailIcon()
          Needed for serialization, not for users.
ThumbnailIcon(javax.swing.Icon icon, java.awt.Point offset)
          Public constructor.
 
Method Summary
 javax.swing.Icon getIcon()
           
 java.awt.Point getOffset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThumbnailIcon

public ThumbnailIcon()
Needed for serialization, not for users.


ThumbnailIcon

public ThumbnailIcon(javax.swing.Icon icon,
                     java.awt.Point offset)
Public constructor.

Parameters:
icon - the javax.swing.Icon to paint
offset - offset of cursor from top left of drawn icon
Throws:
java.lang.IllegalArgumentException - for null icon or offset
Method Detail

getIcon

public javax.swing.Icon getIcon()
Returns:
the icon to draw

getOffset

public java.awt.Point getOffset()
Returns:
Point the offset of cursor from top-left of painted icon

artoflife pre0.1.0-dev

Copyright © 2002 the Art Of Life team. All Rights Reserved.