protected void processMousePressed(MouseEvent e) {
		requestFocusInWindow();
		int x = e.getX();
		int y = e.getY();
		pressPoint.x = x;
		pressPoint.y = y;
		switch (mode) {
		case DEFAULT_MODE:
			if (editable) {
				select(x, y);
			}
			break;
		case LINE_MODE:
			if (editable) {
				setSelectedElement(null);
				clickPoint.setLocation(x, y);
			}
			break;
		case MEASURE_MODE:
			clickPoint.setLocation(x, y);
			break;
		case RECT_MODE:
		case ELLIPSE_MODE:
		case TRIANGLE_MODE:
			if (editable) {
				setSelectedElement(null);
				selectedArea.setLocation(x, y);
				anchorPoint.setLocation(x, y);
			}
			break;
		}
		repaint();
	}