Package org.faceless.graph2
Class Image
- java.lang.Object
-
- org.faceless.graph2.AbstractMarker
-
- org.faceless.graph2.Image
-
- All Implemented Interfaces:
Cloneable
public class Image extends AbstractMarker
TheImage
class is a type of marker that can be used to use bitmap images as Markers.- Since:
- 2.1
-
-
Constructor Summary
Constructors Constructor Description Image(BufferedImage image)
Create a new immge from the specifiedBufferedImage
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setPaddingBottom(double padding)
Set the padding to the bottom of the imagevoid
setPaddingLeft(double padding)
Set the padding to the left of the textvoid
setPaddingRight(double padding)
Set the padding to the right of the imagevoid
setPaddingTop(double padding)
Set the padding to the top of the image-
Methods inherited from class org.faceless.graph2.AbstractMarker
setName
-
-
-
-
Constructor Detail
-
Image
public Image(InputStream image) throws IOException
Create a new image. The InputStream must contain a bitmap image, which is read using theImageIO.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 specifiedBufferedImage
- 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 yourOutput
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 yourOutput
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 yourOutput
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 yourOutput
class- Since:
- 2.3
-
-