org.jfree.report.content
Class ShapeContent

java.lang.Object
  extended byorg.jfree.report.content.ShapeContent
All Implemented Interfaces:
Content

public class ShapeContent
extends java.lang.Object
implements Content

A report content item that encapsulates a Shape object.

Author:
Thomas Morgner.

Constructor Summary
ShapeContent(java.awt.Shape s)
          Creates a new shape content.
ShapeContent(java.awt.Shape s, java.awt.geom.Rectangle2D bounds)
          Creates a new shape content.
 
Method Summary
 java.awt.geom.Rectangle2D getBounds()
          Returns the bounds for the content.
 Content getContentForBounds(java.awt.geom.Rectangle2D bounds)
          Returns content that falls within the specified bounds.
 Content getContentPart(int part)
          This class does not store sub-content items, so this method always returns null.
 int getContentPartCount()
          This class does not store sub-content items, so this method always returns zero.
 ContentType getContentType()
          Returns the content type, in this case ContentType.SHAPE.
 java.awt.geom.Rectangle2D getMinimumContentSize()
          Returns the minimum content size.
 java.awt.Shape getShape()
          Returns the shape.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeContent

public ShapeContent(java.awt.Shape s)
Creates a new shape content.

Parameters:
s - the shape.

ShapeContent

public ShapeContent(java.awt.Shape s,
                    java.awt.geom.Rectangle2D bounds)
Creates a new shape content.

Parameters:
s - the shape.
bounds - the bounds.
Method Detail

getContentType

public ContentType getContentType()
Returns the content type, in this case ContentType.SHAPE.

Specified by:
getContentType in interface Content
Returns:
the content type.

getShape

public java.awt.Shape getShape()
Returns the shape.

Returns:
the shape.

getBounds

public java.awt.geom.Rectangle2D getBounds()
Returns the bounds for the content.

Specified by:
getBounds in interface Content
Returns:
the bounds.

getMinimumContentSize

public java.awt.geom.Rectangle2D getMinimumContentSize()
Returns the minimum content size.

Specified by:
getMinimumContentSize in interface Content
Returns:
the minimum content size.

getContentPartCount

public int getContentPartCount()
This class does not store sub-content items, so this method always returns zero.

Specified by:
getContentPartCount in interface Content
Returns:
always zero, as ShapeContent does not consist of multiple content parts.

getContentPart

public Content getContentPart(int part)
This class does not store sub-content items, so this method always returns null.

Specified by:
getContentPart in interface Content
Parameters:
part - ignored.
Returns:
null.

getContentForBounds

public Content getContentForBounds(java.awt.geom.Rectangle2D bounds)
Returns content that falls within the specified bounds.

Specified by:
getContentForBounds in interface Content
Parameters:
bounds - the bounds.
Returns:
the content.