Class marimba.gui.ProgressIndicatorWidget
All Packages Class Hierarchy This Package Previous Next Index
Class marimba.gui.ProgressIndicatorWidget
java.lang.Object
|
+----marimba.gui.Widget
|
+----marimba.gui.ValueWidget
|
+----marimba.gui.ProgressIndicatorWidget
- public class ProgressIndicatorWidget
- extends ValueWidget
A progress indicator widget. A progress indicator can be used
to show the percentage of completion of a lengthy operation.
It consists of a rectangular bar that 'fills' from left to right.
- Version:
- 1.18, 01/08/97
- Author:
- Klaas Waslander
-
barColor
- The color of the bar.
-
blockMode
- The progress indicator can use blocks to indicate the progress.
-
blockWidth
- When blockMode is used, this determines the width of the blocks.
-
filled
- A progress indicator can be filled.
-
showPercent
- A progress indicator can show its percentage in the middle.
-
ProgressIndicatorWidget()
- Constructor.
-
ProgressIndicatorWidget(int, int, int)
- Constructor; sets minValue, maxValue and value.
-
getBarColor()
- Get the color of the bar.
-
getBlockMode()
- Check whether the progress indicator uses blocks.
-
getBlockWidth()
- Get the width of the blocks.
-
getPercentage()
- Get the current percentage of the progress indicator.
-
getProperties(PropertyList)
- Get the properties of the ProgressIndicatorWidget.
-
getStringPercentage()
- Get the current percentage as a string, for example "50%".
-
isFilled()
- Check whether the progress indicator is filled.
-
paint(Graphics)
- Paint the progress indicator.
-
paramString(StringBuffer)
- Debugging.
-
repaintFor(int, int, int)
- Assumes the given values are valid.
-
setBarColor(Color)
- Set the color of the bar.
-
setBlockMode(boolean)
- Let the progress indicator use blocks or not.
-
setBlockWidth(int)
- Set the width of the blocks to a certain no.
-
setFilled(boolean)
- Let the progress indicator fill itself or not.
-
setProperties(PropertyList)
- Set the properties of the ProgressIndicatorWidget.
-
showPercent(boolean)
- Let the progress indicator show its percentage or not.
-
showsPercent()
- Check whether the progress indicator shows its pecentage
-
squareBlockWidth()
- Determine the width of the blocks to let them be as square
as possible.
-
valueToPixels(int)
- The value translated into pixels.
blockMode
public boolean blockMode
- The progress indicator can use blocks to indicate the progress.
- See Also:
- getBlockMode, setBlockMode
blockWidth
public int blockWidth
- When blockMode is used, this determines the width of the blocks.
If the blockWidth is zero, the blocks are painted as square as
possible, using the method squareBlockWidth().
- See Also:
- getBlockWidth, setBlockWidth, squareBlockWidth
barColor
public Color barColor
- The color of the bar.
- See Also:
- getBarColor, setBarColor
showPercent
public boolean showPercent
- A progress indicator can show its percentage in the middle.
- See Also:
- getPercentage, setPercentage
filled
public boolean filled
- A progress indicator can be filled.
- See Also:
- isFilled, setFilled
ProgressIndicatorWidget
public ProgressIndicatorWidget()
- Constructor.
ProgressIndicatorWidget
public ProgressIndicatorWidget(int min,
int max,
int val)
- Constructor; sets minValue, maxValue and value.
getProperties
public void getProperties(PropertyList list)
- Get the properties of the ProgressIndicatorWidget.
- Overrides:
- getProperties in class ValueWidget
setProperties
public void setProperties(PropertyList list)
- Set the properties of the ProgressIndicatorWidget.
- Overrides:
- setProperties in class ValueWidget
isFilled
public boolean isFilled()
- Check whether the progress indicator is filled.
- See Also:
- filled
setFilled
public void setFilled(boolean filled)
- Let the progress indicator fill itself or not.
- See Also:
- filled
getBlockMode
public boolean getBlockMode()
- Check whether the progress indicator uses blocks.
- Returns:
- true when blocks are being used, false otherwise.
- See Also:
- blockMode
setBlockMode
public void setBlockMode(boolean blockMode)
- Let the progress indicator use blocks or not.
- See Also:
- blockMode
getBlockWidth
public int getBlockWidth()
- Get the width of the blocks.
- See Also:
- blockWidth
setBlockWidth
public void setBlockWidth(int blockWidth)
- Set the width of the blocks to a certain no. of pixels.
The width is not changed when the given blockwidth is
less then zero.
- See Also:
- blockWidth
getBarColor
public Color getBarColor()
- Get the color of the bar.
- See Also:
- barColor
setBarColor
public void setBarColor(Color barColor)
- Set the color of the bar. If the passed color
is null, the barColor is set to the default.
- See Also:
- barColor
showsPercent
public boolean showsPercent()
- Check whether the progress indicator shows its pecentage
- See Also:
- showPercent
showPercent
public void showPercent(boolean showPercent)
- Let the progress indicator show its percentage or not.
- See Also:
- showPercent
getPercentage
public int getPercentage()
- Get the current percentage of the progress indicator.
- See Also:
- getStringPercentage, showPercent
getStringPercentage
public String getStringPercentage()
- Get the current percentage as a string, for example "50%".
- See Also:
- getPercentage, showPercent
squareBlockWidth
public int squareBlockWidth()
- Determine the width of the blocks to let them be as square
as possible.
- See Also:
- blockWidth
valueToPixels
public int valueToPixels(int value)
- The value translated into pixels.
repaintFor
protected boolean repaintFor(int newValue,
int newMin,
int newMax)
- Assumes the given values are valid. Checks whether these values
would result in a new look that requires a repaint.
- Overrides:
- repaintFor in class ValueWidget
paint
public void paint(Graphics g)
- Paint the progress indicator.
- Overrides:
- paint in class Widget
paramString
public void paramString(StringBuffer buf)
- Debugging.
- Overrides:
- paramString in class ValueWidget
All Packages Class Hierarchy This Package Previous Next Index