de.grogra.imp.objects
Class ImageAdapter

java.lang.Object
  extended by de.grogra.persistence.ShareableBase
      extended by de.grogra.imp.objects.ImageAdapter
All Implemented Interfaces:
Icon, IconSource, Manageable, Shareable
Direct Known Subclasses:
FixedImageAdapter, SyntheticTexture

public abstract class ImageAdapter
extends ShareableBase
implements IconSource, Icon


Nested Class Summary
static class ImageAdapter.Type
           
 
Field Summary
static ImageAdapter.Type $TYPE
           
 
Fields inherited from interface de.grogra.icon.Icon
DEFAULT, DISABLED
 
Constructor Summary
protected ImageAdapter()
           
 
Method Summary
abstract  java.awt.image.BufferedImage getBufferedImage()
           
 Icon getIcon(java.awt.Dimension size, int state)
           
 java.awt.Rectangle getIconBounds()
           
 IconSource getIconSource()
           
 java.awt.Image getImage()
           
 java.awt.Image getImage(int w, int h)
           
 java.net.URL getImageSource()
           
abstract  java.awt.image.BufferedImage getNativeImage()
           
 java.awt.Dimension getPreferredIconSize(boolean small)
           
 void paintIcon(java.awt.Component c, java.awt.Graphics2D g, int x, int y, int w, int h, int state)
           
 void prepareIcon()
           
 
Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.grogra.icon.Icon
isMutable
 
Methods inherited from interface de.grogra.persistence.Manageable
getManageableType
 

Field Detail

$TYPE

public static final ImageAdapter.Type $TYPE
Constructor Detail

ImageAdapter

protected ImageAdapter()
Method Detail

getBufferedImage

public abstract java.awt.image.BufferedImage getBufferedImage()

getIcon

public Icon getIcon(java.awt.Dimension size,
                    int state)
Specified by:
getIcon in interface IconSource

getIconBounds

public java.awt.Rectangle getIconBounds()
Specified by:
getIconBounds in interface Icon

getIconSource

public IconSource getIconSource()
Specified by:
getIconSource in interface Icon

getImage

public java.awt.Image getImage()
Specified by:
getImage in interface Icon

getImage

public java.awt.Image getImage(int w,
                               int h)
Specified by:
getImage in interface Icon

getImageSource

public java.net.URL getImageSource()
Specified by:
getImageSource in interface Icon

getNativeImage

public abstract java.awt.image.BufferedImage getNativeImage()

getPreferredIconSize

public java.awt.Dimension getPreferredIconSize(boolean small)
Specified by:
getPreferredIconSize in interface IconSource

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics2D g,
                      int x,
                      int y,
                      int w,
                      int h,
                      int state)
Specified by:
paintIcon in interface Icon

prepareIcon

public void prepareIcon()
Specified by:
prepareIcon in interface Icon