|
|||||||||
| Home >> All >> jbreport >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
jbreport.core
Class ReportSectionImpl

java.lang.Objectjbreport.core.AbstractReportElement
jbreport.core.ReportSectionImpl
- All Implemented Interfaces:
- java.lang.Cloneable, jbreport.ReportElement, jbreport.ReportSection, Traversable, XMLAware
- Direct Known Subclasses:
- Document
- public class ReportSectionImpl
- extends AbstractReportElement
- implements jbreport.ReportSection
- extends AbstractReportElement
This is the default implementation of a ReportSection instance. It is made public as classes in other packages might need to implement the ReportSection interface.
- Version:
- $Revision: 1.1 $
| Field Summary | |
private jbreport.ReportElement |
bodyElement
The body element of this instance. |
private java.util.Map |
boundParams
The mapping of bound parameters |
private boolean |
createdGroupElement
Did this element create a group element implicitly? |
private jbreport.ReportElement |
footerElement
The footer element of this instance. |
private jbreport.ReportElement |
headerElement
The header element of this instance |
private java.util.Collection |
renderers
The renderers that have been attached to this section |
| Fields inherited from class jbreport.core.AbstractReportElement |
attrType, cdata, className, elementType, factory, name, xmlHandler |
| Fields inherited from interface jbreport.ReportSection |
HTMLRenderer |
| Fields inherited from interface jbreport.ReportElement |
DEEP, SHALLOW |
| Constructor Summary | |
ReportSectionImpl()
|
|
| Method Summary | |
void |
accept(ReportVisitor visitor,
ReportVisitorState state)
This defines the operation that the Traversable instance must perform at each node in the traversal. |
void |
addRenderer(java.lang.String rendererType,
java.io.PrintWriter output)
Add another renderer that will be used during traversal of the report. |
jbreport.ReportElement |
copy(boolean deep)
This will copy (clone) the current element, returning the copied element. |
jbreport.ReportElement |
getBody()
Returns the body element of this section |
java.lang.String |
getBoundParamValue(java.lang.String paramName)
Returns the value of the bound parameter, null if no parameter of that name was found |
jbreport.ReportElement |
getFooter()
Returns the footer element of this section |
jbreport.ReportElement |
getHeader()
Returns the header element of this section. |
void |
loadData()
This will initiate the loading of the data into the report. |
void |
render()
Render the report using the given renderers. |
void |
setBody(jbreport.ReportElement elem)
Adds a body element to this element. |
void |
setBoundParamValue(java.lang.String paramName,
java.lang.String value)
This will create a binding that will be used during report creation to substitute a variable with the given parameter. |
void |
setFooter(jbreport.ReportElement elem)
Adds a footer element to this element. |
void |
setHeader(jbreport.ReportElement elem)
Adds a header element to this element. |
void |
updateData(jbreport.data.QueryResult queryResult)
This is called for every successful next() method call on
the QueryResult contained by a group. |
void |
xmlEnd(java.lang.String cdata)
This should mark the end of the element definition using xml. |
void |
xmlEndChild(jbreport.ReportElement elem)
This method is called for every child element that is defined during xml tree traversal. |
void |
xmlInitialize(java.lang.String localName,
org.xml.sax.Attributes attributes)
This should initialize the instance with data obtained during the traversal of an xml tree. |
| Methods inherited from class jbreport.core.AbstractReportElement |
assert, assertNotNull, boundParameters, breakEventNotify, clone, copy, getElement, getFactory, getList, getName, getParent, getRepository, getString, getStylesheet, getType, inOrderIterator, inOrderTraverse, postOrderIterator, postOrderTraverse, preLoadData, preOrderIterator, preOrderTraverse, setParent, setString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jbreport.ReportElement |
boundParameters, copy, getElement, getFactory, getList, getName, getParent, getRepository, getString, getStylesheet, getType, setParent, setString |
| Field Detail |
headerElement
private jbreport.ReportElement headerElement
- The header element of this instance
bodyElement
private jbreport.ReportElement bodyElement
- The body element of this instance.
footerElement
private jbreport.ReportElement footerElement
- The footer element of this instance.
createdGroupElement
private boolean createdGroupElement
- Did this element create a group element implicitly?
boundParams
private java.util.Map boundParams
- The mapping of bound parameters
renderers
private java.util.Collection renderers
- The renderers that have been attached to this section
| Constructor Detail |
ReportSectionImpl
public ReportSectionImpl()
| Method Detail |
addRenderer
public void addRenderer(java.lang.String rendererType, java.io.PrintWriter output)
- Description copied from interface:
jbreport.ReportSection - Add another renderer that will be used during traversal of the report.
- Specified by:
addRendererin interfacejbreport.ReportSection
render
public void render()
throws jbreport.ReportException
- Description copied from interface:
jbreport.ReportSection - Render the report using the given renderers.
- Specified by:
renderin interfacejbreport.ReportSection
setBoundParamValue
public void setBoundParamValue(java.lang.String paramName, java.lang.String value)
- Description copied from interface:
jbreport.ReportSection - This will create a binding that will be used during report creation to
substitute a variable with the given parameter.
- Specified by:
setBoundParamValuein interfacejbreport.ReportSection
getBoundParamValue
public java.lang.String getBoundParamValue(java.lang.String paramName)
- Description copied from interface:
jbreport.ReportElement - Returns the value of the bound parameter, null if no parameter of that
name was found
- Specified by:
getBoundParamValuein interfacejbreport.ReportElement- Overrides:
getBoundParamValuein classAbstractReportElement
setHeader
public void setHeader(jbreport.ReportElement elem)
- Description copied from interface:
jbreport.ReportSection - Adds a header element to this element. Some element types might not allow
children.
- Specified by:
setHeaderin interfacejbreport.ReportSection
getHeader
public jbreport.ReportElement getHeader()
- Description copied from interface:
jbreport.ReportSection - Returns the header element of this section.
- Specified by:
getHeaderin interfacejbreport.ReportSection
setBody
public void setBody(jbreport.ReportElement elem)
- Description copied from interface:
jbreport.ReportSection - Adds a body element to this element. Some element types might not allow
children.
- Specified by:
setBodyin interfacejbreport.ReportSection
getBody
public jbreport.ReportElement getBody()
- Description copied from interface:
jbreport.ReportSection - Returns the body element of this section
- Specified by:
getBodyin interfacejbreport.ReportSection
setFooter
public void setFooter(jbreport.ReportElement elem)
- Description copied from interface:
jbreport.ReportSection - Adds a footer element to this element. Some element types might not allow
children.
- Specified by:
setFooterin interfacejbreport.ReportSection
getFooter
public jbreport.ReportElement getFooter()
- Description copied from interface:
jbreport.ReportSection - Returns the footer element of this section
- Specified by:
getFooterin interfacejbreport.ReportSection
copy
public jbreport.ReportElement copy(boolean deep)
- Description copied from interface:
jbreport.ReportElement - This will copy (clone) the current element, returning the copied element.
Should the deep parameter be set, the children of this element are cloned as well, otherwise, the references are copied. This is not strictly true, as there might be classes of elements where a clone does not make sense.
- Specified by:
copyin interfacejbreport.ReportElement- Overrides:
copyin classAbstractReportElement
loadData
public void loadData()
throws jbreport.ReportException
- Description copied from interface:
jbreport.ReportElement - This will initiate the loading of the data into the report.
- Specified by:
loadDatain interfacejbreport.ReportElement- Overrides:
loadDatain classAbstractReportElement
updateData
public void updateData(jbreport.data.QueryResult queryResult) throws jbreport.ReportException
- Description copied from class:
AbstractReportElement - This is called for every successful
next()method call on the QueryResult contained by a group.- Overrides:
updateDatain classAbstractReportElement
xmlInitialize
public void xmlInitialize(java.lang.String localName, org.xml.sax.Attributes attributes) throws jbreport.ReportException
- Description copied from interface:
jbreport.ReportElement - This should initialize the instance with data obtained during the
traversal of an xml tree. The child-parent relationship is catered for
with the
xmlEndChild()method.- Specified by:
xmlInitializein interfacejbreport.ReportElement- Overrides:
xmlInitializein classAbstractReportElement
xmlEnd
public void xmlEnd(java.lang.String cdata) throws jbreport.ReportException
- Description copied from interface:
jbreport.ReportElement - This should mark the end of the element definition using xml. It will
return the character data that was found during parsing to the element.
- Specified by:
xmlEndin interfacejbreport.ReportElement- Overrides:
xmlEndin classAbstractReportElement
xmlEndChild
public void xmlEndChild(jbreport.ReportElement elem) throws jbreport.ReportException
- Description copied from interface:
jbreport.ReportElement - This method is called for every child element that is defined during
xml tree traversal. In order to preserve the tree, it will only be
called at the end of the child definition.
- Specified by:
xmlEndChildin interfacejbreport.ReportElement- Overrides:
xmlEndChildin classAbstractReportElement
accept
public void accept(ReportVisitor visitor, ReportVisitorState state) throws jbreport.ReportException
- Description copied from interface:
Traversable - This defines the operation that the Traversable instance must perform
at each node in the traversal. It should be coded such that it calls
an appropriate method on the ReportVisitor instance. Should an
appropriate method not exist, one should be coded.
The accept method should not recurse into its children, it is the contract of the iterator to perform that function.
eg:- For node type
Sectionthe method on this node should be as follows.public void accept(ReportVisitor visitor, ReportVisitorState state) throws ReportException { visitor.visitSection(this, state); }- Specified by:
acceptin interfaceTraversable- Overrides:
acceptin classAbstractReportElement
|
|||||||||
| Home >> All >> jbreport >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC