org.jfree.report.states
Class PostGroupHeaderState

java.lang.Object
  extended byorg.jfree.report.states.ReportState
      extended byorg.jfree.report.states.PostGroupHeaderState
All Implemented Interfaces:
java.lang.Cloneable

public final class PostGroupHeaderState
extends ReportState

The groupHeader has been printed. If there are more groups defined, activate them by creating a new PreGroupHeader state for the next group. If no more groups can be activated, start printing the items by creating a PreItemGroupState.

Transition: PreGroupHeaderState or PreItemHeader

Author:
David Gilbert

Field Summary
 
Fields inherited from class org.jfree.report.states.ReportState
BEFORE_FIRST_GROUP, BEFORE_FIRST_PAGE, BEFORE_FIRST_ROW
 
Constructor Summary
PostGroupHeaderState(ReportState previous)
          Creates a new 'post-group-header' state.
 
Method Summary
 ReportState advance()
          Advances from this state to the next.
protected  boolean hasMoreGroups()
          Checks whether there are more groups the work on.
 boolean isPrefetchState()
          Returns the corrected display item for this state.
 
Methods inherited from class org.jfree.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, getDataRowPreview, getErrors, getFunctions, getLevel, getLevels, getNumberOfRows, getProperties, getProperty, getProperty, getReport, getReportDefinition, isAncestor, isErrorOccured, isFinish, isLastItemInGroup, isPrepareRun, isProceeding, isStart, leaveGroup, nextPage, resetState, setAncestorHashcode, setCurrentGroupIndex, setCurrentItem, setCurrentPage, setProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostGroupHeaderState

public PostGroupHeaderState(ReportState previous)
Creates a new 'post-group-header' state.

Parameters:
previous - the previous state.
Method Detail

hasMoreGroups

protected boolean hasMoreGroups()
Checks whether there are more groups the work on.

Returns:
true, if the currentGroupIndex is smaller than the defined groups - 1

advance

public ReportState advance()
Advances from this state to the next. If the reporting engine hasn't reached the inner-most group yet, move to the 'PRE-GROUP-HEADER' state again, otherwise move to the 'PRE-ITEM-GROUP' state.

Specified by:
advance in class ReportState
Returns:
the next state.

isPrefetchState

public boolean isPrefetchState()
Returns the corrected display item for this state. As the currentItem has not yet advanced we perform a readAHead lookup when populating elements.

Overrides:
isPrefetchState in class ReportState
Returns:
true; the post group header previews the next data row.