org.jfree.report.content
Class ContentContainer

java.lang.Object
  extended byorg.jfree.report.content.ContentContainer
All Implemented Interfaces:
Content
Direct Known Subclasses:
TextContent, TextParagraph

public class ContentContainer
extends java.lang.Object
implements Content

A report content item that contains other report content items.

Author:
Thomas Morgner

Constructor Summary
protected ContentContainer(java.awt.geom.Rectangle2D bounds)
          Creates a new content container.
 
Method Summary
protected  void addContentPart(Content cp)
          Adds content to the container.
 java.awt.geom.Rectangle2D getBounds()
          Returns the bounds for the content.
 Content getContentForBounds(java.awt.geom.Rectangle2D bounds)
          Returns the content items from the container that intersect with the specified area.
 Content getContentPart(int part)
          Returns a content item from the container.
 int getContentPartCount()
          Returns the number of content items in the container.
 ContentType getContentType()
          Returns the content type, in this case ContentType.CONTAINER.
 java.awt.geom.Rectangle2D getMinimumContentSize()
          Returns the minimum content size for the container.
protected  void setBounds(float x, float y, float width, float height)
          Sets the bounds of the content.
protected  void setBounds(java.awt.geom.Rectangle2D bounds)
          Sets the bounds of the content.
 java.lang.String toString()
          Returns a string describing this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentContainer

protected ContentContainer(java.awt.geom.Rectangle2D bounds)
Creates a new content container.

Parameters:
bounds - the content bounds.
Method Detail

getContentType

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

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

getBounds

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

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

setBounds

protected void setBounds(java.awt.geom.Rectangle2D bounds)
Sets the bounds of the content.

Parameters:
bounds - the new bounds.

setBounds

protected void setBounds(float x,
                         float y,
                         float width,
                         float height)
Sets the bounds of the content.

Parameters:
x - the x-coordinate.
y - the y-coordinate.
width - the width.
height - the height.

addContentPart

protected void addContentPart(Content cp)
Adds content to the container.

Parameters:
cp - the content to add.

getContentPartCount

public int getContentPartCount()
Returns the number of content items in the container.

Specified by:
getContentPartCount in interface Content
Returns:
the item count.

getContentPart

public Content getContentPart(int part)
Returns a content item from the container.

Specified by:
getContentPart in interface Content
Parameters:
part - the content index (zero-based).
Returns:
the content.

getContentForBounds

public Content getContentForBounds(java.awt.geom.Rectangle2D bounds)
Returns the content items from the container that intersect with the specified area.

Specified by:
getContentForBounds in interface Content
Parameters:
bounds - the area.
Returns:
a container holding the content items.

getMinimumContentSize

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

Specified by:
getMinimumContentSize in interface Content
Returns:
the minimum size or null, if this container has no content.

toString

public java.lang.String toString()
Returns a string describing this object.

Returns:
The string.