|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A hierarchy of styled information grouped together to form a report. Each
report has a non-null
root element. Depending on the type of
the root element, the root may have child elements, which themselves have child elements,
an so forth, forming an element hierarchy.
The content of the report
is wrapped by these elements. Use Element.getObject()
to
work with the report data.
The content of the report may be
changed directly by invoking
setObject
, passing the element whose object is to be changed.
However, if the report does not support modification of the element,
it will throw an UnsupportedOperationException
.
Before calling setObject
, clients should invoke
isElementEditable
to ensure that the content can be changed.
In addition to content changes, reports may have
structural changes (although the current API does not
directly support structural changes at this time). Whenever a change
occurs, the report fires the appropriate ReportEvent
. To
receive these events, register a ReportListener
with the report.
Element
,
JReportPane
,
ReportTemplate
Method Summary | |
void |
addReportListener(ReportListener listener)
Adds the specified ReportListener to this report. |
Element |
getRootElement()
Returns this report's root element. |
ReportTemplate |
getTemplate()
Returns the report template for which this report was generated, or null if no template was used. |
Theme |
getTheme()
Returns the theme controlling the appearance of this report. |
boolean |
isElementEditable(Element element)
Returns true if this report supports the modification of the specified
report element. |
void |
removeReportListener(ReportListener listener)
Removes the specified ReportListener from this report. |
void |
setObject(Element element,
java.lang.Object object)
Sets the specified element's object to object . |
Method Detail |
public void addReportListener(ReportListener listener)
ReportListener
to this report.
listener
- object that wishes to be notified when this
report fires a ReportEvent
java.lang.NullPointerException
- if listener
is null
public Element getRootElement()
public Theme getTheme()
public ReportTemplate getTemplate()
null
if no template was used.
null
)public boolean isElementEditable(Element element)
true
if this report supports the modification of the specified
report element.
element
- the report element in question
true
if element
can be modified;
false
otherwise
java.lang.IllegalArgumentException
- if element
does not belong to this report
java.lang.NullPointerException
- if element
is null
public void removeReportListener(ReportListener listener)
ReportListener
from this report.
listener
- object that no longer wishes to be notified when
this report fires a ReportEvent
java.lang.NullPointerException
- if listener
is null
public void setObject(Element element, java.lang.Object object)
object
.
element
- the report element to associate with object
object
- the object to associate with element
java.lang.IllegalArgumentException
- if element
does not belong to this report
java.lang.NullPointerException
- if element
is null
java.lang.UnsupportedOperationException
- if this report does not support
editing of element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |