org.pentaho.reporting.engine.classic.core.util
Class ScalingDrawable

java.lang.Object
  extended by org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper
      extended by org.pentaho.reporting.engine.classic.core.util.ScalingDrawable
All Implemented Interfaces:
ReportDrawable

public class ScalingDrawable
extends org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper
implements ReportDrawable

A drawable implementation that applies scaling to the wrapped up drawable object.

Author:
Thomas Morgner

Constructor Summary
ScalingDrawable(Object drawable)
          Default constructor.
 
Method Summary
 void draw(Graphics2D g2, Rectangle2D area)
          Draws the object.
 org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
          Returns the report configuration used if the drawable is a ReportDrawable.
 ImageMap getImageMap(Rectangle2D bounds)
          Returns an optional image-map for the entry.
 LayoutSupport getLayoutSupport()
          Returns the layout-support used if the drawable is a ReportDrawable.
 ResourceBundleFactory getResourceBundleFactory()
          Returns the resource-bundle factory used if the drawable is a ReportDrawable.
 float getScaleX()
          Returns the horizontal scale factor.
 float getScaleY()
          Returns the vertical scale factor.
 StyleSheet getStyleSheet()
          Returns the stylesheet of the element containing this drawable.
 void setConfiguration(org.pentaho.reporting.libraries.base.config.Configuration configuration)
          Defines the report configuration used if the drawable is a ReportDrawable.
 void setLayoutSupport(LayoutSupport layoutSupport)
          Defines the layout-support used if the drawable is a ReportDrawable.
 void setResourceBundleFactory(ResourceBundleFactory resourceBundleFactory)
          Defines the resource-bundle factory used if the drawable is a ReportDrawable.
 void setScaleX(float scaleX)
          Defines the horizontal scale factor.
 void setScaleY(float scaleY)
          Defines the vertical scale factor.
 void setStyleSheet(StyleSheet styleSheet)
          Defines the stylesheet of the element containing this drawable.
 
Methods inherited from class org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper
getBackend, getPreferredSize, isDrawable, isPreserveAspectRatio
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScalingDrawable

public ScalingDrawable(Object drawable)
Default constructor. Initializes the scaling to 1.

Parameters:
drawable - the drawable object
Method Detail

getScaleY

public float getScaleY()
Returns the vertical scale factor.

Returns:
the scale factor.

setScaleY

public void setScaleY(float scaleY)
Defines the vertical scale factor.

Parameters:
scaleY - the scale factor.

getScaleX

public float getScaleX()
Returns the horizontal scale factor.

Returns:
the scale factor.

setScaleX

public void setScaleX(float scaleX)
Defines the horizontal scale factor.

Parameters:
scaleX - the scale factor.

draw

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

Specified by:
draw in interface ReportDrawable
Overrides:
draw in class org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper
Parameters:
g2 - the graphics device.
area - the area inside which the object should be drawn.

getImageMap

public ImageMap getImageMap(Rectangle2D bounds)
Description copied from interface: ReportDrawable
Returns an optional image-map for the entry.

Specified by:
getImageMap in interface ReportDrawable
Parameters:
bounds - the bounds for which the image map is computed.
Returns:
the computed image-map or null if there is no image-map available.

getStyleSheet

public StyleSheet getStyleSheet()
Returns the stylesheet of the element containing this drawable.

Returns:
the element's stylesheet.

setStyleSheet

public void setStyleSheet(StyleSheet styleSheet)
Defines the stylesheet of the element containing this drawable.

Specified by:
setStyleSheet in interface ReportDrawable
Parameters:
styleSheet - the element's stylesheet.

getResourceBundleFactory

public ResourceBundleFactory getResourceBundleFactory()
Returns the resource-bundle factory used if the drawable is a ReportDrawable.

Returns:
the resource-bundle factory.

setResourceBundleFactory

public void setResourceBundleFactory(ResourceBundleFactory resourceBundleFactory)
Defines the resource-bundle factory used if the drawable is a ReportDrawable.

Specified by:
setResourceBundleFactory in interface ReportDrawable
Parameters:
resourceBundleFactory - the resource-bundle factory.

getLayoutSupport

public LayoutSupport getLayoutSupport()
Returns the layout-support used if the drawable is a ReportDrawable.

Returns:
the layout support.

setLayoutSupport

public void setLayoutSupport(LayoutSupport layoutSupport)
Defines the layout-support used if the drawable is a ReportDrawable.

Parameters:
layoutSupport - the layout support.

getConfiguration

public org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
Returns the report configuration used if the drawable is a ReportDrawable.

Returns:
the report's configuration.

setConfiguration

public void setConfiguration(org.pentaho.reporting.libraries.base.config.Configuration configuration)
Defines the report configuration used if the drawable is a ReportDrawable.

Specified by:
setConfiguration in interface ReportDrawable
Parameters:
configuration - the report's configuration.