|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfree.report.function.LevelledExpressionList
A list of expressions/functions and associated levels. This class listens for report events, then passes these events on to the expressions and functions in *descending* level order.
| Constructor Summary | |
protected |
LevelledExpressionList()
DefaultConstructor. |
|
LevelledExpressionList(ExpressionCollection ec,
ExpressionCollection fc)
Creates a new list. |
| Method Summary | |
protected void |
addError(java.lang.Exception e)
Adds the error to the current list of errors. |
protected void |
clearError()
Clears the error list. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
firePrepareEvent(ReportEvent event)
Fires a prepare event. |
protected void |
firePrepareEventLayoutListener(ReportEvent event)
Fires a prepare event layout listeners. |
DataRow |
getDataRow()
Returns the currently connected dataRow. |
java.util.List |
getErrors()
Returns the list of errors, that occured during the last event handling. |
Expression |
getExpression(int index)
Returns an expression. |
int |
getLevel()
Gets the current level. |
java.util.Iterator |
getLevelsAscending()
Returns an iterator that provides access to the levels in ascending order. |
java.util.Iterator |
getLevelsDescending()
Returns an iterator that provides access to the levels in descending order. |
LevelledExpressionList |
getPreviewInstance()
Returns the preview instance of the levelled expression list. |
java.lang.Object |
getValue(int index)
Returns the values of an expression. |
void |
groupFinished(ReportEvent event)
Receives notification that a group is finished. |
void |
groupStarted(ReportEvent event)
Receives notification that a new group has started. |
boolean |
hasErrors()
Returns true, if this list has detected at least one error in the last operation. |
void |
itemsAdvanced(ReportEvent event)
Receives notification that a new row has been read. |
void |
itemsFinished(ReportEvent event)
Receives notification that a group of item bands has been completed. |
void |
itemsStarted(ReportEvent event)
Receives notification that a group of item bands is about to be processed. |
void |
layoutComplete(LayoutEvent event)
Receives notification that the band layouting has completed. |
void |
pageCanceled(ReportEvent event)
Receives notification that a new page is being started. |
void |
pageFinished(ReportEvent event)
Receives notification that a page is completed. |
void |
pageStarted(ReportEvent event)
Receives notification that a new page is being started. |
void |
reportDone(ReportEvent event)
Receives notification that report generation has completed, the report footer was printed, no more output is done. |
void |
reportFinished(ReportEvent event)
Receives notification that report generation has finished (the last record is read and all groups are closed). |
void |
reportInitialized(ReportEvent event)
Receives notification that report generation has started. |
void |
reportStarted(ReportEvent event)
Receives notification that report generation has started. |
void |
setDataRow(DataRow dr)
Connects the given datarow to the expression collection and all expressions contained in this collection. |
void |
setLevel(int level)
Sets the level. |
int |
size()
Size does not change, so it is cached. |
void |
updateDataRow(DataRow dr)
Updates the datarow for all expressions. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected LevelledExpressionList()
public LevelledExpressionList(ExpressionCollection ec,
ExpressionCollection fc)
ec - the expressions from the report definition.fc - the functions from the report definition.| Method Detail |
public void reportStarted(ReportEvent event)
The event carries a ReportState.Started state. Use this to prepare the report header.
reportStarted in interface ReportListenerevent - the event.public void reportInitialized(ReportEvent event)
The event carries a ReportState.Started state. Use this to initialize the report.
reportInitialized in interface ReportListenerevent - the event.public void reportFinished(ReportEvent event)
reportFinished in interface ReportListenerevent - the event.public void pageStarted(ReportEvent event)
pageStarted in interface PageEventListenerevent - the event.public void pageCanceled(ReportEvent event)
pageCanceled in interface PageEventListenerevent - the event.public void pageFinished(ReportEvent event)
pageFinished in interface PageEventListenerevent - the event.public void groupStarted(ReportEvent event)
The group can be determined by the report state's getCurrentGroup() function.
groupStarted in interface ReportListenerevent - the event.public void groupFinished(ReportEvent event)
The group can be determined by the report state's getCurrentGroup() function.
groupFinished in interface ReportListenerevent - the event.public void itemsStarted(ReportEvent event)
The next events will be itemsAdvanced events until the itemsFinished event is raised.
itemsStarted in interface ReportListenerevent - the event.public void itemsFinished(ReportEvent event)
The itemBand is finished, the report starts to close open groups.
itemsFinished in interface ReportListenerevent - the event.public void itemsAdvanced(ReportEvent event)
This event is raised before an ItemBand is printed.
itemsAdvanced in interface ReportListenerevent - the event.public void layoutComplete(LayoutEvent event)
The event carries the current report state.
layoutComplete in interface LayoutListenerevent - The event.public void reportDone(ReportEvent event)
reportDone in interface ReportListenerevent - The event.public void setDataRow(DataRow dr)
dr - the datarow to be connected (null not permitted).
java.lang.IllegalStateException - if there is a datarow already connected.
java.lang.NullPointerException - if the given datarow is null.public void updateDataRow(DataRow dr)
dr - the datarow to be connected.
java.lang.NullPointerException - if the given datarow is null.
java.lang.IllegalStateException - if there is no datarow connected.public DataRow getDataRow()
public int size()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
The cloned LevelledExpressionList will no longer be connected to a datarow.
java.lang.CloneNotSupportedException - if the object's class does not
support the Cloneable interface.
java.lang.OutOfMemoryError - if there is not enough memory.Cloneablepublic LevelledExpressionList getPreviewInstance()
public void setLevel(int level)
level - the level.public int getLevel()
public java.util.Iterator getLevelsDescending()
public java.util.Iterator getLevelsAscending()
public java.lang.Object getValue(int index)
index - the function/expression index.
public Expression getExpression(int index)
index - the function/expression index.
public java.util.List getErrors()
public boolean hasErrors()
protected void addError(java.lang.Exception e)
e - the new exception that occured during the event dispatching.protected void clearError()
public void firePrepareEvent(ReportEvent event)
event - the event.protected void firePrepareEventLayoutListener(ReportEvent event)
event - the event.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||