org.xhtmlrenderer.swing
Class MutableFSImage

java.lang.Object
  extended by org.xhtmlrenderer.swing.AWTFSImage
      extended by org.xhtmlrenderer.swing.MutableFSImage
All Implemented Interfaces:
FSImage

public class MutableFSImage
extends AWTFSImage

An FSImage containing a java.awt.Image which can be replaced at runtime by calling setImage(). When setImage() is called, the RepaintListener passed to this class in its constructor will have repaintRequested() invoked on the Swing event dispatch thread. The method isLoaded() will return true once the image load has completed. Before the image has loaded, a 1x1 transparent pixel will be returned from getImage().


Constructor Summary
MutableFSImage(RepaintListener repaintListener)
           
 
Method Summary
 int getHeight()
           
 BufferedImage getImage()
           
 int getWidth()
           
 boolean isLoaded()
           
 void scale(int width, int height)
           
 void setImage(String uri, BufferedImage newImg, boolean wasScaled)
           
 
Methods inherited from class org.xhtmlrenderer.swing.AWTFSImage
createImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutableFSImage

public MutableFSImage(RepaintListener repaintListener)
Method Detail

getImage

public BufferedImage getImage()
Specified by:
getImage in class AWTFSImage

getWidth

public int getWidth()

getHeight

public int getHeight()

scale

public void scale(int width,
                  int height)

setImage

public void setImage(String uri,
                     BufferedImage newImg,
                     boolean wasScaled)

isLoaded

public boolean isLoaded()


Copyright © 2013. All Rights Reserved.