com.compomics.util.gui.waiting
Interface WaitingHandler

All Known Implementing Classes:
ProgressDialogX, WaitingDialog, WaitingHandlerCLIImpl

public interface WaitingHandler

An interface for code dealing with how to handle information that is displayed to the user during the loading of new projetcs.

Author:
Harald Barsnes

Method Summary
 void appendReport(String report)
          Append text to the report.
 void appendReportEndLine()
          Append a new line to the report.
 void appendReportNewLineNoDate()
          Append two tabs to the report.
 void displayHtmlMessage(JEditorPane messagePane, String title, int messageType)
          Display a given html containing message to the user separatly from the main output.
 void displayMessage(String message, String title, int messageType)
          Display a given message to the user separatly from the main output.
 JProgressBar getSecondaryProgressBar()
          Returns the secondary progress bar for updates from external processes.
 void increaseProgressValue()
          Increase the progress bar value by one "counter".
 void increaseProgressValue(int increment)
          Increase the progress bar value by the given amount.
 void increaseSecondaryProgressValue()
          Increase the secondary progress bar value by one "counter".
 void increaseSecondaryProgressValue(int amount)
          Increase the secondary progress bar value by the given amount.
 boolean isRunCanceled()
          Returns true if the run is canceled.
 void resetSecondaryProgressBar()
          Reset the secondary progress bar value to 0.
 void setMaxProgressValue(int maxProgressValue)
          Set the maximum value of the progress bar.
 void setMaxSecondaryProgressValue(int maxProgressValue)
          Set the maximum value of the secondary progress bar.
 void setRunCanceled()
          Set the analysis as canceled.
 void setRunFinished()
          Set the analysis as finished.
 void setSecondaryProgressDialogIntermediate(boolean intermediate)
          Sets the secondary progress bar to intermediate or not.
 void setSecondaryProgressValue(int value)
          Sets the secondary progress bar to the given value.
 void setWaitingText(String text)
          Sets the text describing what is currently waited for.
 

Method Detail

setMaxProgressValue

void setMaxProgressValue(int maxProgressValue)
Set the maximum value of the progress bar.

Parameters:
maxProgressValue - the max value

increaseProgressValue

void increaseProgressValue()
Increase the progress bar value by one "counter".


increaseProgressValue

void increaseProgressValue(int increment)
Increase the progress bar value by the given amount.

Parameters:
increment - the increment to increase the value by

setMaxSecondaryProgressValue

void setMaxSecondaryProgressValue(int maxProgressValue)
Set the maximum value of the secondary progress bar. And resets the value to 0.

Parameters:
maxProgressValue - the max value

resetSecondaryProgressBar

void resetSecondaryProgressBar()
Reset the secondary progress bar value to 0.


increaseSecondaryProgressValue

void increaseSecondaryProgressValue()
Increase the secondary progress bar value by one "counter".


setSecondaryProgressValue

void setSecondaryProgressValue(int value)
Sets the secondary progress bar to the given value.

Parameters:
value - the progress value

increaseSecondaryProgressValue

void increaseSecondaryProgressValue(int amount)
Increase the secondary progress bar value by the given amount.

Parameters:
amount - the amount to increase the value by

setSecondaryProgressDialogIntermediate

void setSecondaryProgressDialogIntermediate(boolean intermediate)
Sets the secondary progress bar to intermediate or not.

Parameters:
intermediate - if true, set to intermediate

setRunFinished

void setRunFinished()
Set the analysis as finished.


setRunCanceled

void setRunCanceled()
Set the analysis as canceled.


appendReport

void appendReport(String report)
Append text to the report.

Parameters:
report - the text to append

appendReportNewLineNoDate

void appendReportNewLineNoDate()
Append two tabs to the report. No new line.


appendReportEndLine

void appendReportEndLine()
Append a new line to the report.


isRunCanceled

boolean isRunCanceled()
Returns true if the run is canceled.

Returns:
true if the run is canceled

getSecondaryProgressBar

JProgressBar getSecondaryProgressBar()
Returns the secondary progress bar for updates from external processes.

Returns:
the secondary progress bar, can be null

displayMessage

void displayMessage(String message,
                    String title,
                    int messageType)
Display a given message to the user separatly from the main output. For example a warning or error message. Usually in a separate dialog if a grahical waiting handler is used.

Parameters:
message - the message to display
title - the title of the message
messageType - the message type in the, e.g., JOptionPane.INFORMATION_MESSAGE

displayHtmlMessage

void displayHtmlMessage(JEditorPane messagePane,
                        String title,
                        int messageType)
Display a given html containing message to the user separatly from the main output. For example a warning or error message. Usually in a separate dialog if a grahical waiting handler is used. The html links should be clickable.

Parameters:
messagePane -
title -
messageType -

setWaitingText

void setWaitingText(String text)
Sets the text describing what is currently waited for.

Parameters:
text - a text describing what is currently waited for


Copyright © 2012. All Rights Reserved.