org.jfree.report.states
Class ReportDefinitionImpl

java.lang.Object
  extended byorg.jfree.report.states.ReportDefinitionImpl
All Implemented Interfaces:
java.lang.Cloneable, ReportDefinition

public class ReportDefinitionImpl
extends java.lang.Object
implements ReportDefinition

A report definition. This the working copy of the JFreeReport object. This object is not serializable, as it is used internally. This implementation is not intended to be known outside. Whatever you planned to do with it - dont do it!

Its only pupose is to be used and manipulated in the report states, there is no reason to do it outside.

Author:
Thomas Morgner.

Constructor Summary
ReportDefinitionImpl(JFreeReport report)
          Creates a report definition from a report object.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 DataRowConnector getDataRowConnector()
          Returns the datarow connector used to feed all elements.
 Group getGroup(int count)
          Returns the group at the specified index or null, if there is no such group.
 int getGroupCount()
          Returns the number of groups in this report.
 GroupList getGroups()
          Returns the list of groups for the report.
 ItemBand getItemBand()
          Returns the item band.
 PageFooter getPageFooter()
          Returns the page footer.
 PageHeader getPageHeader()
          Returns the page header.
 ReportProperties getProperties()
          Returns the report properties.
 ReportConfiguration getReportConfiguration()
          Returns the report configuration.
 ReportFooter getReportFooter()
          Returns the report footer.
 ReportHeader getReportHeader()
          Returns the report header.
 StyleSheetCollection getStyleSheetCollection()
          Returns the stylesheet collection of this report definition.
 Watermark getWatermark()
          Returns the watermark band.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportDefinitionImpl

public ReportDefinitionImpl(JFreeReport report)
                     throws java.lang.CloneNotSupportedException
Creates a report definition from a report object.

Parameters:
report - the report.
Throws:
java.lang.CloneNotSupportedException - if there is a problem cloning.
Method Detail

getGroups

public GroupList getGroups()
Returns the list of groups for the report.

Specified by:
getGroups in interface ReportDefinition
Returns:
The list of groups.

getReportHeader

public ReportHeader getReportHeader()
Returns the report header.

Specified by:
getReportHeader in interface ReportDefinition
Returns:
The report header.

getReportFooter

public ReportFooter getReportFooter()
Returns the report footer.

Specified by:
getReportFooter in interface ReportDefinition
Returns:
The report footer.

getPageHeader

public PageHeader getPageHeader()
Returns the page header.

Specified by:
getPageHeader in interface ReportDefinition
Returns:
The page header.

getPageFooter

public PageFooter getPageFooter()
Returns the page footer.

Specified by:
getPageFooter in interface ReportDefinition
Returns:
The page footer.

getItemBand

public ItemBand getItemBand()
Returns the item band.

Specified by:
getItemBand in interface ReportDefinition
Returns:
The item band.

getProperties

public ReportProperties getProperties()
Returns the report properties.

Specified by:
getProperties in interface ReportDefinition
Returns:
The report properties.

getReportConfiguration

public ReportConfiguration getReportConfiguration()
Returns the report configuration.

Specified by:
getReportConfiguration in interface ReportDefinition
Returns:
The report configuration.

getGroupCount

public int getGroupCount()
Returns the number of groups in this report.

Every report has at least one group defined.

Specified by:
getGroupCount in interface ReportDefinition
Returns:
the group count.

getGroup

public Group getGroup(int count)
Returns the group at the specified index or null, if there is no such group.

Specified by:
getGroup in interface ReportDefinition
Parameters:
count - the group index.
Returns:
the requested group.
Throws:
java.lang.IllegalArgumentException - if the count is negative.
java.lang.IndexOutOfBoundsException - if the count is greater than the number of defined groups.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

Returns:
a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
See Also:
Cloneable

getStyleSheetCollection

public StyleSheetCollection getStyleSheetCollection()
Returns the stylesheet collection of this report definition. The stylesheet collection is fixed for the report definition and all elements of the report. When a band or group is added to the report it will get registered with this stylesheet collection and cannot be used in an different report.

Specified by:
getStyleSheetCollection in interface ReportDefinition
Returns:
the stylesheet collection of the report, never null.

getDataRowConnector

public DataRowConnector getDataRowConnector()
Returns the datarow connector used to feed all elements. This instance is not the one used to feed the functions, so elements will always show the old values and never an preview.

Returns:
the datarow connector.

getWatermark

public Watermark getWatermark()
Returns the watermark band.

Specified by:
getWatermark in interface ReportDefinition
Returns:
The watermark band.