org.xith3d.ui.hud.widgets
Class ProgressBar

java.lang.Object
  extended by org.xith3d.ui.hud.base.WidgetBase
      extended by org.xith3d.ui.hud.base.RectangularWidget
          extended by org.xith3d.ui.hud.widgets.ProgressBar
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.types.twodee.Positioned2f, org.openmali.types.twodee.Positioned2fRO, org.openmali.types.twodee.Sized2f, org.openmali.types.twodee.Sized2fRO, Widget

public class ProgressBar
extends RectangularWidget


Nested Class Summary
static class ProgressBar.Description
          This class is used to describe a ProgressBar Widget.
 
Nested classes/interfaces inherited from interface org.xith3d.ui.hud.base.Widget
Widget.DescriptionBase
 
Field Summary
 
Fields inherited from class org.xith3d.ui.hud.base.WidgetBase
containerListeners, transformGroup, translation, Z_INDEX_UNIT, Z_INDEX_UNIT_ASSEMBLER
 
Constructor Summary
ProgressBar(float width, float height)
          Creates a new ProgressBar.
ProgressBar(float width, float height, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new ProgressBar.
ProgressBar(float width, float height, java.awt.Font font, org.openmali.vecmath2.Colorf color, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int zIndex)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int zIndex, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int zIndex, java.awt.Font font, org.openmali.vecmath2.Colorf color, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int minValue, int maxValue)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int minValue, int maxValue, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int minValue, int maxValue, java.awt.Font font, org.openmali.vecmath2.Colorf color, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int zIndex, int minValue, int maxValue)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int zIndex, int minValue, int maxValue, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int zIndex, int minValue, int maxValue, java.awt.Font font, org.openmali.vecmath2.Colorf color, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int zIndex, int minValue, int maxValue, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int minValue, int maxValue, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(float width, float height, int zIndex, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(float width, float height, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, java.awt.Font font, org.openmali.vecmath2.Colorf color, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int zIndex)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int zIndex, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int zIndex, java.awt.Font font, org.openmali.vecmath2.Colorf color, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int minValue, int maxValue)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int minValue, int maxValue, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int minValue, int maxValue, java.awt.Font font, org.openmali.vecmath2.Colorf color, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int zIndex, int minValue, int maxValue)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int zIndex, int minValue, int maxValue, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int zIndex, int minValue, int maxValue, java.awt.Font font, org.openmali.vecmath2.Colorf color, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int zIndex, int minValue, int maxValue, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int minValue, int maxValue, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, int zIndex, ProgressBar.Description desc)
          Creates a new ProgressBar.
ProgressBar(org.openmali.types.twodee.Sized2fRO size, ProgressBar.Description desc)
          Creates a new ProgressBar.
 
Method Summary
 java.awt.Font getFont()
           
 org.openmali.vecmath2.Colorf getFontColor()
           
 int getMaxValue()
           
 int getMinValue()
           
 float getTransparency()
          
 int getValue()
           
protected  void init()
          This method is called when the WidgetContainer is set.
 void setFont(java.awt.Font font)
          Sets the Font to use for the percent value in the center of the ProgressBar.
 void setFont(java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Sets the Font to use for the percent value in the center of the ProgressBar.
 void setFontColor(org.openmali.vecmath2.Colorf color)
          Sets the Font color to use for the percent value in the center of the ProgressBar.
 void setMaxValue(int maxValue)
          Sets the maximum value this ProgressBar can take.
 void setMinValue(int minValue)
          Sets the minimum value this ProgressBar can take.
 void setValue(int value)
          Sets the current value of this ProgressBar.
 void updateBar()
          Sets the current value of this ProgressBar.
protected  void updateText(java.lang.String text)
           
 
Methods inherited from class org.xith3d.ui.hud.base.RectangularWidget
getPickHeight, getPickSGZPosition, getPickWidth, pick
 
Methods inherited from class org.xith3d.ui.hud.base.WidgetBase
addContainerListener, addFocusListener, addInputListener, addLocationListener, addSizeListener, addVisibilityListener, detach, detach, getAspect, getAssembly, getCachedToolTipWidget, getContainer, getContextMenu, getCursor, getHeight, getHUD, getInheritedCursor, getLeft, getLocation, getName, getSGNode, getSGZPosition, getSize, getToolTip, getTop, getUserObject, getWidgetAssembler, getWidth, getZIndex, hasFocus, hasFocus, hasToolTip, isClickable, isDraggable, isFocussable, isInitialized, isInitializing, isPickable, isVisible, onAddedToContainer, onAddedToHUD, onControllerAxisChanged, onControllerButtonPressed, onControllerButtonReleased, onDetached, onFocusGained, onFocusLost, onInputStateChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseButtonPressed, onMouseButtonReleased, onMouseEntered, onMouseLeft, onMouseMoved, onMouseStopped, onMouseUnbound, onMouseWheelMoved, onRemovedFromContainer, pickWidgetAssembler, removeContainerListener, removeFocusListener, removeInputListener, removeLocationListener, removeSizeListener, removeVisibilityListener, requestFocus, setAssembly, setCachedToolTipWidget, setClickable, setContainer, setContextMenu, setCursor, setDraggable, setFocussable, setHeight, setLocation, setLocation, setLocation, setName, setPickable, setSize, setSize, setSize, setSize, setToolTip, setTransparency, setUserObject, setVisible, setWidth, setZIndex, toString, update, updateTranslation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProgressBar

public ProgressBar(float width,
                   float height,
                   int zIndex,
                   int minValue,
                   int maxValue,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
zIndex - the desired z-index
minValue - the initial minimum value
maxValue - the initial maximum value
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int zIndex,
                   int minValue,
                   int maxValue,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
size - the desired size
zIndex - the desired z-index
minValue - the initial minimum value
maxValue - the initial maximum value
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   int zIndex,
                   int minValue,
                   int maxValue,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
zIndex - the desired z-index
minValue - the initial minimum value
maxValue - the initial maximum value
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int zIndex,
                   int minValue,
                   int maxValue,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color)
Creates a new ProgressBar.

Parameters:
size - the desired size
zIndex - the desired z-index
minValue - the initial minimum value
maxValue - the initial maximum value
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   int zIndex,
                   int minValue,
                   int maxValue,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
zIndex - the desired z-index
minValue - the initial minimum value
maxValue - the initial maximum value
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int zIndex,
                   int minValue,
                   int maxValue,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
size - the desired size
zIndex - the desired z-index
minValue - the initial minimum value
maxValue - the initial maximum value
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int zIndex,
                   int minValue,
                   int maxValue)
