Package org.jtool.jxplatform.builder
Class ConsoleProgressMonitor
java.lang.Object
org.jtool.jxplatform.builder.ConsoleProgressMonitor
- Direct Known Subclasses:
NullConsoleProgressMonitor
A monitor that displays the progress of the task on the console (
stdout
and stderr
).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
begin
(int size) Invoked when the first process starts.void
display
(char ch) Displays one character on the console (bothstdout
andstderr
).void
done()
Invoked when all the processes are done.void
printError
(String message) Displays a message on the console (stderr
only).void
printMessage
(String message) Displays a message on the console (stdout
only).void
work
(int done) Invoked when processes are performed.
-
Constructor Details
-
ConsoleProgressMonitor
public ConsoleProgressMonitor()Creates a progress monitor.
-
-
Method Details
-
begin
public void begin(int size) Invoked when the first process starts.- Parameters:
size
- the maximum number of processes in the task
-
done
public void done()Invoked when all the processes are done. -
work
public void work(int done) Invoked when processes are performed.- Parameters:
done
- the number of the performed processes
-
display
public void display(char ch) Displays one character on the console (bothstdout
andstderr
).- Parameters:
ch
- a character to be displayed
-
printMessage
Displays a message on the console (stdout
only).- Parameters:
message
- the message to be displayed
-
printError
Displays a message on the console (stderr
only).- Parameters:
message
- the message to be displayed
-