import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JButton;


/**
 * The polygon button; draws polygons by connecting points clicked by the user.
 *
 * @author Annmarie Stanley and Hannah Chadd.
 *         Created Apr 4, 2008.
 */
public class polyButton extends JButton implements ActionListener,
		MouseListener {
	
	/** Indicates when a new polygon is about to start; used in CanvasPanel*/
	public static int state = 0; 
	// 0 = normal, draw lines when stuff is clicked 
	// 1 = begin, set a beginning point at the next click
	// 2 = wait, do nothing
	
	/** Creates a polygon button*/
	//@SuppressWarnings("deprecation")
	public polyButton() {
		super("Polygon");
		//this.setLabel("Polygon");
	}

	public void actionPerformed(ActionEvent e) {
		state = 1;
		
		CanvasPanel.changeButton(6);

	}

	public void mouseClicked(MouseEvent e) {
		// Empty

	}

	public void mouseEntered(MouseEvent e) {
		// Empty

	}

	public void mouseExited(MouseEvent e) {
		// Empty

	}

	public void mousePressed(MouseEvent e) {
		// Empty

	}

	public void mouseReleased(MouseEvent e) {
		// Empty

	}

}
