public class GGTextField
extends java.lang.Object
| Constructor and Description | 
|---|
GGTextField(Location location,
           boolean enableRefresh)
Creates a GGTextField with standard attributes and no text. 
 | 
GGTextField(java.lang.String text,
           Location location,
           boolean enableRefresh)
Creates a GGTextField instance with standard attributes. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
TextActor | 
getTextActor()
Returns the current TextActor used for this text field. 
 | 
int | 
getTextHeight()
Returns the height of the text. 
 | 
int | 
getTextWidth()
Returns the total width of the text. 
 | 
void | 
hide()
Hides the text. 
 | 
boolean | 
isVisible()
Returns the visibility of the text. 
 | 
void | 
setBgColor(int bgColor)
Sets the background color attribute. 
 | 
void | 
setFontSize(int fontSize)
Sets the font size attribute. 
 | 
void | 
setLocation(Location location)
Sets the location attribute. 
 | 
void | 
setLocationOffset(android.graphics.Point locationOffset)
Sets a pixel offset in x- any y-direction relative to the current
 location. 
 | 
void | 
setText(java.lang.String text)
Sets the text attribute. 
 | 
void | 
setTextColor(int textColor)
Sets the text color attribute. 
 | 
void | 
setTypeface(android.graphics.Typeface typeface)
Sets the typeface attribute. 
 | 
void | 
show()
Displays the text. 
 | 
public GGTextField(java.lang.String text,
           Location location,
           boolean enableRefresh)
location - the location where the the text will be placed 
 (horizontally left aligned, vertically center aligned)text - the text string to showenableRefresh - if true, the automatic refresh of the game grid is turned on;
 otherwise refresh must be called by user code or performed by the simulation threadpublic GGTextField(Location location, boolean enableRefresh)
location - the location where the the text will be placed 
 (horizontally left aligned, vertically center aligned)enableRefresh - if true, the automatic refresh of the game grid is turned on;
 otherwise refresh must be called by user code or performed by the simulation threadpublic void show()
public void hide()
public boolean isVisible()
public void setLocation(Location location)
location - the location where the the text will be placed 
 (horizontally left aligned, vertically center aligned)public void setLocationOffset(android.graphics.Point locationOffset)
locationOffset - x,y displacement (x to the left, y downwards)public void setText(java.lang.String text)
text - the text string to showpublic void setTextColor(int textColor)
textColor - the color of the textpublic void setBgColor(int bgColor)
bgColor - the color of the text backgroundpublic void setFontSize(int fontSize)
fontSize - the size of the font (in pixels)public void setTypeface(android.graphics.Typeface typeface)
typeface - the typeface (font) of the textpublic TextActor getTextActor()
public int getTextWidth()
public int getTextHeight()