Class ConsoleProgressMonitor

java.lang.Object
org.jtool.jxplatform.builder.ConsoleProgressMonitor
Direct Known Subclasses:
NullConsoleProgressMonitor

public class ConsoleProgressMonitor extends Object
A monitor that displays the progress of the task on the console (stdout and stderr).
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a progress monitor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    begin(int size)
    Invoked when the first process starts.
    void
    display(char ch)
    Displays one character on the console (both stdout and stderr).
    void
    Invoked when all the processes are done.
    void
    printError(String message)
    Displays a message on the console (stderr only).
    void
    Displays a message on the console (stdout only).
    void
    work(int done)
    Invoked when processes are performed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 (both stdout and stderr).
      Parameters:
      ch - a character to be displayed
    • printMessage

      public void printMessage(String message)
      Displays a message on the console (stdout only).
      Parameters:
      message - the message to be displayed
    • printError

      public void printError(String message)
      Displays a message on the console (stderr only).
      Parameters:
      message - the message to be displayed