org.icepdf.core.pobjects.graphics
Class ImageReference

java.lang.Object
  extended by org.icepdf.core.pobjects.graphics.ImageReference
All Implemented Interfaces:
java.util.concurrent.Callable<java.awt.image.BufferedImage>
Direct Known Subclasses:
CachedImageReference, InlineImageStreamReference

public abstract class ImageReference
extends java.lang.Object
implements java.util.concurrent.Callable<java.awt.image.BufferedImage>

Abstract ImageReference defines the core methods used in ImageStreamReference MipMappedImageReference and ScaledImageReference. The creation of these objects is handled by the ImageReferenceFactory.

Since:
5.0

Field Summary
protected  java.awt.Color fillColor
           
protected  java.util.concurrent.FutureTask<java.awt.image.BufferedImage> futureTask
           
protected  java.awt.image.BufferedImage image
           
protected  ImageStream imageStream
           
protected  Reference reference
           
protected  Resources resources
           
protected static boolean useProxy
           
 
Constructor Summary
protected ImageReference(ImageStream imageStream, java.awt.Color fillColor, Resources resources)
           
 
Method Summary
protected  java.awt.image.BufferedImage createImage()
          Creates a scaled image to match that of the instance vars width/height.
 void drawImage(java.awt.Graphics2D aG, int aX, int aY, int aW, int aH)
           
abstract  int getHeight()
           
abstract  java.awt.image.BufferedImage getImage()
           
 ImageStream getImageStream()
           
abstract  int getWidth()
           
 boolean isImage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.Callable
call
 

Field Detail

useProxy

protected static boolean useProxy

futureTask

protected java.util.concurrent.FutureTask<java.awt.image.BufferedImage> futureTask

imageStream

protected ImageStream imageStream

fillColor

protected java.awt.Color fillColor

resources

protected Resources resources

image

protected java.awt.image.BufferedImage image

reference

protected Reference reference
Constructor Detail

ImageReference

protected ImageReference(ImageStream imageStream,
                         java.awt.Color fillColor,
                         Resources resources)
Method Detail

getWidth

public abstract int getWidth()

getHeight

public abstract int getHeight()

getImage

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

drawImage

public void drawImage(java.awt.Graphics2D aG,
                      int aX,
                      int aY,
                      int aW,
                      int aH)

createImage

protected java.awt.image.BufferedImage createImage()
Creates a scaled image to match that of the instance vars width/height.

Returns:
decoded/encoded BufferedImge for the respective ImageStream.

getImageStream

public ImageStream getImageStream()

isImage

public boolean isImage()