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

import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import jp.riken.brain.ni.samuraigraph.base.*;
import jp.riken.brain.ni.samuraigraph.data.*;
import jp.riken.brain.ni.samuraigraph.figure.*;


/**
 * 
 */
public class SGDrawingElementBar2D extends SGDrawingElementBar
	implements SGIDrawingElementJava2D
{

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



	/**
	 * 
	 */
	public SGDrawingElementBar2D(
		final float x,
		final float y,
		final float w,
		final float h )
	{
		super();

		setBounds( x, y, w, h );
	}



	/**
	 * 
	 */
	public Rectangle2D getElementBounds()
	{
		Rectangle2D rect = new Rectangle2D.Float(
			this.getX(), this.getY(), this.getWidth(), this.getHeight() );
		return rect;
	}


	/**
	 * 
	 */
	public boolean contains(final int x, final int y)
	{
		Rectangle2D rect = new Rectangle2D.Float(
			mX, mY, mWidth, mHeight );
		boolean flag = rect.contains(x,y);

		return flag;
	}


	/**
	 * 
	 */
	public Shape getShape()
	{
		Rectangle2D rect
			= new Rectangle2D.Float(
				this.getX(), this.getY(),
				this.getWidth(), this.getHeight() );
		return rect;
	}



}
