org.jfree.report.util

Class ScalingExtendedDrawable

public class ScalingExtendedDrawable extends Object implements ExtendedDrawable

Creation-Date: 20.01.2006, 19:46:10

Author: Thomas Morgner

Constructor Summary
ScalingExtendedDrawable()
Method Summary
voiddraw(Graphics2D g2, Rectangle2D area)
Draws the object.
ExtendedDrawablegetDrawable()
DimensiongetPreferredSize()
Returns the preferred size of the drawable.
floatgetScaleX()
floatgetScaleY()
booleanisPreserveAspectRatio()
Returns true, if this drawable will preserve an aspect ratio during the drawing.
voidsetDrawable(ExtendedDrawable drawable)
voidsetScaleX(float scaleX)
voidsetScaleY(float scaleY)

Constructor Detail

ScalingExtendedDrawable

public ScalingExtendedDrawable()

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.

getDrawable

public ExtendedDrawable getDrawable()

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.

getScaleX

public float getScaleX()

getScaleY

public float getScaleY()

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.

setDrawable

public void setDrawable(ExtendedDrawable drawable)

setScaleX

public void setScaleX(float scaleX)

setScaleY

public void setScaleY(float scaleY)