Class 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 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.
      • 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.