@Override
	public void expand(int grabber, Point endMove, int canvasWidth, int canvasHeight)
	{
		if(((endMove.getX()) > 0)   // for X
				&& ((endMove.getY()) > 0) // for Y
				&& ((endMove.getX()) < canvasWidth) 
				&& ((endMove.getY()) < canvasHeight)	
				)
		{
			Point startMove = new Point();
			
			switch (grabber)
			{
				case 0:
							
						startMove = new Point((int) x,(int) y);
						width += (startMove.getX()-endMove.getX());
						height += (startMove.getY()-endMove.getY());
						x = endMove.getX();
						y = endMove.getY();
						break;
				
				case 1:
						startMove = new Point((int) (x + width),(int) y);	
						width += (endMove.getX()-startMove.getX());
						height += (startMove.getY()-endMove.getY());
						x = endMove.getX()-width;
						y = endMove.getY();
						break;
				
				case 2:	
	
						startMove = new Point((int) x,(int) (y + height));
						width += (startMove.getX()-endMove.getX());
						height += (endMove.getY()-startMove.getY());
						x = endMove.getX();
						y = endMove.getY()-height;
						break;
				
				case 3:
				{	
						startMove = new Point((int) (x + width),(int) (y + height));
						width += (endMove.getX()-startMove.getX());
						height += (endMove.getY()-startMove.getY());
						x = endMove.getX()-width;
						y = endMove.getY()-height;
						break;
				}
			}
		}
	}