Class WaitingHandlerDummy
java.lang.Object
com.compomics.util.gui.waiting.waitinghandlers.WaitingHandlerDummy
- All Implemented Interfaces:
WaitingHandler
This class is an implementation of the WaitingHandler interface to be used
when a process can be canceled, but no monitoring is needed. Hence only the
methods related to setting and getting the status of the process are
implemented.
- Author:
- Harald Barsnes
-
Field Summary
Fields inherited from interface com.compomics.util.waiting.WaitingHandler
SIMPLE_DATA_FORMAT, TAB_HTML, TAB_NON_HTML -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendReport(String report, boolean includeDate, boolean addNewLine) Append text to the report.voidAppend a new line to the report.voidAppend two tabs to the report.booleanReturns if the waiting handler is to show the progress for the current process or not.intReturns the max primary progress counter.intReturns the max secondary progress counter.intReturns the primary progress counter.intReturns the secondary progress counter.voidIncrease the primary progress counter by one "counter".voidincreasePrimaryProgressCounter(int value) Increase the primary progress counter by the given increment.voidIncrease the secondary progress counter by one "counter".voidincreaseSecondaryProgressCounter(int value) Increase the secondary progress counter by the given value.booleanisReport()Indicates whether this waiting handler supports reports.booleanReturns true if the run is canceled.booleanReturns true if the process is finished.voidReset the primary progress counter to 0.voidReset the secondary progress counter to 0.voidsetDisplayProgress(boolean displayProgress) Set if the waiting handler is to show the progress for the current process or not.voidsetMaxPrimaryProgressCounter(int maxProgressValue) Set the maximum value for the primary progress counter.voidsetMaxSecondaryProgressCounter(int maxProgressValue) Set the maximum value for the secondary progress counter.voidsetPrimaryProgressCounter(int value) Sets the primary progress counter to the given value.voidsetPrimaryProgressCounterIndeterminate(boolean indeterminate) Sets whether the primary progress counter is indeterminate or not.voidSet the process as canceled.voidSet the process as finished.voidsetSecondaryProgressCounter(int value) Sets the secondary progress counter to the given value.voidsetSecondaryProgressCounterIndeterminate(boolean indeterminate) Sets the secondary progress counter to indeterminate or not.voidSet the secondary progress counter text.voidsetWaitingText(String text) Sets the text describing what is currently being waited for.
-
Constructor Details
-
WaitingHandlerDummy
public WaitingHandlerDummy()Empty default constructor
-
-
Method Details
-
setMaxPrimaryProgressCounter
public void setMaxPrimaryProgressCounter(int maxProgressValue) Description copied from interface:WaitingHandlerSet the maximum value for the primary progress counter.- Specified by:
setMaxPrimaryProgressCounterin interfaceWaitingHandler- Parameters:
maxProgressValue- the max value
-
increasePrimaryProgressCounter
public void increasePrimaryProgressCounter()Description copied from interface:WaitingHandlerIncrease the primary progress counter by one "counter".- Specified by:
increasePrimaryProgressCounterin interfaceWaitingHandler
-
increasePrimaryProgressCounter
public void increasePrimaryProgressCounter(int value) Description copied from interface:WaitingHandlerIncrease the primary progress counter by the given increment.- Specified by:
increasePrimaryProgressCounterin interfaceWaitingHandler- Parameters:
value- the increment to increase the value by
-
setPrimaryProgressCounter
public void setPrimaryProgressCounter(int value) Description copied from interface:WaitingHandlerSets the primary progress counter to the given value.- Specified by:
setPrimaryProgressCounterin interfaceWaitingHandler- Parameters:
value- the progress value
-
setMaxSecondaryProgressCounter
public void setMaxSecondaryProgressCounter(int maxProgressValue) Description copied from interface:WaitingHandlerSet the maximum value for the secondary progress counter.- Specified by:
setMaxSecondaryProgressCounterin interfaceWaitingHandler- Parameters:
maxProgressValue- the max value
-
resetSecondaryProgressCounter
public void resetSecondaryProgressCounter()Description copied from interface:WaitingHandlerReset the secondary progress counter to 0.- Specified by:
resetSecondaryProgressCounterin interfaceWaitingHandler
-
increaseSecondaryProgressCounter
public void increaseSecondaryProgressCounter()Description copied from interface:WaitingHandlerIncrease the secondary progress counter by one "counter".- Specified by:
increaseSecondaryProgressCounterin interfaceWaitingHandler
-
setSecondaryProgressCounter
public void setSecondaryProgressCounter(int value) Description copied from interface:WaitingHandlerSets the secondary progress counter to the given value.- Specified by:
setSecondaryProgressCounterin interfaceWaitingHandler- Parameters:
value- the progress value
-
increaseSecondaryProgressCounter
public void increaseSecondaryProgressCounter(int value) Description copied from interface:WaitingHandlerIncrease the secondary progress counter by the given value.- Specified by:
increaseSecondaryProgressCounterin interfaceWaitingHandler- Parameters:
value- the value to increase the value by
-
setSecondaryProgressCounterIndeterminate
public void setSecondaryProgressCounterIndeterminate(boolean indeterminate) Description copied from interface:WaitingHandlerSets the secondary progress counter to indeterminate or not.- Specified by:
setSecondaryProgressCounterIndeterminatein interfaceWaitingHandler- Parameters:
indeterminate- if true, set to indeterminate
-
setRunFinished
public void setRunFinished()Description copied from interface:WaitingHandlerSet the process as finished.- Specified by:
setRunFinishedin interfaceWaitingHandler
-
setRunCanceled
public void setRunCanceled()Description copied from interface:WaitingHandlerSet the process as canceled.- Specified by:
setRunCanceledin interfaceWaitingHandler
-
appendReport
Description copied from interface:WaitingHandlerAppend text to the report.- Specified by:
appendReportin interfaceWaitingHandler- Parameters:
report- the text to appendincludeDate- if the date and time is to be added to the front of the textaddNewLine- add a new line after the text?
-
appendReportNewLineNoDate
public void appendReportNewLineNoDate()Description copied from interface:WaitingHandlerAppend two tabs to the report. No new line.- Specified by:
appendReportNewLineNoDatein interfaceWaitingHandler
-
appendReportEndLine
public void appendReportEndLine()Description copied from interface:WaitingHandlerAppend a new line to the report.- Specified by:
appendReportEndLinein interfaceWaitingHandler
-
isRunCanceled
public boolean isRunCanceled()Description copied from interface:WaitingHandlerReturns true if the run is canceled.- Specified by:
isRunCanceledin interfaceWaitingHandler- Returns:
- true if the run is canceled
-
isRunFinished
public boolean isRunFinished()Description copied from interface:WaitingHandlerReturns true if the process is finished.- Specified by:
isRunFinishedin interfaceWaitingHandler- Returns:
- true if the process is finished
-
setWaitingText
Description copied from interface:WaitingHandlerSets the text describing what is currently being waited for.- Specified by:
setWaitingTextin interfaceWaitingHandler- Parameters:
text- a text describing what is currently waited for
-
setPrimaryProgressCounterIndeterminate
public void setPrimaryProgressCounterIndeterminate(boolean indeterminate) Description copied from interface:WaitingHandlerSets whether the primary progress counter is indeterminate or not.- Specified by:
setPrimaryProgressCounterIndeterminatein interfaceWaitingHandler- Parameters:
indeterminate- a boolean indicating whether the primary progress counter is indeterminate or not
-
isReport
public boolean isReport()Description copied from interface:WaitingHandlerIndicates whether this waiting handler supports reports.- Specified by:
isReportin interfaceWaitingHandler- Returns:
- a boolean indicating whether this waiting handler supports reports
-
setSecondaryProgressText
Description copied from interface:WaitingHandlerSet the secondary progress counter text.- Specified by:
setSecondaryProgressTextin interfaceWaitingHandler- Parameters:
text- the text to set
-
resetPrimaryProgressCounter
public void resetPrimaryProgressCounter()Description copied from interface:WaitingHandlerReset the primary progress counter to 0.- Specified by:
resetPrimaryProgressCounterin interfaceWaitingHandler
-
getPrimaryProgressCounter
public int getPrimaryProgressCounter()Description copied from interface:WaitingHandlerReturns the primary progress counter.- Specified by:
getPrimaryProgressCounterin interfaceWaitingHandler- Returns:
- primary progress counter
-
getMaxPrimaryProgressCounter
public int getMaxPrimaryProgressCounter()Description copied from interface:WaitingHandlerReturns the max primary progress counter.- Specified by:
getMaxPrimaryProgressCounterin interfaceWaitingHandler- Returns:
- max primary progress counter
-
getSecondaryProgressCounter
public int getSecondaryProgressCounter()Description copied from interface:WaitingHandlerReturns the secondary progress counter.- Specified by:
getSecondaryProgressCounterin interfaceWaitingHandler- Returns:
- secondary progress counter
-
getMaxSecondaryProgressCounter
public int getMaxSecondaryProgressCounter()Description copied from interface:WaitingHandlerReturns the max secondary progress counter.- Specified by:
getMaxSecondaryProgressCounterin interfaceWaitingHandler- Returns:
- max secondary progress counter
-
setDisplayProgress
public void setDisplayProgress(boolean displayProgress) Description copied from interface:WaitingHandlerSet if the waiting handler is to show the progress for the current process or not. Useful when running subprocesses that one wants to be able to cancel but do not want to show the progress for.- Specified by:
setDisplayProgressin interfaceWaitingHandler- Parameters:
displayProgress- if the waiting handler is to show the progress for the current process or not
-
getDisplayProgress
public boolean getDisplayProgress()Description copied from interface:WaitingHandlerReturns if the waiting handler is to show the progress for the current process or not. Useful when running subprocesses that one wants to be able to cancel but do not want to show the progress for.- Specified by:
getDisplayProgressin interfaceWaitingHandler- Returns:
- if the waiting handler is to show the progress for the current process or not
-