org.jfree.layouting.input
Class AWTImageData
java.lang.Object
org.jfree.layouting.input.AWTImageData
- ImageData, Serializable
public class AWTImageData
extends java.lang.Object
Creation-Date: 14.12.2005, 14:03:08
void | draw(Graphics2D g2, Rectangle2D area) - Draws the object.
|
long | getHeight() - Returns the height of the image in micro-dots.
|
Dimension | getPreferredSize() - Returns the preferred size of the drawable.
|
Resource | getSource() - Returns the resource definition that was used to load the image.
|
long | getWidth() - Returns the width of the image in micro-dots.
|
boolean | isPreserveAspectRatio() - Returns true, if this drawable will preserve an aspect ratio during the
drawing.
|
AWTImageData
public AWTImageData(Resource source,
Image image)
draw
public void draw(Graphics2D g2,
Rectangle2D area)
Draws the object.
- draw in interface ImageData
g2
- the graphics device.area
- the area inside which the object should be drawn.
getHeight
public long getHeight()
Returns the height of the image in micro-dots.
- getHeight in interface ImageData
getPreferredSize
public Dimension getPreferredSize()
Returns the preferred size of the drawable. If the drawable is aspect ratio
aware, these bounds should be used to compute the preferred aspect ratio
for this drawable.
getSource
public Resource getSource()
Returns the resource definition that was used to load the image. Return
null, if there was no resource loader involved. (This covers both
invalid/empty content and generated content.)
- getSource in interface ImageData
getWidth
public long getWidth()
Returns the width of the image in micro-dots.
- getWidth in interface ImageData
isPreserveAspectRatio
public boolean isPreserveAspectRatio()
Returns true, if this drawable will preserve an aspect ratio during the
drawing.
- true, if an aspect ratio is preserved, false otherwise.