public class ReportProgressEvent extends EventObject implements Cloneable
Modifier and Type | Field and Description |
---|---|
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.
|
source
Constructor and Description |
---|
ReportProgressEvent(Object source)
Creates a new even without any properties defined.
|
ReportProgressEvent(Object source,
int page)
Deprecated.
Use constructor with total pages instead
|
ReportProgressEvent(Object source,
int page,
int totalPages)
Creates a new even without any properties defined.
|
ReportProgressEvent(Object source,
int activity,
int row,
int maximumRow,
int page,
int level,
int maximumLevel)
Deprecated.
Use constructor with total pages instead
|
ReportProgressEvent(Object source,
int activity,
int row,
int maximumRow,
int page,
int totalPages,
int level,
int maximumLevel)
Creates a new report-progress event.
|
Modifier and Type | Method and Description |
---|---|
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.
|
int |
getTotalPages()
Returns total number pages in the report
|
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,
int row,
int maximumRow,
int page,
int totalPages,
int level,
int maximumLevel)
Reuses the report event by updating the internal properties.
|
void |
reuse(int activity,
ReportState rawState,
int pageCount) |
void |
reuse(int activity,
ReportState rawState,
int pageCount,
int totalPages) |
String |
toString()
Returns a string representation of this object.
|
getSource
public static final int COMPUTING_LAYOUT
public static final int PRECOMPUTING_VALUES
public static final int PAGINATING
public static final int GENERATING_CONTENT
public ReportProgressEvent(Object source)
source
- the report processor that generated this event.@Deprecated public ReportProgressEvent(Object source, int page)
source
- the report processor that generated this event.public ReportProgressEvent(Object source, int page, int totalPages)
source
- the report processor that generated this event.totalPages
- total pages in the report@Deprecated 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.public ReportProgressEvent(Object source, int activity, int row, int maximumRow, int page, int totalPages, 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.totalPages
- total pages in the reportlevel
- the current processing level.maximumLevel
- the maximum processing level.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 getTotalPages()
public int getMaximumRow()
public int getMaximumLevel()
public int getLevel()
public void reuse(int activity, ReportState rawState, int pageCount)
public void reuse(int activity, ReportState rawState, int pageCount, int totalPages)
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 void reuse(int activity, int row, int maximumRow, int page, int totalPages, int level, int maximumLevel)
activity
- the activity as constant.row
- the current row.maximumRow
- the total rows in the datasource.page
- the current page.totalPages
- total pages in the reportlevel
- the current processing level.maximumLevel
- the maximum processing level.public Object clone()
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.Copyright © 2017 Hitachi Vantara. All rights reserved.