Package ca.corbett.extras.progress
package ca.corbett.extras.progress
This package contains classes and utilities for working with progress bars, and with
long-running tasks that require progress bars. There are two main options here:
- The
MultiProgressDialogclass, which provides a simple way to automatically show a progress bar during a long-running task. If your operation has a single list of steps, you can extend theSimpleProgressWorkerto implement your long-running task with minimal boilerplate code. Simply fire off progress event methods as the work proceeds, and the single progress bar is updated automatically. Your operation may instead have compound operations. That is, a list of major steps, each one of which has a list of minor steps. For example, traversing over a directory structure (major steps) and processing each file in each directory (minor steps). In this case you can extend theMultiProgressWorkerclass instead, which provides more options for firing progress events to update the two progress bars. - The
SplashProgressWindowclass is intended to provide a simple splash screen with a built-in progress bar, if your application has a lengthy operation to perform at startup. You can again extend theSimpleProgressWorkerclass to implement your startup task, and the splash screen will be displayed automatically while the work is performed.
The listener interfaces in this package are also helpful if you want to implement your own progress tracking, or if you just want to be notified when the operation in question begins and ends. Adapter classes are provided for each listener interface, so you can simply override the methods you care about without needing to implement every method in the interface.
-
ClassDescriptionAn empty adapter class for MultiProgressListener.Replacement for Java's ProgressMonitor class, which is a bit limiting.Long progress messages are truncated at a fixed length to avoid rendering problems with very large JLabels on the dialog.Serves as a progress listener for some work task that involves multiple major steps, each with some variable number of minor work steps.Represents some generic worker thread that performs a complex task (major steps and minor steps), and can be subscribed to for major and minor progress events.Simple adapter class for SimpleProgressListener.Serves as a progress listener for some generic work task.Represents some generic worker thread that performs a simple task, and can be subscribed to for progress events.Normally the SplashScreen that comes with AWT is good enough for an application.