
package jp.riken.brain.ni.samuraigraph.figure.java2d;

import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;

import jp.riken.brain.ni.samuraigraph.figure.SGDrawingElementErrorBar;
import jp.riken.brain.ni.samuraigraph.figure.SGILineConstants;

/**
 * 
 *
 */
public class SGDrawingElementErrorBar2D extends SGDrawingElementErrorBar
	implements SGIDrawingElementJava2D
{

	/**
	 * 
	 */
	public SGDrawingElementErrorBar2D()
	{
		super();
		this.mArrowElement = new SGDrawingElementArrow2D();
		this.mArrowElement.setLineType( SGILineConstants.LINE_TYPE_SOLID );
	}


	/**
	 * 
	 */
	public boolean contains(int x, int y)
	{
		return this.mArrowElement.contains(x,y);
	}


	/**
	 * 
	 */
	public void paintElement( Graphics2D g2d )
	{
		((SGDrawingElementArrow2D)this.mArrowElement).paintElement(g2d);
	}


	/**
	 * 
	 * @param g2d
	 * @param rect
	 */
	public void paint( Graphics2D g2d, Rectangle2D rect )
	{
		((SGDrawingElementArrow2D)this.mArrowElement).paint(g2d,rect);
	}


	/**
	 * 
	 */
	public Rectangle2D getElementBounds()
	{
		return ((SGDrawingElementArrow2D)this.mArrowElement).getElementBounds();
	}

}

