org.jfree.report.event
Class RepaginationState
java.lang.Object
|
+--java.util.EventObject
|
+--org.jfree.report.event.RepaginationState
- public class RepaginationState
- extends java.util.EventObject
The repagination state.
- Author:
- Thomas Morgner.
- See Also:
- Serialized Form
| Fields inherited from class java.util.EventObject |
source |
|
Constructor Summary |
RepaginationState(java.lang.Object source,
int pass,
int page,
int currentRow,
int maxRow,
boolean prepare)
Creates a new state. |
|
Method Summary |
int |
getCurrentRow()
Returns the current row. |
int |
getMaxRow()
Returns the number of rows in the tablemodel of the report. |
int |
getPage()
Returns the current page. |
int |
getPass()
Returns the pass, which is the current function level of the report processor. |
boolean |
isPrepare()
Checks, whether the event was fired during a prepare run of the report processor. |
void |
reuse(int pass,
int page,
int currentRow,
int maxRow,
boolean prepare)
Makes it possible to reuse the event object. |
| 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 |
RepaginationState
public RepaginationState(java.lang.Object source,
int pass,
int page,
int currentRow,
int maxRow,
boolean prepare)
- Creates a new state.
- Parameters:
source - the source object that fired the event.pass - the pass the current function level of the processor. This counts
down to -1.page - the page that is currently being processed, or -1 if the page is
not known.currentRow - the current row the current row of the tablemodel that is
processed.maxRow - the maximum row the total number of rows in the tablemodel.prepare - true, if the event was fired by a prepare run, false otherwise.
getPass
public int getPass()
- Returns the pass, which is the current function level of the report processor.
- Returns:
- the report processors function level.
getPage
public int getPage()
- Returns the current page.
- Returns:
- The page or -1 if the page is not known.
getCurrentRow
public int getCurrentRow()
- Returns the current row.
- Returns:
- the current row.
getMaxRow
public int getMaxRow()
- Returns the number of rows in the tablemodel of the report.
- Returns:
- the max row.
reuse
public void reuse(int pass,
int page,
int currentRow,
int maxRow,
boolean prepare)
- Makes it possible to reuse the event object. Repagination events are generated in
masses, and it wastes resources to throw them away.
- Parameters:
pass - the pass the current function level of the processor. This counts
down to -1.page - the page that is currently being processed, or -1 if the page is
not known.currentRow - the current row the current row of the tablemodel that is
processed.maxRow - the maximum row the total number of rows in the tablemodel.prepare - true, if the event was fired by a prepare run, false otherwise.
isPrepare
public boolean isPrepare()
- Checks, whether the event was fired during a prepare run of the report processor.
- Returns:
- true, if the report processor works on a prepare run, false otherwise.