|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.jfree.report.Element
|
+--org.jfree.report.Band
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. Bands automaticly inherit their style data to all their assigned childs. Trying to add a parent of an band as child to the band, will result in an exception.
| Field Summary | |
static java.lang.String |
ANONYMOUS_BAND_PREFIX
The prefix for anonymous bands, bands without an userdefined name. |
static java.lang.String |
CONTENT_TYPE
the defined content type for the band. |
| Fields inherited from class org.jfree.report.Element |
ANONYMOUS_ELEMENT_PREFIX |
| Constructor Summary | |
Band()
Constructs a new band (initially empty). |
|
Band(boolean pagebreakBefore,
boolean pagebreakAfter)
Constructs a new band with the given pagebreak attributes. |
|
| Method Summary | |
void |
addElement(Element element)
Adds a report element to the band. |
void |
addElement(int position,
Element element)
Adds a report element to the band. |
void |
addElements(java.util.Collection elements)
Adds a collection of elements to the band. |
java.lang.Object |
clone()
Clones this band and all elements contained in this band. |
protected ElementDefaultStyleSheet |
createGlobalDefaultStyle()
Returns the global stylesheet for all bands. |
java.lang.String |
getContentType()
Returns the content type of the element. |
Element |
getElement(int index)
Returns the element stored add the given index. |
Element |
getElement(java.lang.String name)
Returns the first element in the list that is known by the given name. |
Element[] |
getElementArray()
Returns an array of the elements in the band. |
int |
getElementCount()
Returns the number of elements in this band. |
java.util.List |
getElements()
Deprecated. use getElementArray() instead. |
BandLayoutManager |
getLayout()
Returns the layout manager for the band. |
boolean |
isPagebreakAfterPrint()
Returns, whether the page layout manager should perform a pagebreak before this page is printed. |
boolean |
isPagebreakBeforePrint()
Returns, whether the page layout manager should perform a pagebreak before this page is printed. |
void |
removeElement(Element e)
Removes an element from the band. |
void |
setLayout(BandLayoutManager layoutManager)
Sets the band layout manager. |
void |
setPagebreakAfterPrint(boolean pagebreakAfterPrint)
Defines, whether the page layout manager should perform a pagebreak before this page is printed. |
void |
setPagebreakBeforePrint(boolean pagebreakBeforePrint)
Defines, whether the page layout manager should perform a pagebreak before this page is printed. |
protected void |
setReportDefinition(ReportDefinition reportDefinition)
Assigns the report definition to this band. |
java.lang.String |
toString()
Returns a string representation of the band and all the elements it contains, useful mainly for debugging purposes. |
| Methods inherited from class org.jfree.report.Element |
connectDataSource,
disconnectDataSource,
getDataSource,
getHRefTarget,
getMaximumSize,
getMinimumSize,
getName,
getObjectID,
getParent,
getPreferredSize,
getReportDefinition,
getStyle,
getTreeLock,
getValue,
isDynamicContent,
isLayoutCacheable,
isVisible,
setDataSource,
setDynamicContent,
setHRefTarget,
setLayoutCacheable,
setMaximumSize,
setMinimumSize,
setName,
setParent,
setPreferredSize,
setVisible |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final java.lang.String CONTENT_TYPE
public static final java.lang.String ANONYMOUS_BAND_PREFIX
| Constructor Detail |
public Band()
public Band(boolean pagebreakBefore,
boolean pagebreakAfter)
pagebreakAfter - defines, whether a pagebreak should be done after that band
was printed.pagebreakBefore - defines, whether a pagebreak should be done before that band
gets printed.| Method Detail |
protected ElementDefaultStyleSheet createGlobalDefaultStyle()
public BandLayoutManager getLayout()
public void setLayout(BandLayoutManager layoutManager)
layoutManager - the layout manager.public void addElement(Element element)
element - the element that should be added
public void addElement(int position,
Element element)
position - the position where to insert the elementelement - the element that should be addedpublic void addElements(java.util.Collection elements)
elements - the element collection.public Element getElement(java.lang.String name)
name - the element name.null if there is
no such element.public void removeElement(Element e)
e - the element to be removed.public java.util.List getElements()
getElementArray() instead.
public int getElementCount()
public Element[] getElementArray()
public Element getElement(int index)
index - the element position within this bandpublic java.lang.String toString()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
public java.lang.String getContentType()
public boolean isPagebreakBeforePrint()
public void setPagebreakBeforePrint(boolean pagebreakBeforePrint)
pagebreakBeforePrint - set to true, if to force a pagebreak before this band is
printed, false otherwisepublic boolean isPagebreakAfterPrint()
public void setPagebreakAfterPrint(boolean pagebreakAfterPrint)
pagebreakAfterPrint - set to true, if to force a pagebreak before this band is
printed, false otherwiseprotected void setReportDefinition(ReportDefinition reportDefinition)
reportDefinition - the report definition or null, if the band is not part of a
valid report definition.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||