public class WaitingHandlerCLIImpl extends Object implements WaitingHandler
Modifier and Type | Field and Description |
---|---|
protected String |
iReport
The report to append.
|
SIMPLE_DATA_FORMAT, TAB_HTML, TAB_NON_HTML
Constructor and Description |
---|
WaitingHandlerCLIImpl() |
Modifier and Type | Method and Description |
---|---|
void |
appendReport(String report,
boolean includeDate,
boolean addNewLine)
Append text to the report.
|
void |
appendReportEndLine()
Append a new line to the report.
|
void |
appendReportNewLineNoDate()
Append two tabs to the report.
|
boolean |
getDisplayProgress()
Returns if the waiting handler is to show the progress for the current
process or not.
|
int |
getMaxPrimaryProgressCounter()
Returns the max primary progress counter.
|
int |
getMaxSecondaryProgressCounter()
Returns the max secondary progress counter.
|
int |
getPrimaryProgressCounter()
Returns the primary progress counter.
|
int |
getSecondaryProgressCounter()
Returns the secondary progress counter.
|
void |
increasePrimaryProgressCounter()
Increase the primary progress counter by one "counter".
|
void |
increasePrimaryProgressCounter(int amount)
Increase the primary progress counter by the given increment.
|
void |
increaseSecondaryProgressCounter()
Increase the secondary progress counter by one "counter".
|
void |
increaseSecondaryProgressCounter(int amount)
Increase the secondary progress counter by the given amount.
|
boolean |
isReport()
Indicates whether this waiting handler supports reports.
|
boolean |
isRunCanceled()
Returns true if the run is canceled.
|
boolean |
isRunFinished()
Returns true if the process is finished.
|
void |
resetPrimaryProgressCounter()
Reset the primary progress counter to 0.
|
void |
resetSecondaryProgressCounter()
Reset the secondary progress counter to 0.
|
void |
setDisplayProgress(boolean displayProgress)
Set if the waiting handler is to show the progress for the current
process or not.
|
void |
setMaxPrimaryProgressCounter(int maxProgressValue)
Set the maximum value for the primary progress counter.
|
void |
setMaxSecondaryProgressCounter(int maxProgressValue)
Set the maximum value for the secondary progress counter.
|
void |
setPrimaryProgressCounter(int value)
Sets the primary progress counter to the given value.
|
void |
setPrimaryProgressCounterIndeterminate(boolean indeterminate)
Sets whether the primary progress counter is indeterminate or not.
|
void |
setRunCanceled()
Set the process as canceled.
|
void |
setRunFinished()
Set the process as finished.
|
void |
setSecondaryProgressCounter(int value)
Sets the secondary progress counter to the given value.
|
void |
setSecondaryProgressCounterIndeterminate(boolean indeterminate)
Sets the secondary progress counter to indeterminate or not.
|
void |
setSecondaryProgressText(String text)
Set the secondary progress counter text.
|
void |
setWaitingText(String text)
Sets the text describing what is currently being waited for.
|
protected String iReport
public void setMaxPrimaryProgressCounter(int maxProgressValue)
WaitingHandler
setMaxPrimaryProgressCounter
in interface WaitingHandler
maxProgressValue
- the max valuepublic void increasePrimaryProgressCounter()
WaitingHandler
increasePrimaryProgressCounter
in interface WaitingHandler
public void increasePrimaryProgressCounter(int amount)
WaitingHandler
increasePrimaryProgressCounter
in interface WaitingHandler
amount
- the increment to increase the value bypublic void setPrimaryProgressCounter(int value)
WaitingHandler
setPrimaryProgressCounter
in interface WaitingHandler
value
- the progress valuepublic void setMaxSecondaryProgressCounter(int maxProgressValue)
WaitingHandler
setMaxSecondaryProgressCounter
in interface WaitingHandler
maxProgressValue
- the max valuepublic void resetSecondaryProgressCounter()
WaitingHandler
resetSecondaryProgressCounter
in interface WaitingHandler
public void increaseSecondaryProgressCounter()
WaitingHandler
increaseSecondaryProgressCounter
in interface WaitingHandler
public void setSecondaryProgressCounter(int value)
WaitingHandler
setSecondaryProgressCounter
in interface WaitingHandler
value
- the progress valuepublic void increaseSecondaryProgressCounter(int amount)
WaitingHandler
increaseSecondaryProgressCounter
in interface WaitingHandler
amount
- the amount to increase the value bypublic void setSecondaryProgressCounterIndeterminate(boolean indeterminate)
WaitingHandler
setSecondaryProgressCounterIndeterminate
in interface WaitingHandler
indeterminate
- if true, set to indeterminatepublic void setRunFinished()
WaitingHandler
setRunFinished
in interface WaitingHandler
public void setRunCanceled()
WaitingHandler
setRunCanceled
in interface WaitingHandler
public void appendReport(String report, boolean includeDate, boolean addNewLine)
WaitingHandler
appendReport
in interface WaitingHandler
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?public void appendReportNewLineNoDate()
WaitingHandler
appendReportNewLineNoDate
in interface WaitingHandler
public void appendReportEndLine()
WaitingHandler
appendReportEndLine
in interface WaitingHandler
public boolean isRunCanceled()
WaitingHandler
isRunCanceled
in interface WaitingHandler
public boolean isRunFinished()
WaitingHandler
isRunFinished
in interface WaitingHandler
public void setWaitingText(String text)
WaitingHandler
setWaitingText
in interface WaitingHandler
text
- a text describing what is currently waited forpublic void setPrimaryProgressCounterIndeterminate(boolean indeterminate)
WaitingHandler
setPrimaryProgressCounterIndeterminate
in interface WaitingHandler
indeterminate
- a boolean indicating whether the primary progress
counter is indeterminate or notpublic boolean isReport()
WaitingHandler
isReport
in interface WaitingHandler
public void setSecondaryProgressText(String text)
WaitingHandler
setSecondaryProgressText
in interface WaitingHandler
text
- the text to setpublic void resetPrimaryProgressCounter()
WaitingHandler
resetPrimaryProgressCounter
in interface WaitingHandler
public int getPrimaryProgressCounter()
WaitingHandler
getPrimaryProgressCounter
in interface WaitingHandler
public int getMaxPrimaryProgressCounter()
WaitingHandler
getMaxPrimaryProgressCounter
in interface WaitingHandler
public int getSecondaryProgressCounter()
WaitingHandler
getSecondaryProgressCounter
in interface WaitingHandler
public int getMaxSecondaryProgressCounter()
WaitingHandler
getMaxSecondaryProgressCounter
in interface WaitingHandler
public void setDisplayProgress(boolean displayProgress)
WaitingHandler
setDisplayProgress
in interface WaitingHandler
displayProgress
- if the waiting handler is to show the progress for
the current process or notpublic boolean getDisplayProgress()
WaitingHandler
getDisplayProgress
in interface WaitingHandler
Copyright © 2016. All rights reserved.