org.faceless.graph2
Class Image

java.lang.Object
  extended by org.faceless.graph2.AbstractMarker
      extended by org.faceless.graph2.Image

public class Image
extends AbstractMarker

The Image class is a type of marker that can be used to use bitmap images as Markers.

Since:
2.1

Constructor Summary
Image(BufferedImage image)
          Create a new immge from the specified BufferedImage
Image(InputStream image)
          Create a new image.
Image(String filename)
          Create a new image from the specified filename.
Image(URL url)
          Create a new image from the specified URL.
 
Method Summary
 void setPaddingBottom(double padding)
          Set the padding to the bottom of the image
 void setPaddingLeft(double padding)
          Set the padding to the left of the text
 void setPaddingRight(double padding)
          Set the padding to the right of the image
 void setPaddingTop(double padding)
          Set the padding to the top of the image
 
Methods inherited from class org.faceless.graph2.AbstractMarker
setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Image

public Image(InputStream image)
      throws IOException
Create a new image. The InputStream must contain a bitmap image, which is read using the ImageIO.read(InputStream) method. The InputStream is not closed after use.

Parameters:
image - the InputStream containing the image
Throws:
IOException - if the image cannot be loaded

Image

public Image(String filename)
Create a new image from the specified filename.

Parameters:
filename - the filename of the image
Throws:
IllegalArgumentException - if the image cannot be loaded

Image

public Image(URL url)
Create a new image from the specified URL.

Parameters:
url - the URL of the image
Throws:
IllegalArgumentException - if the image cannot be loaded

Image

public Image(BufferedImage image)
Create a new immge from the specified BufferedImage

Since:
2.1.1
Method Detail

setPaddingLeft

public void setPaddingLeft(double padding)
Set the padding to the left of the text

Parameters:
padding - the padding to use, in pixels or whatever units are use by your Output class
Since:
2.3

setPaddingRight

public void setPaddingRight(double padding)
Set the padding to the right of the image

Parameters:
padding - the padding to use, in pixels or whatever units are use by your Output class
Since:
2.3

setPaddingBottom

public void setPaddingBottom(double padding)
Set the padding to the bottom of the image

Parameters:
padding - the padding to use, in pixels or whatever units are use by your Output class
Since:
2.3

setPaddingTop

public void setPaddingTop(double padding)
Set the padding to the top of the image

Parameters:
padding - the padding to use, in pixels or whatever units are use by your Output class
Since:
2.3


Copyright © 2001-2011 Big Faceless Organization