ProgressMonitor component used throughout das2. Here's an Autoplot script demoing its operation:
{@code
monitor.setTaskSize( 100 )
monitor.started()
for i in range(100):
if ( i>50 and monitor.isCancelled() ):
raise Exception('cancel pressed')
print i
java.lang.Thread.sleep(100)
monitor.setTaskProgress(i)
monitor.finished()
}
true if the task is cancelled. Note cancelled will be set before finished.
return a progress panel which can be embedded within a GUI. Use getComponent() to return the component which should be embedded.
return a new progress panel with component indicating status for the component.
this may be called from off the event thread, but it does assume that the event thread is free.
returns the JPanel component.
Returning true here keeps the progress bar from forcing the whole canvas to repaint when the label of the progress bar changes.
provide convenient code which will center DasProgressMonitors on window.
set the component where this progress monitor is understood. This is typically the DasCanvas.
Setter for property showProgressRate.
make the progressPanel visible or hide it. This