org.jfree.layouting.input

Class AWTImageData

public class AWTImageData extends Object implements ImageData

Creation-Date: 14.12.2005, 14:03:08

Author: Thomas Morgner

Constructor Summary
AWTImageData(Resource source, Image image)
Method Summary
voiddraw(Graphics2D g2, Rectangle2D area)
Draws the object.
longgetHeight()
DimensiongetPreferredSize()
Returns the preferred size of the drawable.
ResourcegetSource()
Returns the resource definition that was used to load the image.
longgetWidth()
booleanisPreserveAspectRatio()
Returns true, if this drawable will preserve an aspect ratio during the drawing.

Constructor Detail

AWTImageData

public AWTImageData(Resource source, Image image)

Method Detail

draw

public void draw(Graphics2D g2, Rectangle2D area)
Draws the object.

Parameters: g2 the graphics device. area the area inside which the object should be drawn.

getHeight

public long getHeight()

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.

Returns: the preferred size.

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.)

Returns:

getWidth

public long getWidth()

isPreserveAspectRatio

public boolean isPreserveAspectRatio()
Returns true, if this drawable will preserve an aspect ratio during the drawing.

Returns: true, if an aspect ratio is preserved, false otherwise.