|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
org.pentaho.reporting.engine.classic.core.event.ReportProgressEvent
public class ReportProgressEvent
A report progress event notifies the listeners about the proceedings of the report processing. It is generated by the report processor implementations.
Field Summary | |
---|---|
static int |
COMPUTING_LAYOUT
An activity constant that indicates that the current report is currently being processed. |
static int |
GENERATING_CONTENT
An activity constant that indicates that the report content is generated. |
static int |
PAGINATING
An activity constant that indicates that the report's page-layout is being computed. |
static int |
PRECOMPUTING_VALUES
An activity constant that indicates that the report is precomputing values. |
Constructor Summary | |
---|---|
ReportProgressEvent(Object source)
Creates a new even without any properties defined. |
|
ReportProgressEvent(Object source,
int page)
Creates a new even without any properties defined. |
|
ReportProgressEvent(Object source,
int activity,
int row,
int maximumRow,
int page,
int level,
int maximumLevel)
Creates a new report-progress event. |
Method Summary | |
---|---|
Object |
clone()
Creats a copy of the current instance of this object. |
static double |
computePercentageComplete(ReportProgressEvent event,
boolean onlyPagination)
Computes the percentage complete (on a scale from 0.0 to 100.0) based on the information found in the report progress event. |
int |
getActivity()
Returns the current activity (one of COMPUTING_LAYOUT, PRECOMPUTING_VALUES, PAGINATING or GENERATING_CONTENT). |
int |
getLevel()
Returns the current processing level. |
int |
getMaximumLevel()
Returns the maximum level the report processing can reach for the report that generated the event. |
int |
getMaximumRow()
Returns the total number of rows contained in this report's datasource. |
int |
getPage()
Returns the current page number. |
int |
getRow()
Returns the current row. |
void |
reuse(int activity,
int row,
int maximumRow,
int page,
int level,
int maximumLevel)
Reuses the report event by updating the internal properties. |
void |
reuse(int activity,
ReportState rawState,
int pageCount)
|
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int COMPUTING_LAYOUT
public static final int PRECOMPUTING_VALUES
public static final int PAGINATING
public static final int GENERATING_CONTENT
Constructor Detail |
---|
public ReportProgressEvent(Object source)
source
- the report processor that generated this event.public ReportProgressEvent(Object source, int page)
source
- the report processor that generated this event.public ReportProgressEvent(Object source, int activity, int row, int maximumRow, int page, int level, int maximumLevel)
source
- the report processor that generated this event.activity
- the current activity.row
- the currently processed row.maximumRow
- the number of rows in this local report.page
- the current page that is being processed.level
- the current processing level.maximumLevel
- the maximum processing level.Method Detail |
---|
public String toString()
toString
in class EventObject
public int getRow()
public int getActivity()
COMPUTING_LAYOUT
,
PRECOMPUTING_VALUES
,
PAGINATING
,
GENERATING_CONTENT
public int getPage()
public int getMaximumRow()
public int getMaximumLevel()
public int getLevel()
public void reuse(int activity, ReportState rawState, int pageCount)
public void reuse(int activity, int row, int maximumRow, int page, int level, int maximumLevel)
activity
- the activity as constant.row
- the current row.maximumRow
- the total rows in the datasource.page
- the current page.level
- the current processing level.maximumLevel
- the maximum processing level.public Object clone()
clone
in class Object
public static double computePercentageComplete(ReportProgressEvent event, boolean onlyPagination)
event
- the data used to calculate the percentage completeonlyPagination
- true, if the processing stops after pagination, or false, if a full export is done.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |