Class ScalingDrawable
- java.lang.Object
-
- org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper
-
- 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
Constructors Constructor Description ScalingDrawable(Object drawable)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 aReportDrawable
.ImageMap
getImageMap(Rectangle2D bounds)
Returns an optional image-map for the entry.ResourceBundleFactory
getResourceBundleFactory()
Returns the resource-bundle factory used if the drawable is aReportDrawable
.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 aReportDrawable
.void
setResourceBundleFactory(ResourceBundleFactory resourceBundleFactory)
Defines the resource-bundle factory used if the drawable is aReportDrawable
.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.
-
-
-
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 interfaceReportDrawable
- Overrides:
draw
in classorg.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 interfaceReportDrawable
- 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 interfaceReportDrawable
- Parameters:
styleSheet
- the element's stylesheet.
-
getResourceBundleFactory
public ResourceBundleFactory getResourceBundleFactory()
Returns the resource-bundle factory used if the drawable is aReportDrawable
.- Returns:
- the resource-bundle factory.
-
setResourceBundleFactory
public void setResourceBundleFactory(ResourceBundleFactory resourceBundleFactory)
Defines the resource-bundle factory used if the drawable is aReportDrawable
.- Specified by:
setResourceBundleFactory
in interfaceReportDrawable
- Parameters:
resourceBundleFactory
- the resource-bundle factory.
-
getConfiguration
public org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
Returns the report configuration used if the drawable is aReportDrawable
.- 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 aReportDrawable
.- Specified by:
setConfiguration
in interfaceReportDrawable
- Parameters:
configuration
- the report's configuration.
-
-