All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.awt.ProgressManager

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.wizards.awt.ProgressManager

public class ProgressManager
extends Container
The ProgressManager class contains one or more ProgressBar objects. Each progress bar will be labeled. The progress values will be set through this class.

Graphic of a ProgressManager displaying 82% completion and 37% completion.

Here is the code for this applet:


 import java.applet.Applet;
 import java.awt.*;
 import com.sun.wizards.awt.*;
 public class Test extends Applet
 {
   public void init()
     {
       setLayout(new GridBagLayout());
       ProgressManager progressManager = new ProgressManager(new String[] {"Progress A",
 									    "Progress B"});
       progressManager.setProgress(new int[] {82, 37});
       add(progressManager);
     }
 }
 


Variable Index

 o labels
The array of labels to be presented within the ProgressManager.
 o progressBars
The ProgressBar object to be displayed within the ProgressManager.
 o size
The size of the ProgressManager.

Constructor Index

 o ProgressManager()
Creates a ProgressManager object.
 o ProgressManager(String[])
Creates a ProgressManager object with the specified labels.

Method Index

 o getPreferredSize()
Returns the preferred size of this container.
 o getProgress()
Get the values for the progress bars.
 o setLabels(String[])
Sets the labels and the number of progress bars being managed by this object.
 o setProgress(int[])
Set the values for the progress bars.

Variables

 o size
 protected Dimension size
The size of the ProgressManager.

 o labels
 protected FlowLabel labels[]
The array of labels to be presented within the ProgressManager.

 o progressBars
 protected ProgressBar progressBars[]
The ProgressBar object to be displayed within the ProgressManager.

Constructors

 o ProgressManager
 public ProgressManager()
Creates a ProgressManager object.

 o ProgressManager
 public ProgressManager(String labels[])
Creates a ProgressManager object with the specified labels. The number of labels indicates how many progress bars are being mananged.

The ProgressBar objects are created automatically.

Parameters:
labels - The progress bar labels.

Methods

 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of this container.

Returns:
The preferred size of this container.
Overrides:
getPreferredSize in class Container
 o setLabels
 public void setLabels(String labels[])
Sets the labels and the number of progress bars being managed by this object.

Parameters:
labels - The progress bar labels.
 o setProgress
 public void setProgress(int progress[])
Set the values for the progress bars.

Parameters:
progress - The progress values to be displayed.
 o getProgress
 public int[] getProgress()
Get the values for the progress bars.

Returns:
The progress values for all of the progress bars this progress manager manages.

All Packages  Class Hierarchy  This Package  Previous  Next  Index