com.jrefinery.report.io.simple
Class BandFactory

java.lang.Object
  extended bycom.jrefinery.report.io.simple.AbstractReportDefinitionHandler
      extended bycom.jrefinery.report.io.simple.BandFactory
All Implemented Interfaces:
org.jfree.xml.ElementDefinitionHandler, ReportDefinitionTags

public class BandFactory
extends AbstractReportDefinitionHandler
implements ReportDefinitionTags

This class handles the SAX events generated for report bands.

Recognized root bands are:

Author:
Thomas Morgner

Field Summary
 
Fields inherited from interface com.jrefinery.report.io.simple.ReportDefinitionTags
ALIGNMENT_ATT, BOTTOMMARGIN_ATT, COLOR_ATT, CONFIGURATION_TAG, DATAREF_TAG, DATE_FIELD_TAG, DATE_FUNCTION_TAG, DEPENCY_LEVEL_ATT, DRAWABLE_FIELD_TAG, EXPRESSION_TAG, FIELD_TAG, FIELDNAME_ATT, FIELDS_TAG, FONT_NAME_ATT, FONT_SIZE_ATT, FONT_STYLE_ATT, FORMAT_ATT, FS_BOLD, FS_EMBEDDED, FS_ENCODING, FS_ITALIC, FS_STRIKETHR, FS_UNDERLINE, FUNCTION_TAG, FUNCTIONNAME_ATT, FUNCTIONS_TAG, GENERAL_FIELD_TAG, GENERAL_FUNCTION_TAG, GROUP_FOOTER_TAG, GROUP_HEADER_TAG, GROUP_TAG, GROUPS_TAG, HEIGHT_ATT, IMAGEFIELD_TAG, IMAGEFUNCTION_TAG, IMAGEREF_TAG, IMAGEURLFIELD_TAG, IMAGEURLFUNCTION_TAG, ITEMS_TAG, LABEL_TAG, LEFTMARGIN_ATT, LINE_TAG, LINEHEIGHT, MULTILINE_FIELD_TAG, MULTILINE_FUNCTION_TAG, NAME_ATT, NULLSTRING_ATT, NUMBER_FIELD_TAG, NUMBER_FUNCTION_TAG, ORIENTATION_ATT, ORIENTATION_LANDSCAPE_VAL, ORIENTATION_PORTRAIT_VAL, ORIENTATION_REVERSE_LANDSCAPE_VAL, PAGE_FOOTER_TAG, PAGE_HEADER_TAG, PAGEFORMAT_ATT, PROPERTIES_TAG, PROPERTY_ENCODING_ATT, PROPERTY_ENCODING_TEXT, PROPERTY_REFERENCE_TAG, PROPERTY_TAG, RECTANGLE_TAG, REPEAT_HEADER, REPORT_FOOTER_TAG, REPORT_HEADER_TAG, REPORT_TAG, RESOURCEBASE_ATTR, RESOURCEFIELD_TAG, RESOURCELABEL_TAG, RIGHTMARGIN_ATT, SHAPE_FIELD_TAG, STRING_FIELD_TAG, STRING_FUNCTION_TAG, TOPMARGIN_ATT, VALIGNMENT_ATT, WIDTH_ATT
 
Constructor Summary
BandFactory(org.jfree.xml.Parser parser, java.lang.String finishTag)
          Initializes this BandFactory based on the data contained in the ReportFactory.
 
Method Summary
 void endElement(java.lang.String qName)
          SAX-Handler function that is forwarded from the ReportDefinitionContentHandler.
 void endItems()
          Handles the end of an ItemBand definition.
 void endPageHeader()
          Handles the end of a PageHeader definition.
 void startElement(java.lang.String qName, org.xml.sax.Attributes atts)
          SAX-Handler function that is forwarded from the ReportDefinitionContentHandler.
 void startItems(org.xml.sax.Attributes attr)
          Handles the start of an ItemBand definition.
 void startPageFooter(org.xml.sax.Attributes attr)
          Handles the start of a pagefooter definition.
 void startPageHeader(org.xml.sax.Attributes attr)
          Handles the start of a pageheader definition.
 void startReportFooter(org.xml.sax.Attributes attr)
          Handles the start of a reportfooter definition.
 void startReportHeader(org.xml.sax.Attributes attr)
          Handles the start of a reportheader definition.
 
Methods inherited from class com.jrefinery.report.io.simple.AbstractReportDefinitionHandler
characters, getContentBase, getFinishTag, getLocator, getNameGenerator, getParser, getReport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BandFactory

public BandFactory(org.jfree.xml.Parser parser,
                   java.lang.String finishTag)
Initializes this BandFactory based on the data contained in the ReportFactory.

Parameters:
parser - the used parser to coordinate the parsing process.
finishTag - the finish tag, that should trigger the deactivation of this parser.
Throws:
java.lang.NullPointerException - if the finishTag or the parser are null.
Method Detail

startElement

public void startElement(java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
SAX-Handler function that is forwarded from the ReportDefinitionContentHandler. StartTag-occurences for ReportFooter and -header, PageFooter and -header and the itemBand are handled. If an unknown element is encountered, a SAXException is thrown.

Specified by:
startElement in interface org.jfree.xml.ElementDefinitionHandler
Parameters:
qName - the element name.
atts - the element attributes.
Throws:
org.xml.sax.SAXException - if an unknown tag is encountered.

endElement

public void endElement(java.lang.String qName)
                throws org.xml.sax.SAXException
SAX-Handler function that is forwarded from the ReportDefinitionContentHandler. EndTag-occurences for ReportFooter and -header, PageFooter and -header and the itemBand are handled. If an unknown element is encountered, a SAXException is thrown.

Specified by:
endElement in interface org.jfree.xml.ElementDefinitionHandler
Parameters:
qName - the element name.
Throws:
org.xml.sax.SAXException - if an unknown tag is encountered.

startReportHeader

public void startReportHeader(org.xml.sax.Attributes attr)
                       throws org.xml.sax.SAXException
Handles the start of a reportheader definition.

Parameters:
attr - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a parsing problem.
See Also:
ReportHeader

startReportFooter

public void startReportFooter(org.xml.sax.Attributes attr)
                       throws org.xml.sax.SAXException
Handles the start of a reportfooter definition.

Parameters:
attr - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a parsing problem.
See Also:
ReportFooter

startPageHeader

public void startPageHeader(org.xml.sax.Attributes attr)
                     throws org.xml.sax.SAXException
Handles the start of a pageheader definition.

Parameters:
attr - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a parsing problem.
See Also:
PageHeader

startPageFooter

public void startPageFooter(org.xml.sax.Attributes attr)
                     throws org.xml.sax.SAXException
Handles the start of a pagefooter definition.

Parameters:
attr - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a parsing problem.
See Also:
PageFooter

startItems

public void startItems(org.xml.sax.Attributes attr)
                throws org.xml.sax.SAXException
Handles the start of an ItemBand definition.

Parameters:
attr - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a parsing problem.
See Also:
ItemBand

endItems

public void endItems()
              throws org.xml.sax.SAXException
Handles the end of an ItemBand definition.

Throws:
org.xml.sax.SAXException - if a Parser error occurs.
See Also:
ItemBand

endPageHeader

public void endPageHeader()
                   throws org.xml.sax.SAXException
Handles the end of a PageHeader definition.

Throws:
org.xml.sax.SAXException - if a parser error occurs.
See Also:
PageHeader