org.jfree.report.states
Class PreItemGroupState

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

public final class PreItemGroupState
extends ReportState

Prepare to print the items. This state fires the itemStarted-Event and advances to the InItemGroupState state.

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
PreItemGroupState(ReportState previous)
          Creates a new 'pre-item-group' state.
 
Method Summary
 ReportState advance()
          Advances to the next state.
 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

PreItemGroupState

public PreItemGroupState(ReportState previous)
Creates a new 'pre-item-group' state.

Parameters:
previous - the previous state.
Method Detail

advance

public ReportState advance()
Advances to the next state. Normally this will be the 'IN-ITEM-GROUP' state, but if the report's data (TableModel) has no rows, proceed to the 'POST-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; Header related states preview the next itemband DataRow.