Package org.jboss.elemento.flow
Interface Progress
-
public interface ProgressInterface to reflect the progress when executing a list of asynchronous tasks in parallel, in sequence or repeatedly as long as certain conditions are met.Implementations should use some kind of graphical indicators such as a spinner or progress element.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidfinish()Indicates that the progress has been finished.voidreset()Resets the progress indicator.default voidreset(int max)Resets the progress indicator.voidreset(int max, String label)Resets the progress indicator.default voidtick()Indicates progress.voidtick(String label)Indicates progress using a description.
-
-
-
Field Detail
-
NOOP
static final Progress NOOP
Noop progress indicator that does nothing.
-
-
Method Detail
-
reset
void reset()
Resets the progress indicator. Since nowmaxvalue is given, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take.
-
reset
default void reset(int max)
Resets the progress indicator. Themaxparameter describes how many tasks are going to be executed.- Parameters:
max- the number of tasks executed
-
reset
void reset(int max, String label)Resets the progress indicator. Themaxparameter describes how many tasks are going to be executed.- Parameters:
max- the number of tasks executedlabel- a description for the reset state
-
tick
default void tick()
Indicates progress.
-
tick
void tick(String label)
Indicates progress using a description.- Parameters:
label- a description of the progress
-
finish
void finish()
Indicates that the progress has been finished.
-
-