| java.lang.Object org.jfree.report.Element org.jfree.report.Band
All known Subclasses: org.jfree.report.PageHeader, org.jfree.report.Watermark, org.jfree.report.PageFooter, org.jfree.report.AbstractRootLevelBand,
Band | public class Band extends Element (Code) | | A report band is a collection of other elements and bands, similiar to an AWT-Container.
This implementation is not synchronized, to take care that you externally synchronize it when using multiple threads
to modify instances of this class.
Trying to add a parent of an band as child to the band, will result in an exception.
author: David Gilbert author: Thomas Morgner |
Constructor Summary | |
public | Band() Constructs a new band (initially empty). | public | Band(boolean pagebreakBefore, boolean pagebreakAfter) Constructs a new band with the given pagebreak attributes. |
ANONYMOUS_BAND_PREFIX | final public static String ANONYMOUS_BAND_PREFIX(Code) | | The prefix for anonymous bands, bands without an userdefined name.
|
CONTENT_TYPE | final public static String CONTENT_TYPE(Code) | | The defined content type for the band.
|
Band | public Band()(Code) | | Constructs a new band (initially empty).
|
Band | public Band(boolean pagebreakBefore, boolean pagebreakAfter)(Code) | | Constructs a new band with the given pagebreak attributes. Pagebreak attributes have no effect on subbands.
Parameters: pagebreakAfter - defines, whether a pagebreak should be done after that band was printed. Parameters: pagebreakBefore - defines, whether a pagebreak should be done before that band gets printed. |
addElement | public void addElement(Element element)(Code) | | Adds a report element to the band.
Parameters: element - the element that should be added throws: NullPointerException - if the given element is null throws: IllegalArgumentException - if the position is invalid, either negative or greater than the number of elementsin this band or if the given element is a parent of this element. |
addElement | public void addElement(int position, Element element)(Code) | | Adds a report element to the band. The element will be inserted at the specified position.
Parameters: position - the position where to insert the element Parameters: element - the element that should be added throws: NullPointerException - if the given element is null throws: IllegalArgumentException - if the position is invalid, either negative or greater than the number of elementsin this band or if the given element is a parent of this element. |
addElements | public void addElements(Collection elements)(Code) | | Adds a collection of elements to the band.
Parameters: elements - the element collection. throws: NullPointerException - if one of the given elements is null throws: IllegalArgumentException - if one of the given element is a parent of this element. |
clone | public Object clone() throws CloneNotSupportedException(Code) | | Clones this band and all elements contained in this band. After the cloning the band is no longer connected to a
report definition.
the clone of this band. throws: CloneNotSupportedException - if this band or an element contained in this band does not support cloning. |
createGlobalDefaultStyle | protected ElementDefaultStyleSheet createGlobalDefaultStyle()(Code) | | Returns the global stylesheet for all bands. This stylesheet provides the predefined default values for some of the
stylekeys.
the global default stylesheet. |
getContentType | public String getContentType()(Code) | | Returns the content type of the element. For bands, the content type is by default "X-container".
the content type |
getElement | public Element getElement(int index)(Code) | | Returns the element stored add the given index.
Parameters: index - the element position within this band the element throws: IndexOutOfBoundsException - if the index is invalid. |
getElementArray | public Element[] getElementArray()(Code) | | Returns an array of the elements in the band. If the band is empty, an empty array is returned.
For performance reasons, a shared cached instance is returned. Do not modify the returned array or live with the
consquences.
the elements. |
getElementCount | public int getElementCount()(Code) | | Returns the number of elements in this band.
the number of elements of this band. |
getElements | public List getElements()(Code) | | Returns all child-elements of this band as immutable list.
an immutable list of all registered elements for this band. |
isPagebreakAfterPrint | public boolean isPagebreakAfterPrint()(Code) | | Returns, whether the page layout manager should perform a pagebreak before this page is printed. This will have no
effect on empty pages or if the band is no root-level band.
true, if to force a pagebreak before this band is printed, false otherwise |
isPagebreakBeforePrint | public boolean isPagebreakBeforePrint()(Code) | | Returns, whether the page layout manager should perform a pagebreak before this page is printed. This will have no
effect on empty pages or if the band is no root-level band.
true, if to force a pagebreak before this band is printed, false otherwise |
removeElement | public void removeElement(Element e)(Code) | | Removes an element from the band.
Parameters: e - the element to be removed. throws: NullPointerException - if the given element is null. |
setPagebreakAfterPrint | public void setPagebreakAfterPrint(boolean pagebreakAfterPrint)(Code) | | Defines, whether the page layout manager should perform a pagebreak before this page is printed. This will have no
effect on empty pages or if the band is no root-level band.
Parameters: pagebreakAfterPrint - set to true, if to force a pagebreak before this band is printed, false otherwise |
setPagebreakBeforePrint | public void setPagebreakBeforePrint(boolean pagebreakBeforePrint)(Code) | | Defines, whether the page layout manager should perform a pagebreak before this page is printed. This will have no
effect on empty pages or if the band is no root-level band.
Parameters: pagebreakBeforePrint - set to true, if to force a pagebreak before this band is printed, false otherwise |
setReportDefinition | protected void setReportDefinition(ReportDefinition reportDefinition)(Code) | | Assigns the report definition to this band.
Parameters: reportDefinition - the report definition or null, if the band is not part of a valid report definition. |
toString | public String toString()(Code) | | Returns a string representation of the band, useful mainly for debugging
purposes.
a string representation of this band. |
Fields inherited from org.jfree.report.Element | final public static String ANONYMOUS_ELEMENT_PREFIX(Code)(Java Doc)
|
|
|