org.pentaho.reporting.libraries.resourceloader.factory.drawable

Class DrawableWrapper

public class DrawableWrapper extends Object

Creation-Date: 05.12.2007, 19:15:56

Author: Thomas Morgner

Constructor Summary
DrawableWrapper(Object maybeDrawable)
Method Summary
voiddraw(Graphics2D g2, Rectangle2D bounds)
ObjectgetBackend()
DimensiongetPreferredSize()
Returns the preferred size of the drawable.
static booleanisDrawable(Object maybeDrawable)
booleanisPreserveAspectRatio()
Returns true, if this drawable will preserve an aspect ratio during the drawing.

Constructor Detail

DrawableWrapper

public DrawableWrapper(Object maybeDrawable)

Method Detail

draw

public void draw(Graphics2D g2, Rectangle2D bounds)

getBackend

public Object getBackend()

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.

isDrawable

public static boolean isDrawable(Object maybeDrawable)

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.