org.jfree.report.util
Class ScalingExtendedDrawable

java.lang.Object
  extended by org.jfree.report.util.ScalingExtendedDrawable
All Implemented Interfaces:
org.jfree.ui.Drawable, org.jfree.ui.ExtendedDrawable

public class ScalingExtendedDrawable
extends java.lang.Object
implements org.jfree.ui.ExtendedDrawable

Creation-Date: 20.01.2006, 19:46:10

Author:
Thomas Morgner

Constructor Summary
ScalingExtendedDrawable()
           
 
Method Summary
 void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)
          Draws the object.
 org.jfree.ui.ExtendedDrawable getDrawable()
           
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of the drawable.
 float getScaleX()
           
 float getScaleY()
           
 boolean isPreserveAspectRatio()
          Returns true, if this drawable will preserve an aspect ratio during the drawing.
 void setDrawable(org.jfree.ui.ExtendedDrawable drawable)
           
 void setScaleX(float scaleX)
           
 void setScaleY(float scaleY)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScalingExtendedDrawable

public ScalingExtendedDrawable()
Method Detail

getDrawable

public org.jfree.ui.ExtendedDrawable getDrawable()

setDrawable

public void setDrawable(org.jfree.ui.ExtendedDrawable drawable)

getScaleY

public float getScaleY()

setScaleY

public void setScaleY(float scaleY)

getScaleX

public float getScaleX()

setScaleX

public void setScaleX(float scaleX)

getPreferredSize

public java.awt.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.

Specified by:
getPreferredSize in interface org.jfree.ui.ExtendedDrawable
Returns:
the preferred size.

isPreserveAspectRatio

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

Specified by:
isPreserveAspectRatio in interface org.jfree.ui.ExtendedDrawable
Returns:
true, if an aspect ratio is preserved, false otherwise.

draw

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

Specified by:
draw in interface org.jfree.ui.Drawable
Parameters:
g2 - the graphics device.
area - the area inside which the object should be drawn.