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

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.util.ShapeDrawable
All Implemented Interfaces:
ReportDrawable

public class ShapeDrawable
extends Object
implements ReportDrawable

Todo: Document me!

Date: 27.05.2009 Time: 15:43:00

Author:
Thomas Morgner.

Constructor Summary
ShapeDrawable(Shape shape, boolean isPreserveAspectRatio)
           
 
Method Summary
 void draw(Graphics2D g2, Rectangle2D bounds)
           
 ImageMap getImageMap(Rectangle2D bounds)
          Returns an optional image-map for the entry.
 Dimension getPreferredSize()
           
 Shape getShape()
           
 boolean isKeepAspectRatio()
           
 void setConfiguration(org.pentaho.reporting.libraries.base.config.Configuration config)
          Provides the current report configuration of the current report process to the drawable.
 void setResourceBundleFactory(ResourceBundleFactory bundleFactory)
          Defines the resource-bundle factory that can be used to localize the drawing process.
 void setStyleSheet(StyleSheet style)
          Provides the computed stylesheet of the report element that contained this drawable.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeDrawable

public ShapeDrawable(Shape shape,
                     boolean isPreserveAspectRatio)
Method Detail

getShape

public Shape getShape()

draw

public void draw(Graphics2D g2,
                 Rectangle2D bounds)
Specified by:
draw in interface ReportDrawable

setConfiguration

public void setConfiguration(org.pentaho.reporting.libraries.base.config.Configuration config)
Provides the current report configuration of the current report process to the drawable. The report configuration can be used to configure the drawing process through the report.

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

setStyleSheet

public void setStyleSheet(StyleSheet style)
Provides the computed stylesheet of the report element that contained this drawable. The stylesheet is immutable.

Specified by:
setStyleSheet in interface ReportDrawable
Parameters:
style - the stylesheet.

setResourceBundleFactory

public void setResourceBundleFactory(ResourceBundleFactory bundleFactory)
Defines the resource-bundle factory that can be used to localize the drawing process.

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

getImageMap

public ImageMap getImageMap(Rectangle2D bounds)
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.

isKeepAspectRatio

public boolean isKeepAspectRatio()

getPreferredSize

public Dimension getPreferredSize()