org.jfree.report.structure
Class Section
- Cloneable, Serializable
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.
Section() - Constructs a new band (initially empty).
|
addExpression , clone , getAttribute , getAttribute , getAttributeExpression , getAttributeExpression , getAttributeExpressionMap , getAttributeExpressions , getAttributeMap , getAttributeNameSpaces , getAttributes , getDisplayCondition , getExpressions , getId , getLocale , getLocaleFromAttributes , getName , getNamespace , getStyle , getStyleExpression , getStyleExpressions , getType , getVisibility , isEnabled , isVirtual , setAttribute , setAttribute , setAttributeExpression , setAttributeExpression , setDisplayCondition , setEnabled , setExpressions , setId , setName , setNamespace , setStyleExpression , setType , setVirtual , setVisibility |
Section
public Section()
Constructs a new band (initially empty).
addNode
public void addNode(int position,
Node element)
Adds a report element to the band. The element will be inserted at the
specified position.
position
- the position where to insert the elementelement
- the element that should be added
addNode
public void addNode(Node element)
Adds a report element to the band.
element
- the element that should be added
addNodes
public void addNodes(Collection elements)
Adds a collection of elements to the band.
elements
- the element collection.
clone
public Object clone()
throws CloneNotSupportedException
- clone in interface Element
getElementByName
public Element getElementByName(String name)
Returns the first element in the list that is known by the given name.
- the first element with the specified name, or
null
if
there is no such element.
getNode
public Node getNode(int index)
Returns the element stored add the given index.
index
- the element position within this band
getNodeArray
public Node[] getNodeArray()
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.
getNodeCount
public int getNodeCount()
Returns the number of elements in this band.
- the number of elements of this band.
getNodes
public List getNodes()
use getElementArray()
instead.
Returns all child-elements of this band as immutable list.
- an immutable list of all registered elements for this band.
removeNode
public void removeNode(Node e)
Removes an element from the band.
e
- the element to be removed.
setRepeat
public void setRepeat(boolean repeat)
toString
public String toString()
Returns a string representation of the band and all the elements it
contains, useful mainly for debugging purposes.
- a string representation of this band.