org.jfree.report.event
Class ReportEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.jfree.report.event.ReportEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LayoutEvent

public class ReportEvent
extends java.util.EventObject

Represents a report event.

Includes information regarding which ReportState generated the event.

Author:
Thomas Morgner
See Also:
Serialized Form

Field Summary
static int GROUP_FINISHED
          The event type constant, that a group finished event is invoked.
static int GROUP_STARTED
          The event type constant, that a group start event is invoked.
static int ITEMS_ADVANCED
          The event type constant, that the items advanced event is invoked.
static int ITEMS_FINISHED
          The event type constant, that the items finished event is invoked.
static int ITEMS_STARTED
          The event type constant, that the items started event is invoked.
static int PAGE_CANCELED
          The event type constant, that the page finished event is invoked.
static int PAGE_FINISHED
          The event type constant, that the page finished event is invoked.
static int PAGE_STARTED
          The event type constant, that the page start event is invoked.
static int POST_GROUP_FOOTER
          The event type constant, that the post group footer state will be processed.
static int POST_GROUP_HEADER
          The event type constant, that the post group header state will be processed.
static int PREPARE_EVENT
          The event type constant, that this event is a prepare event.
static int REPORT_DONE
          The event type constant, that the report done event is invoked.
static int REPORT_FINISHED
          The event type constant, that the report finished event is invoked.
static int REPORT_INITIALIZED
          The event type constant, that the report initialize event is invoked.
static int REPORT_STARTED
          The event type constant, that the report start event is invoked.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ReportEvent(ReportState state, int type)
          Creates a new ReportEvent.
 
Method Summary
 DataRow getDataRow()
          Returns the currently assigned dataRow for this event.
 int getLevel()
          Returns the current function level.
 ReportDefinition getReport()
          Returns the report that generated the event.
 ReportState getState()
          Returns the ReportState, which is the source of the event.
 int getType()
          Returns the event type.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REPORT_INITIALIZED

public static final int REPORT_INITIALIZED
The event type constant, that the report initialize event is invoked.

See Also:
Constant Field Values

PAGE_STARTED

public static final int PAGE_STARTED
The event type constant, that the page start event is invoked.

See Also:
Constant Field Values

REPORT_STARTED

public static final int REPORT_STARTED
The event type constant, that the report start event is invoked.

See Also:
Constant Field Values

GROUP_STARTED

public static final int GROUP_STARTED
The event type constant, that a group start event is invoked.

See Also:
Constant Field Values

ITEMS_STARTED

public static final int ITEMS_STARTED
The event type constant, that the items started event is invoked.

See Also:
Constant Field Values

ITEMS_ADVANCED

public static final int ITEMS_ADVANCED
The event type constant, that the items advanced event is invoked.

See Also:
Constant Field Values

ITEMS_FINISHED

public static final int ITEMS_FINISHED
The event type constant, that the items finished event is invoked.

See Also:
Constant Field Values

GROUP_FINISHED

public static final int GROUP_FINISHED
The event type constant, that a group finished event is invoked.

See Also:
Constant Field Values

REPORT_FINISHED

public static final int REPORT_FINISHED
The event type constant, that the report finished event is invoked.

See Also:
Constant Field Values

REPORT_DONE

public static final int REPORT_DONE
The event type constant, that the report done event is invoked.

See Also:
Constant Field Values

PAGE_FINISHED

public static final int PAGE_FINISHED
The event type constant, that the page finished event is invoked.

See Also:
Constant Field Values

PAGE_CANCELED

public static final int PAGE_CANCELED
The event type constant, that the page finished event is invoked.

See Also:
Constant Field Values

POST_GROUP_FOOTER

public static final int POST_GROUP_FOOTER
The event type constant, that the post group footer state will be processed.

See Also:
Constant Field Values

POST_GROUP_HEADER

public static final int POST_GROUP_HEADER
The event type constant, that the post group header state will be processed.

See Also:
Constant Field Values

PREPARE_EVENT

public static final int PREPARE_EVENT
The event type constant, that this event is a prepare event. Use this constant in combination with one of the other event types to specify which kind of event was prepared.

See Also:
Constant Field Values
Constructor Detail

ReportEvent

public ReportEvent(ReportState state,
                   int type)
Creates a new ReportEvent.

Parameters:
state - the current state of the processed report (null not permmitted).
type - the event type for this event object.
Method Detail

getType

public int getType()
Returns the event type. The type is made up of a combination of several flags.

Returns:
the event type.

getState

public ReportState getState()
Returns the ReportState, which is the source of the event.

Returns:
the state (never null).

getReport

public ReportDefinition getReport()
Returns the report that generated the event.

This is a convenience method that extracts the report from the report state.

Returns:
the report.

getDataRow

public DataRow getDataRow()
Returns the currently assigned dataRow for this event.

The DataRow is used to access the fields of the DataSource and other functions and expressions within the current row of the report.

Returns:
the data row.

getLevel

public int getLevel()
Returns the current function level.

Returns:
the function level.