com.explodingpixels.painter
Class ImagePainter

java.lang.Object
  extended by com.explodingpixels.painter.ImagePainter
All Implemented Interfaces:
Painter<Component>

public class ImagePainter
extends Object
implements Painter<Component>


Constructor Summary
ImagePainter(Image image)
           
ImagePainter(URL url)
           
 
Method Summary
 Image getImage()
           
 void paint(Graphics2D graphics, Component objectToPaint, int width, int height)
          Renders to the given Graphics2D.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImagePainter

public ImagePainter(Image image)

ImagePainter

public ImagePainter(URL url)
Method Detail

paint

public void paint(Graphics2D graphics,
                  Component objectToPaint,
                  int width,
                  int height)
Description copied from interface: Painter
Renders to the given Graphics2D. The supplied graphics context may be modified - it's state need not be restored upon completion of painting.

Specified by:
paint in interface Painter<Component>
Parameters:
graphics - the graphics context to paint into. It's state need not be restored. Will not be null.
objectToPaint - the object to be painted.
width - the width within the object to paint.
height - the height within the object to paint.

getImage

public Image getImage()