This is not a GUI for Java's ProgressMonitor. Instead its a GUI component that works with the JProgressMonitor, MonitorableINF and MonitoringINF classes to replace Java's progress monitoring stuff.
This is a little frame with a JProgressBar to show the progress of some task. This traces the progresses of the MonitorableINF task, and informs the MonitoringINF class of the task's completion by calling MonitoringINF.done(). The MonitorableINF is a Thread, which does the actual work. This class has a Timer object, and at some time interval checks on the progress of the MonitorableINF task. It then updates the message in this GUI component and the JProgressBar.
This class is also a MonitorableListener. Completion and somtimes cancellation is handled by that listener code. If the MonitorableINF fires {@link com.visitrend.ndvis.event.MonitorableListener#taskCompleted(MonitorableEvent) taskCompleted(MonitorableEvent)}then this class removes itself as a listener and calls its done() method. If the MonitorableINF fires {@link com.visitrend.ndvis.event.MonitorableListener#taskCancelled(MonitorableEvent) taskCancelled(MonitorableEvent)}then this class removes itself as a listener and calls its cancel() method. The {@link com.visitrend.ndvis.event.MonitorableListener#taskCancelled(MonitorableEvent) taskCancelled(MonitorableEvent)}method will only be called if the task is cancelled by itself or something else other than by the user clicking this class's GUI component cancel button.
@author John T. Langton - jlangton at visitrend dot com
|
|
|
|
|
|