Class Button

java.lang.Object
  extended by greenfoot.Actor
      extended by Button

public class Button
extends greenfoot.Actor

This class represents a Button object

Version:
12.06.2015
Author:
Maria - Despoina Gkaintatzi

Constructor Summary
Button(java.lang.String letter)
          Constructor for the objects of class Button.
 
Method Summary
 void act()
          Act - do whatever the Button wants to do.
 void clearButton()
          Clears the letter from the button.
 void drawSomeLetter(java.lang.String letter, java.awt.Color color)
          Draws a given letter in a specific color in the image that represents the actor.
 
Methods inherited from class greenfoot.Actor
addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, turn, turnTowards
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Button

public Button(java.lang.String letter)
Constructor for the objects of class Button.

Parameters:
letter(String) - the letter of the button
Method Detail

act

public void act()
Act - do whatever the Button wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment.

Overrides:
act in class greenfoot.Actor

clearButton

public void clearButton()
Clears the letter from the button.


drawSomeLetter

public void drawSomeLetter(java.lang.String letter,
                           java.awt.Color color)
Draws a given letter in a specific color in the image that represents the actor.

Parameters:
letter(String) - the letter to be drawn in the balloon
color(Color) - the color of the letter