public class BProgressBar extends Widget
You can specify minimum and maximum progress values for the bar, to reflect the number of steps in the operation being monitored. When the current progress value is equal to the minimum value, the bar is shown completely empty. When it is equal to the maximum value, the bar is shown completely full.
If you do not know how long an operation will take, the progress bar can be put into an "indeterminate" state. This causes the entire bar to animate continuously to show that work is being done.
Modifier and Type | Class and Description |
---|---|
static class |
BProgressBar.Orientation
This inner class represents an orientation (horizontal or vertical) for the split.
|
Modifier and Type | Field and Description |
---|---|
static BProgressBar.Orientation |
HORIZONTAL |
static BProgressBar.Orientation |
VERTICAL |
Constructor and Description |
---|
BProgressBar()
Create a horizontal BProgressBar which does not display text.
|
BProgressBar(BProgressBar.Orientation orient,
int min,
int max)
Create a new BProgressBar.
|
BProgressBar(int min,
int max)
Create a horizontal BProgressBar which does not display text.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.JProgressBar |
getComponent()
Get the java.awt.Component corresponding to this Widget.
|
int |
getMaximum()
Get the progress bar's maximum progress value.
|
int |
getMinimum()
Get the progress bar's minimum progress value.
|
BProgressBar.Orientation |
getOrientation()
Get the progress bar's orientation, HORIZONTAL or VERTICAL.
|
java.lang.String |
getProgressText()
Get the line of text displayed on the progress bar.
|
boolean |
getShowProgressText()
Get whether the progress bar displays a line of text describing the operation whose progress
is being monitored.
|
int |
getValue()
Get the progress bar's current progress value.
|
boolean |
isIndeterminate()
Get whether this progress bar is in indeterminate mode.
|
void |
setIndeterminate(boolean indeterminate)
Set whether this progress bar is in indeterminate mode.
|
void |
setMaximum(int max)
Set the progress bar's maximum progress value.
|
void |
setMinimum(int min)
Set the progress bar's minimum progress value.
|
void |
setOrientation(BProgressBar.Orientation orient)
Set the progress bar's orientation, HORIZONTAL or VERTICAL.
|
void |
setProgressText(java.lang.String text)
Set the line of text displayed on the progress bar.
|
void |
setShowProgressText(boolean show)
Set whether the progress bar displays a line of text describing the operation whose progress
is being monitored.
|
void |
setValue(int value)
Set the progress bar's current progress value.
|
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible
addEventLink, addEventLink, removeEventLink
public static final BProgressBar.Orientation HORIZONTAL
public static final BProgressBar.Orientation VERTICAL
public BProgressBar()
public BProgressBar(int min, int max)
min
- the minimum value on the progress barmax
- the maximum value on the progress barpublic BProgressBar(BProgressBar.Orientation orient, int min, int max)
orient
- the progress bar orientation (HORIZONTAL or VERTICAL)min
- the minimum value on the progress barmax
- the maximum value on the progress barpublic javax.swing.JProgressBar getComponent()
Widget
getComponent
in class Widget
public int getValue()
public void setValue(int value)
public int getMinimum()
public void setMinimum(int min)
public int getMaximum()
public void setMaximum(int max)
public BProgressBar.Orientation getOrientation()
public void setOrientation(BProgressBar.Orientation orient)
public boolean isIndeterminate()
public void setIndeterminate(boolean indeterminate)
public boolean getShowProgressText()
public void setShowProgressText(boolean show)
public java.lang.String getProgressText()
public void setProgressText(java.lang.String text)
Written by Peter Eastman.