Package se.conciliate.extensions.ui
Interface ProgressCallback
- All Known Implementing Classes:
Shell.SimpleStatusProgress
public interface ProgressCallback
A callback used for reporting progress.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaborted()The process has been aborted.default voidAn exception occurred, this method is called before aborted().default voidfinished()All steps have finished.default booleanisGUI()Returns true if the program is running in GUI mode.default booleanReturns true if the user has requested abortion.default voidA log message that should be passed to the UI.default voidlogWarning(String msg) A warning that should be passed to the UI.default voidstartProgress(int steps) Reports that the progress is about to start.default voidA new step has begun.default voidstepDescription(String description) Updates the description text for the current step.default voidstepProgress(int percent) Progress has been made in the current step.
-
Method Details
-
startProgress
default void startProgress(int steps) Reports that the progress is about to start.- Parameters:
steps- Number of steps to expect.
-
startStep
A new step has begun.- Parameters:
step- index of the stepdescription- A description of the current stepindeterminate- true if the step is indeterminate (won't call stepProgress(int)
-
stepProgress
default void stepProgress(int percent) Progress has been made in the current step.- Parameters:
percent- how much of the current step that is completed
-
stepDescription
Updates the description text for the current step. -
finished
default void finished()All steps have finished. -
isUserAborting
default boolean isUserAborting()Returns true if the user has requested abortion.- Returns:
- true if the publishing should stop
-
aborted
default void aborted()The process has been aborted. This method is expected to be called if isUserAborting() is returning true or after exception(Exception) has been called. -
exception
An exception occurred, this method is called before aborted(). -
log
A log message that should be passed to the UI. -
logWarning
A warning that should be passed to the UI. -
isGUI
default boolean isGUI()Returns true if the program is running in GUI mode. If true the process may open GUI components. An example of this is the custom export that asks the user to select a model if the program is running in GUI mode. If not a default value is used.
-