Class ButtonHandler

java.lang.Object
  extended byButtonHandler
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class ButtonHandler
extends java.lang.Object
implements java.awt.event.ActionListener

Clase que maneja los eventos relacionados con los botones de Acci?n y Figuras.


Constructor Summary
ButtonHandler()
          Constructor vacio.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Implementa actionPerformed para detectar un click sobre un bot?n.
static java.lang.String whatToDo()
          Retorna un string seg?n qu? Acci?n se escogi? realizar.
static java.lang.String whichToDraw()
          Retorna un string seg?n qu? Figura se escogi? dibujar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ButtonHandler

public ButtonHandler()
Constructor vacio. Solo para usar sus m?todos.

Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Implementa actionPerformed para detectar un click sobre un bot?n. Seg?n el Action Command del bot?n seleccionado se configuran apropiadamente las variables booleanas comprometidas.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - El evento interceptado. Ocurre al oprimir un bot?n.

whichToDraw

public static java.lang.String whichToDraw()
Retorna un string seg?n qu? Figura se escogi? dibujar.

Returns:
La inicial de la Figura a dibujar.

whatToDo

public static java.lang.String whatToDo()
Retorna un string seg?n qu? Acci?n se escogi? realizar.

Returns:
La inicial de la Acci?n a efectuar.