|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.function.AbstractFunction | +--com.jrefinery.report.targets.pageable.pagelayout.PageLayouter
The baseclass for all PageLayouter. A page layouter is the layoutmanager of an logical page. This layoutmanager is responsible for handling and detecting page breaks, for placing the various Root-Bands (bands that are contained directly in an report) on the page and for the global appeareance of an page (columns, band placement policy etc.)
A PageLayouter for an Report is defined by the ReportProperty
pageable.layoutManager
by setting the classname of the page layouter.
The specified class must contain an DefaultConstructor and must be an instance of
PageLayouter.
All PageLayouter may define a set of LayoutConstraints for use in the Root-Bands. These constraints can be used to configure the layouting process. It is up to the layoutmanager implementation, which constraints are recognized and how these constraints are used.
All layoutmanagers should document their known constraints.
Nested Class Summary | |
protected static class |
PageLayouter.LayoutManagerState
Represents the state of the page layouter. |
Field Summary |
Fields inherited from interface com.jrefinery.report.function.Expression |
AUTOACTIVATE_PROPERTY |
Constructor Summary | |
PageLayouter()
Creates a new page layouter. |
Method Summary | |
protected void |
clearCurrentEvent()
Clears the current event. |
void |
clearLogicalPage()
Clears the logical page reference. |
protected void |
clearSaveState()
Clear the saveState. |
java.lang.Object |
clone()
Returns a clone of the PageLayouter. |
protected void |
endPage()
Ends a page. |
protected ReportEvent |
getCurrentEvent()
Returns the current report event. |
int |
getDependencyLevel()
The dependency level defines the level of execution for this function. |
PageLayouter.LayoutManagerState |
getLayoutManagerState()
Return the last stored LayoutManager state or null if there is no state stored. |
LogicalPage |
getLogicalPage()
Returns the logical page. |
ReportDefinition |
getReport()
Returns the report that should be printed. |
java.lang.Object |
getValue()
Return a self-reference. |
boolean |
isFinishingPage()
Returns the 'finishing page' flag. |
boolean |
isGeneratedPageEmpty()
Maintains a flag, whether the generated page was completly empty. |
abstract boolean |
isNewPageStarted()
Returns true, if the PageLayouter has successfully started a new page. |
boolean |
isPageEnded()
Checks whether this page has ended. |
boolean |
isPageRestartDone()
Returns whether the restarting of the page is completed. |
boolean |
isRestartingPage()
Returns the 'restarting page' flag. |
void |
restoreSaveState(ReportState ancestor)
Restores the state. |
protected abstract PageLayouter.LayoutManagerState |
saveCurrentState()
Save the current state into the LayoutManagerState object. |
protected void |
setCurrentEvent(ReportEvent currentEvent)
Sets the current event (also updates the report reference). |
void |
setDependencyLevel(int deplevel)
Overrides the depency level. |
void |
setFinishingPage(boolean finishingPage)
Sets the 'finishing page' flag. |
protected void |
setGeneratedPageEmpty(boolean generatedPageEmpty)
Defines a flag, whether the generated page was completly empty. |
void |
setLogicalPage(LogicalPage logicalPage)
Sets the logical page for the layouter. |
void |
setPageRestartDone(boolean pageRestartDone)
Defines whether the restarting of the page is completed. |
void |
setRestartingPage(boolean restartingPage)
Sets the 'restarting page' flag. |
protected void |
startPage()
Restarts the current page. |
Methods inherited from class com.jrefinery.report.function.AbstractFunction |
getDataRow, getInstance, getName, getProperties, getProperty, getProperty, groupFinished, groupStarted, initialize, isActive, itemsAdvanced, itemsFinished, itemsStarted, pageFinished, pageStarted, reportDone, reportFinished, reportInitialized, reportStarted, setDataRow, setName, setProperties, setProperty |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PageLayouter()
Method Detail |
public boolean isPageRestartDone()
public void setPageRestartDone(boolean pageRestartDone)
pageRestartDone
- set to true, if the restart process for this page is completed,
false otherwise.public boolean isGeneratedPageEmpty()
protected void setGeneratedPageEmpty(boolean generatedPageEmpty)
generatedPageEmpty
- true, if the page was empty when the logical page was closed,
false otherwise.public void setLogicalPage(LogicalPage logicalPage)
logicalPage
- the logical page (null not permitted).
java.lang.NullPointerException
- it the logical page is nullpublic void clearLogicalPage()
public LogicalPage getLogicalPage()
public boolean isFinishingPage()
When set to true, indicates that the current page is shut down. The page footer should be printed and the state stored. Trying to end the page again while the finishing process is not complete will result in an IllegalState.
If the page should be finished while the page is restarted, will throw an ReportProcessing exception, as this would result in an infinite loop.
public void setFinishingPage(boolean finishingPage)
finishingPage
- the new flag value.isFinishingPage()
public boolean isRestartingPage()
Is set to true, while the page is started. The last saved state is restored and the page header gets prepared. Trying the start the page again while the restarting process is not complete or while the page is currently being finished, will result in an IllegalState.
public void setRestartingPage(boolean restartingPage)
restartingPage
- sets the restarting page flag.isRestartingPage()
public ReportDefinition getReport()
protected ReportEvent getCurrentEvent()
protected void setCurrentEvent(ReportEvent currentEvent)
currentEvent
- event.protected void clearCurrentEvent()
protected void endPage() throws ReportProcessingException
While this method is executed, the FinishingPage flag is set to true.
You are not able to print on the logical page after the page is finished.
java.lang.IllegalStateException
- if the page end is requested a second time
ReportProcessingException
- if the page end is requested while the page
is restarted.protected void startPage()
public boolean isPageEnded()
public abstract boolean isNewPageStarted()
protected abstract PageLayouter.LayoutManagerState saveCurrentState()
public PageLayouter.LayoutManagerState getLayoutManagerState()
protected void clearSaveState()
public java.lang.Object getValue()
public int getDependencyLevel()
PageLayouter functions override the default behaviour an place them self at depency level -1, an so before any userdefined function.
getDependencyLevel
in interface Expression
getDependencyLevel
in class AbstractFunction
public void setDependencyLevel(int deplevel)
setDependencyLevel
in interface Expression
setDependencyLevel
in class AbstractFunction
deplevel
- the new depency level.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Be aware, this does not create a deep copy. If you have complex structures contained in objects, you have to overwrite this function.
clone
in interface Function
clone
in class AbstractFunction
java.lang.CloneNotSupportedException
- this should never happen.public void restoreSaveState(ReportState ancestor) throws ReportProcessingException
ancestor
- the ancestor state.
ReportProcessingException
- if the printing failed or a pagebreak is
requested while the page is restored.
java.lang.IllegalStateException
- if there is no SavedState but this is not the
first page.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |