The ProgressBar component provides visual feedback on how far something has progressed, like processing a file. This component is modelled very closely on the Swing JProgressBar. Its uses a BoundedRangeModel interface to keep track of where the currnt value is with respect to its maximim and minimum values. You can register a ChangeListener with the model to be notified of when the progress value changes.
The ProgressBar can be horizontal or vertical. It also has a maximum, minimum and current value via its model. You can change the text string that will be displayed on the ProgressBar if you want to.
The ProgressBar by default renders itself as an image, consisting of blocks indicating how much progress has been made. The rendering of this image is done via the ProgressBarRenderer interface.
You can replace the complete look of the ProgressBar by replacing the default renderer. The default ones the Java 2D APIs to render a dynamic image on demand. And image is only rendered when the ProgressBar is changed.
|