import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;


/**
 * NOW OBSOLETE!!!
 * Would get the color from the pressing of the buttons on the button panel,
 * but since we have no button panel anymore, we don't need this.
 *
 * @author Bryce Borchers.
 *         Created Mar 28, 2008.
 */
public class ColorTool extends JButton implements ActionListener {
	
	/**
	 * Initializes our color to black.
	 */
	protected static Color drawColor = Color.BLACK;

	/**
	 * Checks for pressing the color buttons.
	 *
	 * @param c
	 */
	public ColorTool(Color c) {
		this.setBackground(c);
		this.addActionListener(this);
		this.addActionListener(Paint.preview);
	}

	public void actionPerformed(ActionEvent e) {
		ColorTool.drawColor = this.getBackground();

	}

}
