com.jrefinery.report.states
Class FinishState

java.lang.Object
  extended bycom.jrefinery.report.states.ReportState
      extended bycom.jrefinery.report.states.FinishState
All Implemented Interfaces:
java.lang.Cloneable, JFreeReportConstants

public final class FinishState
extends ReportState

The report is done. No advance will be done, every call to advance will throw an ReportProcessingException.

Author:
David Gilbert

Field Summary
 
Fields inherited from class com.jrefinery.report.states.ReportState
BEFORE_FIRST_GROUP, BEFORE_FIRST_PAGE, BEFORE_FIRST_ROW
 
Fields inherited from interface com.jrefinery.report.JFreeReportConstants
NAME_PROPERTY, REPORT_DATE_PROPERTY, REPORT_DEFINITION_CONTENTBASE, REPORT_DEFINITION_SOURCE, REPORT_PAGECOUNT_PROPERTY, REPORT_PAGEFORMAT_PROPERTY, REPORT_PREPARERUN_PROPERTY
 
Constructor Summary
FinishState(ReportState previous)
          Creates a new 'finish' report state.
 
Method Summary
 ReportState advance()
          Normally, this method would perform a transition to the next state, but since this is the final state there is nowhere to go, so a ReportProcessingException is thrown.
 boolean isFinish()
          Returns true, to indicate that this is the 'finish' state.
 
Methods inherited from class com.jrefinery.report.states.ReportState
advanceItem, clone, createStateProgress, enterGroup, fireGroupFinishedEvent, fireGroupStartedEvent, fireItemsAdvancedEvent, fireItemsFinishedEvent, fireItemsStartedEvent, fireLayoutCompleteEvent, firePageCanceledEvent, firePageFinishedEvent, firePageStartedEvent, firePrepareEvent, fireReportDoneEvent, fireReportFinishedEvent, fireReportInitializedEvent, fireReportStartedEvent, getAncestorHashcode, getCurrentDataItem, getCurrentDisplayItem, getCurrentGroupIndex, getCurrentPage, getDataRow, getDataRowBackend, getDataRowConnector, getErrors, getFunctions, getLevel, getLevels, getNumberOfRows, getProperties, getProperty, getProperty, getReport, isAncestor, isErrorOccured, isPrefetchState, isPrepareRun, isProceeding, isStart, leaveGroup, nextPage, resetState, setAncestorHashcode, setCurrentGroupIndex, setCurrentItem, setCurrentPage, setFunctions, setProperty, updateDataRow
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinishState

public FinishState(ReportState previous)
Creates a new 'finish' report state.

Parameters:
previous - the previous state.
Method Detail

advance

public ReportState advance()
                    throws ReportProcessingException
Normally, this method would perform a transition to the next state, but since this is the final state there is nowhere to go, so a ReportProcessingException is thrown.

Specified by:
advance in class ReportState
Returns:
nothing, since a ReportProcessingException is thrown before the method returns.
Throws:
ReportProcessingException - to indicate that it is not possible to advance to another state from the finish state.

isFinish

public boolean isFinish()
Returns true, to indicate that this is the 'finish' state.

Overrides:
isFinish in class ReportState
Returns:
true, as this report is done and will no longer advance.