public class GGProgressBar
extends java.lang.Object
| Constructor and Description | 
|---|
GGProgressBar(GameGrid gg,
             Location loc,
             int width,
             int height)
Creates a horizontal progress bar with default properties. 
 | 
GGProgressBar(GameGrid gg,
             Location loc,
             int width,
             int height,
             boolean isHorizontal)
Creates a horizontal or vertical progress bar with default properties. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
remove(boolean doRefresh)
Removes the progress bar from the game grid. 
 | 
void | 
setBgColor(int color)
Sets the background color of the frame. 
 | 
void | 
setFrameColor(int color)
Sets the border color of the frame. 
 | 
void | 
setMax(double max)
Sets the maximum value of the indicator. 
 | 
void | 
setMin(double min)
Sets the minimum value of the indicator. 
 | 
void | 
setPattern(java.lang.String pattern)
Sets the DecimalFormat pattern used to display the value. 
 | 
void | 
setStripColor(int color)
Sets the color of the indicator strip (filled rectangle). 
 | 
void | 
setTextColor(int color)
Sets the color of the text centered in the middle of the bar. 
 | 
void | 
setTextSize(int size)
Sets the text size. 
 | 
void | 
setTextSize(android.graphics.Typeface typeface)
Sets the text typeface. 
 | 
void | 
setUnit(java.lang.String unit)
Sets the text displayed as unit. 
 | 
void | 
setValue(double value)
Sets the current value of the progress bar. 
 | 
void | 
setValue(double value,
        boolean refresh)
Sets the current value of the progress bar. 
 | 
public GGProgressBar(GameGrid gg, Location loc, int width, int height)
gg - the GameGrid reference where the bar is shownloc - the location of the bar's centerwidth - the width (length) of the barheight - the height of the barpublic GGProgressBar(GameGrid gg, Location loc, int width, int height, boolean isHorizontal)
gg - the GameGrid reference where the bar is shownloc - the location of the bar's centerwidth - the width (length) of the barheight - the height of the barisHorizontal - if true, a horizontal bar is shown; 
 otherwise a vertical bar is shownpublic void setBgColor(int color)
color - the background colorpublic void setFrameColor(int color)
color - the color of the frame borderpublic void setStripColor(int color)
color - the color of the strippublic void setTextColor(int color)
color - the text colorpublic void setMin(double min)
min - the value for a strip length = 0.public void setMax(double max)
max - the value for a the full length strip.public void setUnit(java.lang.String unit)
unit - the unit stringpublic void setTextSize(int size)
size - for the unit value/unit textpublic void setTextSize(android.graphics.Typeface typeface)
typeface - the typeface for the unit value/unit textpublic void setPattern(java.lang.String pattern)
pattern - the format pattern used to create the decimal format for the
 value textpublic void setValue(double value)
value - the new valuepublic void remove(boolean doRefresh)
doRefresh - if true, the game grid is refreshedpublic void setValue(double value,
            boolean refresh)
value - the new valuerefresh - if true, the game grid is refreshed; otherwise it must be refreshed 
 by another call (e.g. GamgeGrid.addActor(), GameGrid.refresh(), etc.)