|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.function.AbstractFunction
org.jfree.report.function.PageFunction
A report function that counts pages. This method is only useable when a report processor is used, which generated PageEvents. The PageableReportProcessor is one of them.
As with all page dependent functions: The function will only be active, when the page events get fired, this usually only happens during the last pagination run and the printing. The function level will be negative when this happens.
Field Summary |
Fields inherited from interface org.jfree.report.function.Expression |
AUTOACTIVATE_PROPERTY |
Constructor Summary | |
PageFunction()
Constructs an unnamed function. |
|
PageFunction(java.lang.String name)
Constructs a named function. |
Method Summary | |
java.lang.String |
getGroup()
Returns the group name. |
protected int |
getPage()
Returns the current page. |
int |
getStartPage()
Returns the start page. |
java.lang.Object |
getValue()
Returns the page number (function value). |
void |
groupStarted(ReportEvent event)
Receives notification that a group has started. |
void |
initialize()
Checks that the function has been correctly initialized. |
boolean |
isIgnorePageCancelEvents()
Returns whether this function will ignore PageCancel events. |
void |
pageCanceled(ReportEvent event)
Receives notification that a page was canceled by the ReportProcessor. |
void |
pageFinished(ReportEvent event)
Receives notification that a page is completed. |
void |
pageStarted(ReportEvent event)
Receives notification from the report engine that a new page is starting. |
void |
reportInitialized(ReportEvent event)
Receives notification that the report has started. |
void |
setGroup(java.lang.String group)
Sets the name of the group that the function acts upon. |
protected void |
setPage(int page)
Sets the current page. |
Methods inherited from class org.jfree.report.function.AbstractFunction |
clone, getDataRow, getDependencyLevel, getInstance, getName, getProperties, getProperty, getProperty, groupFinished, isActive, itemsAdvanced, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted, setDataRow, setDependencyLevel, setName, setProperties, setProperty |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PageFunction()
This constructor is intended for use by the SAX handler class only.
public PageFunction(java.lang.String name)
name
- the function name.Method Detail |
public void pageStarted(ReportEvent event)
pageStarted
in interface PageEventListener
event
- the event.public void pageCanceled(ReportEvent event)
pageCanceled
in interface PageEventListener
event
- The event.public void pageFinished(ReportEvent event)
pageFinished
in interface PageEventListener
event
- The event.public void groupStarted(ReportEvent event)
groupStarted
in interface ReportListener
groupStarted
in class AbstractFunction
event
- the event.public void reportInitialized(ReportEvent event)
reportInitialized
in interface ReportListener
reportInitialized
in class AbstractFunction
event
- the event.public java.lang.Object getValue()
getValue
in interface Expression
public void initialize() throws FunctionInitializeException
initialize
in interface Expression
initialize
in class AbstractFunction
FunctionInitializeException
- if the function name is not set or the call to
isInitialized returns false.public java.lang.String getGroup()
public void setGroup(java.lang.String group)
group
- the group name.public int getStartPage()
public boolean isIgnorePageCancelEvents()
protected int getPage()
protected void setPage(int page)
page
- the page.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |