
package jp.riken.brain.ni.samuraigraph.base;

import java.awt.Color;

import javax.swing.JButton;

/**
 *
 */
public class SGColorSelectionButton extends JButton
{

	/**
	 * 
	 */
	private boolean mColorSetFlag = true;


	/**
	 * 
	 */
	public SGColorSelectionButton()
	{
		super();
	}


	/**
	 * 
	 * @return
	 */
	public Color getColor()
	{
		return this.mColorSetFlag ? this.getBackground() : null;
	}


	/**
	 * 
	 * @param cl
	 */
	public void setColor( Color cl )
	{
		this.mColorSetFlag = (cl!=null);
		this.setBackground( cl );
	}


}

