public class Band extends Section
Modifier and Type | Field and Description |
---|---|
static String |
ANONYMOUS_BAND_PREFIX
The prefix for anonymous bands, bands without an userdefined name.
|
ANONYMOUS_ELEMENT_PREFIX
Constructor and Description |
---|
Band()
Constructs a new band (initially empty).
|
Band(boolean pagebreakBefore,
boolean pagebreakAfter)
Constructs a new band with the given pagebreak attributes.
|
Band(InstanceID id) |
Modifier and Type | Method and Description |
---|---|
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(Collection elements)
Adds a collection of elements to the band.
|
void |
clear() |
Band |
clone()
Clones this band and all elements contained in this band.
|
Band |
derive(boolean preserveElementInstanceIds)
Creates a deep copy of this element and regenerates all instance-ids.
|
ElementStyleSheet |
getDefaultStyleSheet()
Returns the global stylesheet for all bands.
|
Element |
getElement(int index)
Returns the element stored add the given index.
|
Element |
getElement(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.
|
String |
getLayout() |
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 |
removeElement(int index) |
void |
setElementAt(int position,
Element element) |
void |
setLayout(String layout) |
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.
|
String |
toString()
Returns a string representation of the band, useful mainly for debugging purposes.
|
Element[] |
unsafeGetElementArray() |
iterator, registerAsChild, unregisterAsChild, unregisterParent, validateLooping
copyAttributes, copyInto, derive, getAttribute, getAttributeExpression, getAttributeExpressionNames, getAttributeExpressionNamespaces, getAttributeExpressions, getAttributeNames, getAttributeNamespaces, getAttributes, getAttributeTyped, getChangeTracker, getChildElementByType, getChildElementsByName, getChildElementsByType, getComputedStyle, getContentBase, getDataSource, getDefinitionSource, getElementContext, getElementType, getElementTypeName, getFirstAttribute, getHRefTarget, getId, getMasterReport, getMetaData, getName, getObjectID, getParent, getParentSection, getReportDefinition, getStyle, getStyleExpression, getStyleExpressions, getTreeLock, isDynamicContent, isVisible, notifyElement, notifyNodeChildAdded, notifyNodeChildRemoved, notifyNodePropertiesChanged, notifyNodePropertiesChanged, notifyNodeStructureChanged, setAttribute, setAttribute, setAttributeExpression, setChangeTracker, setComputedStyle, setDataSource, setDynamicContent, setElementType, setHRefTarget, setId, setName, setParent, setStyleExpression, setVisible, updateChangedFlagInternal, updateInternalChangeFlag
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final String ANONYMOUS_BAND_PREFIX
public Band()
public Band(InstanceID id)
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.public ElementStyleSheet getDefaultStyleSheet()
getDefaultStyleSheet
in interface ReportElement
getDefaultStyleSheet
in class Section
public void addElement(Element element)
element
- the element that should be addedNullPointerException
- if the given element is nullIllegalArgumentException
- if the position is invalid, either negative or greater than the number of elements in this band or if the
given element is a parent of this element.public void addElement(int position, Element element)
position
- the position where to insert the elementelement
- the element that should be addedNullPointerException
- if the given element is nullIllegalArgumentException
- if the position is invalid, either negative or greater than the number of elements in this band or if the
given element is a parent of this element.public void addElements(Collection elements)
elements
- the element collection.NullPointerException
- if one of the given elements is nullIllegalArgumentException
- if one of the given element is a parent of this element.public Element getElement(String name)
FunctionUtilities.findAllElements(Band, String)
or
FunctionUtilities.findElement(Band, String)
instead.name
- the element name.null
if there is no such element.NullPointerException
- if the given name is null.public void removeElement(Element e)
removeElement
in class Section
e
- the element to be removed.NullPointerException
- if the given element is null.public void removeElement(int index)
public void setElementAt(int position, Element element)
setElementAt
in class Section
public void clear()
public int getElementCount()
getElementCount
in class Section
public Element[] getElementArray()
unsafeGetElementArray()
method now.public final Element[] unsafeGetElementArray()
public Element getElement(int index)
getElement
in class Section
index
- the element position within this bandIndexOutOfBoundsException
- if the index is invalid.public String toString()
public Band clone()
clone
in interface DataTarget
clone
in class Section
public Band derive(boolean preserveElementInstanceIds)
derive
in class Section
preserveElementInstanceIds
- defines whether this call generates new instance-ids for the derived elements. Instance-IDs are used by
the report processor to recognize reoccurring elements and must not changed within the report run. Outside
of the report processors new instance ids should be generated at all times to separate instances and to
make them uniquely identifiable.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 otherwisepublic void setLayout(String layout)
public String getLayout()
Copyright © 2017 Hitachi Vantara. All rights reserved.