org.jfree.report.content
Interface Content

All Known Implementing Classes:
ContentContainer, DrawableContent, ImageContent, ShapeContent, TextLine

public interface Content

An interface for report content.

Author:
Thomas Morgner.

Method Summary
 java.awt.geom.Rectangle2D getBounds()
          Returns the bounds for the content.
 Content getContentForBounds(java.awt.geom.Rectangle2D bounds)
          Returns the content for the given bounds.
 Content getContentPart(int part)
          Returns a sub-content item.
 int getContentPartCount()
          Returns the number of sub-content items for this item.
 ContentType getContentType()
          Returns the content type (the types include TEXT, IMAGE, SHAPE and CONTAINER).
 java.awt.geom.Rectangle2D getMinimumContentSize()
          Returns the minimum content size.
 

Method Detail

getContentType

public ContentType getContentType()
Returns the content type (the types include TEXT, IMAGE, SHAPE and CONTAINER).

Returns:
the content type.

getBounds

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

Returns:
the bounds.

getMinimumContentSize

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

Returns:
the minimum size.

getContentForBounds

public Content getContentForBounds(java.awt.geom.Rectangle2D bounds)
Returns the content for the given bounds. The extracted content is the content that would be displayed in the specific bounds if the content would be printed with clipping enabled at the given boundary.

This method returns null if there is no content in these bounds.

Parameters:
bounds - the bounds.
Returns:
the content (possibly null).

getContentPartCount

public int getContentPartCount()
Returns the number of sub-content items for this item.

Only subclasses of ContentContainer will return non-zero results.

Returns:
the number of sub-content items.

getContentPart

public Content getContentPart(int part)
Returns a sub-content item.

Parameters:
part - the sub-content index (zero-based).
Returns:
the subcontent (possibly null).