Class ProgressMonitor

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----CancelDialog
                                           |
                                           +----ProgressMonitor

public class ProgressMonitor
extends CancelDialog
implements ActionListener
Class definition for a dialog window with a progress bar and a 'Cancel' button.

Version:
$Revision: 1.3 $, $Date: 2000/10/12 14:07:58 $
Author:
John Cavanaugh

Variable Index

 o current
The current value.
 o pb
A progress bar.
 o pl
A label to accompany the progress bar.
 o total
The value we're measuring progress toward.

Constructor Index

 o ProgressMonitor(Frame, String, String[], long)
Constructs the progress monitor.

Method Index

 o getTotal()
Get the total we're working toward.
 o setCurrent(long)
Set the current value and update the progress bar.
 o setTotal(long)
Set the total we're working toward.

Variables

 o total
 protected long total
The value we're measuring progress toward.

 o current
 protected long current
The current value.

 o pb
 protected ProgressMonitor. ProgressBar pb
A progress bar.

 o pl
 protected Label pl
A label to accompany the progress bar.

Constructors

 o ProgressMonitor
 public ProgressMonitor(Frame frame,
                        String title,
                        String text[],
                        long total)
Constructs the progress monitor.

Parameters:
frame - the parent frame.
title - a title for the progress monitor window.
text - a message to display with the progress bar.
total - the value to measure progress toward.

Methods

 o getTotal
 public long getTotal()
Get the total we're working toward.

Returns:
the total we're working toward.
 o setTotal
 public void setTotal(long total)
Set the total we're working toward.

Parameters:
total - the total we're working toward.
 o setCurrent
 public void setCurrent(long current)
Set the current value and update the progress bar.

Parameters:
current - the current value.