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(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.
ReportProgressDialog()
Creates a non-modal dialog without a title and without a specified Frame owner.
Method Summary
StringgetLayoutText()
Returns the layout text.
StringgetMessage()
Returns the current message.
StringgetOutputText()
Returns the output text message.
protected JLabelgetPageCountMessage()
Returns the current pagecount message component.
protected MessageFormatgetPageMessageFormatter()
Returns the current pass message component.
protected JLabelgetPassCountMessage()
Returns the current pass message component.
protected MessageFormatgetPassMessageFormatter()
Returns the current pass message component.
protected JLabelgetRowCountMessage()
Returns the current row message component.
protected MessageFormatgetRowsMessageFormatter()
Returns the current pass message component.
protected booleanisSameMaxRow(int row)
voidsetLayoutText(String layoutText)
Defines the layout text message.
voidsetMessage(String message)
Defines the current message.
voidsetOutputText(String outputText)
Defines the output text message.
protected voidupdatePageMessage(int page)
Updates the page message label if the current page has changed.
protected voidupdatePassMessage(int pass, boolean prepare)
Updates the pass message label if either the pass or prepare state changed.
protected voidupdateRowsMessage(int rows, int maxRows)
Updates the rows message label if either the rows or maxrows changed.

Constructor Detail

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

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.

Method Detail

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.