Figure figure = getFigureWithoutDecoration(drawing().findFigure(e.getX(), e.getY())); if ((figure != null) && (figure instanceof CompositeFigure)) { setContainerFigure((CompositeFigure)figure); setCreatedFigure(createFigure()); setAddedFigure((getContainerFigure().add(getCreatedFigure())));  setAnchorPoint(new Point(x, y)); getAddedFigure().displayBox(getAnchorPoint(), getAnchorPoint());
Figure figure = drawing().findFigure(e.getX(), e.getY()); if (figure != null) { figure = figure.getDecoratedFigure(); if (figure instanceof CompositeFigure) { setContainerFigure((CompositeFigure)figure); setCreatedFigure(createFigure()); setAddedFigure((getContainerFigure().add(getCreatedFigure()))); getAddedFigure().displayBox(new Point(x, y), new Point(x, y)); } else { toolDone(); }
	public void mouseDown(MouseEvent e, int x, int y) {		setView((DrawingView)e.getSource());		Figure figure = getFigureWithoutDecoration(drawing().findFigure(e.getX(), e.getY()));		if ((figure != null) && (figure instanceof CompositeFigure)) {			setContainerFigure((CompositeFigure)figure);			setCreatedFigure(createFigure());			setAddedFigure((getContainerFigure().add(getCreatedFigure())));			setAnchorPoint(new Point(x, y));			getAddedFigure().displayBox(getAnchorPoint(), getAnchorPoint());		}		else {			toolDone();		}	}