org.jfree.report.modules.gui.swing.common

Class ReportProgressDialog


public class ReportProgressDialog
extends JDialog

A progress monitor dialog component that visualizes the report processing progress. It will receive update events from the report processors and updates the UI according to the latest event data.

The progress will be computed according to the currently processed table row. This approach provides relativly accurate data, but assumes that processing all bands consumes roughly the same time.

Author:
Thomas Morgner

Constructor Summary

ReportProgressDialog()
Creates a non-modal dialog without a title and without a specified Frame owner.
ReportProgressDialog(Dialog dialog)
Creates a non-modal dialog without a title and with the specified Dialog owner.
ReportProgressDialog(Frame frame)
Creates a non-modal dialog without a title and with the specified Frame owner.

Method Summary

String
getLayoutText()
Returns the layout text.
String
getMessage()
Returns the current message.
String
getOutputText()
Returns the output text message.
protected JLabel
getPageCountMessage()
Returns the current pagecount message component.
protected MessageFormat
getPageMessageFormatter()
Returns the current pass message component.
protected JLabel
getPassCountMessage()
Returns the current pass message component.
protected MessageFormat
getPassMessageFormatter()
Returns the current pass message component.
protected JLabel
getRowCountMessage()
Returns the current row message component.
protected MessageFormat
getRowsMessageFormatter()
Returns the current pass message component.
protected boolean
isSameMaxRow(int row)
void
setLayoutText(String layoutText)
Defines the layout text message.
void
setMessage(String message)
Defines the current message.
void
setOutputText(String outputText)
Defines the output text message.
protected void
updatePageMessage(int page)
Updates the page message label if the current page has changed.
protected void
updatePassMessage(int pass, boolean prepare)
Updates the pass message label if either the pass or prepare state changed.
protected void
updateRowsMessage(int rows, int maxRows)
Updates the rows message label if either the rows or maxrows changed.

Constructor Details

ReportProgressDialog

public ReportProgressDialog()
Creates a non-modal dialog without a title and without a specified Frame owner. A shared, hidden frame will be set as the owner of the Dialog.

ReportProgressDialog

public ReportProgressDialog(Dialog dialog)
Creates a non-modal dialog without a title and with the specified Dialog owner.
Parameters:
dialog - the owner of the dialog

ReportProgressDialog

public ReportProgressDialog(Frame frame)
Creates a non-modal dialog without a title and with the specified Frame owner.
Parameters:
frame - the owner of the dialog

Method Details

getLayoutText

public String getLayoutText()
Returns the layout text. This text describes the prepare phases of the report processing.
Returns:
the layout text.

getMessage

public String getMessage()
Returns the current message.
Returns:
the current global message.

getOutputText

public String getOutputText()
Returns the output text message. This text describes the export phases of the report processing.
Returns:
the output phase description.

getPageCountMessage

protected final JLabel getPageCountMessage()
Returns the current pagecount message component.
Returns:
the page message component.

getPageMessageFormatter

protected final MessageFormat getPageMessageFormatter()
Returns the current pass message component.
Returns:
the pass message component.

getPassCountMessage

protected final JLabel getPassCountMessage()
Returns the current pass message component.
Returns:
the pass message component.

getPassMessageFormatter

protected final MessageFormat getPassMessageFormatter()
Returns the current pass message component.
Returns:
the pass message component.

getRowCountMessage

protected final JLabel getRowCountMessage()
Returns the current row message component.
Returns:
the row message component.

getRowsMessageFormatter

protected final MessageFormat getRowsMessageFormatter()
Returns the current pass message component.
Returns:
the pass message component.

isSameMaxRow

protected boolean isSameMaxRow(int row)

setLayoutText

public void setLayoutText(String layoutText)
Defines the layout text message. This text describes the prepare phases of the report processing.
Parameters:
layoutText - the layout message.

setMessage

public void setMessage(String message)
Defines the current message.
Parameters:
message - the current global message.

setOutputText

public void setOutputText(String outputText)
Defines the output text message. This text describes the export phases of the report processing.
Parameters:
outputText - the output message.

updatePageMessage

protected void updatePageMessage(int page)
Updates the page message label if the current page has changed.
Parameters:
page - the new page parameter.

updatePassMessage

protected void updatePassMessage(int pass,
                                 boolean prepare)
Updates the pass message label if either the pass or prepare state changed. The pass reflects the current processing level, one level for every function dependency level.
Parameters:
pass - the current reporting pass.
prepare - true, if the current run is a prepare run, false otherwise.

updateRowsMessage

protected void updateRowsMessage(int rows,
                                 int maxRows)
Updates the rows message label if either the rows or maxrows changed.
Parameters:
rows - the currently processed rows.
maxRows - the maximum number of rows in the report.