| java.lang.Object org.jfree.report.structure.Node org.jfree.report.structure.Element org.jfree.report.structure.Section
All known Subclasses: org.jfree.report.structure.ReportDefinition, org.jfree.report.structure.DetailSection, org.jfree.report.structure.Group,
Section | public class Section extends Element (Code) | | A report section is a collection of other elements and sections.
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.
The attribute and style expressions added to the element are considered
unnamed and stateless. To define a named, statefull state expression, one
would create an ordinary named expression or function and would then
reference that expression from within a style or attribute expression.
author: Thomas Morgner |
Constructor Summary | |
public | Section() Constructs a new band (initially empty). |
Section | public Section()(Code) | | Constructs a new band (initially empty).
|
addNode | public void addNode(Node 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, eithernegative or greater than the number ofelements in this band or if the givenelement is a parent of this element. |
addNode | public void addNode(int position, Node 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, eithernegative or greater than the number ofelements in this band or if the givenelement is a parent of this element. |
addNodes | public void addNodes(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 ofthis element. |
getElementByName | public Element getElementByName(String name)(Code) | | Returns the first element in the list that is known by the given name.
Parameters: name - the element name. the first element with the specified name, or null ifthere is no such element. throws: NullPointerException - if the given name is null. |
getNode | public Node getNode(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. |
getNodeArray | public Node[] getNodeArray()(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. |
getNodeCount | public int getNodeCount()(Code) | | Returns the number of elements in this band.
the number of elements of this band. |
getNodes | public List getNodes()(Code) | | Returns all child-elements of this band as immutable list.
an immutable list of all registered elements for this band. |
isRepeat | public boolean isRepeat()(Code) | | |
removeNode | public void removeNode(Node e)(Code) | | Removes an element from the band.
Parameters: e - the element to be removed. throws: NullPointerException - if the given element is null. |
setRepeat | public void setRepeat(boolean repeat)(Code) | | |
toString | public String toString()(Code) | | Returns a string representation of the band and all the elements it
contains, useful mainly for debugging purposes.
a string representation of this band. |
|
|