public class Label
extends greenfoot.Actor
| Constructor and Description |
|---|
Label(int value,
int fontSize)
Create a new label, initialise it with the int value to be shown and the font size
|
Label(java.lang.String value,
int fontSize)
Create a new label, initialise it with the needed text and the font size
|
| Modifier and Type | Method and Description |
|---|---|
void |
setFillColor(greenfoot.Color fillColor)
Sets the fill color of the text
|
void |
setLineColor(greenfoot.Color lineColor)
Sets the line color of the text
|
void |
setValue(int value)
Sets the value as integer
|
void |
setValue(java.lang.String value)
Sets the value as text
|
act, addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, turn, turnTowardspublic Label(int value,
int fontSize)
public Label(java.lang.String value,
int fontSize)
public void setValue(java.lang.String value)
value - the text to be showpublic void setValue(int value)
value - the value to be showpublic void setLineColor(greenfoot.Color lineColor)
lineColor - the line color of the textpublic void setFillColor(greenfoot.Color fillColor)
fillColor - the fill color of the text