Creates a new ProgressBar.

Parameters:
size - the desired size
zIndex - the desired z-index
minValue - the initial minimum value
maxValue - the initial maximum value

ProgressBar

public ProgressBar(float width,
                   float height,
                   int zIndex,
                   int minValue,
                   int maxValue)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
zIndex - the desired z-index
minValue - the initial minimum value
maxValue - the initial maximum value

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int zIndex,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
size - the desired size
zIndex - the desired z-index
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   int zIndex,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
zIndex - the desired z-index
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int zIndex,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color)
Creates a new ProgressBar.

Parameters:
size - the desired size
zIndex - the desired z-index
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   int zIndex,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
zIndex - the desired z-index
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int zIndex,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
size - the desired size
zIndex - the desired z-index
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   int zIndex,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
zIndex - the desired z-index
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int zIndex)
Creates a new ProgressBar.

Parameters:
size - the desired size
zIndex - the desired z-index

ProgressBar

public ProgressBar(float width,
                   float height,
                   int zIndex)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
zIndex - the desired z-index

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
size - the desired size
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color)
Creates a new ProgressBar.

Parameters:
size - the desired size
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
size - the desired size
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size)
Creates a new ProgressBar.

Parameters:
size - the desired size

ProgressBar

public ProgressBar(float width,
                   float height)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int minValue,
                   int maxValue,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
size - the desired size
minValue - the initial minimum value
maxValue - the initial maximum value
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   int minValue,
                   int maxValue,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
minValue - the initial minimum value
maxValue - the initial maximum value
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int minValue,
                   int maxValue,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color)
Creates a new ProgressBar.

Parameters:
size - the desired size
minValue - the initial minimum value
maxValue - the initial maximum value
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   int minValue,
                   int maxValue,
                   java.awt.Font font,
                   org.openmali.vecmath2.Colorf color)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
minValue - the initial minimum value
maxValue - the initial maximum value
font - the Font to use for the percent value in the center of the ProgressBar
color - the color to use for the percent value in the center of the ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int minValue,
                   int maxValue,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
size - the desired size
minValue - the initial minimum value
maxValue - the initial maximum value
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(float width,
                   float height,
                   int minValue,
                   int maxValue,
                   ProgressBar.Description desc)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
minValue - the initial minimum value
maxValue - the initial maximum value
desc - the ProgressBar.Description to describe this ProgressBar

ProgressBar

public ProgressBar(org.openmali.types.twodee.Sized2fRO size,
                   int minValue,
                   int maxValue)
Creates a new ProgressBar.

Parameters:
size - the desired size
minValue - the initial minimum value
maxValue - the initial maximum value

ProgressBar

public ProgressBar(float width,
                   float height,
                   int minValue,
                   int maxValue)
Creates a new ProgressBar.

Parameters:
width - the desired width
height - the desired height
minValue - the initial minimum value
maxValue - the initial maximum value
Method Detail

getTransparency

public float getTransparency()

Returns:
the whole Widget's Transparency.

setFont

public void setFont(java.awt.Font font)
Sets the Font to use for the percent value in the center of the ProgressBar.

Parameters:
font - the Font

getFont

public java.awt.Font getFont()
Returns:
the Font to use for the percent value in the center of the ProgressBar.

setFontColor

public void setFontColor(org.openmali.vecmath2.Colorf color)
Sets the Font color to use for the percent value in the center of the ProgressBar.

Parameters:
color - the Color

getFontColor

public org.openmali.vecmath2.Colorf getFontColor()
Returns:
the Font color to use for the percent value in the center of the ProgressBar.

setFont

public void setFont(java.awt.Font font,
                    org.openmali.vecmath2.Colorf color)
Sets the Font to use for the percent value in the center of the ProgressBar.

Parameters:
font - the Font
color - the font-color

setMinValue

public void setMinValue(int minValue)
Sets the minimum value this ProgressBar can take. Default: 0

Parameters:
minValue - the new minimum value

getMinValue

public int getMinValue()
Returns:
the minimum value this ProgressBar can take. Default: 0

setMaxValue

public void setMaxValue(int maxValue)
Sets the maximum value this ProgressBar can take. Default: 100

Parameters:
maxValue - the new minimum value

getMaxValue

public int getMaxValue()
Returns:
the maximum value this ProgressBar can take. Default: 100

updateText

protected void updateText(java.lang.String text)

updateBar

public void updateBar()
Sets the current value of this ProgressBar. Default: 0


setValue

public void setValue(int value)
Sets the current value of this ProgressBar. Default: 0

Parameters:
value - the new value

getValue

public int getValue()
Returns:
the current value of this ProgressBar. Default: 0

init

protected void init()
This method is called when the WidgetContainer is set.

Specified by:
init in class WidgetBase