@Override
	public void mousePressed(MouseEvent e) {
		if (e.isConsumed()) {
			return;
		}
		
		if (e.getButton() != MouseEvent.BUTTON1) {
			return;
		}
		
		Object task = chart.getTaskAtPoint(e.getPoint());
		
		if (task == null) {
			if (!e.isControlDown()) {
				chart.clearSelection();
			}
		} else {
			if (e.isControlDown()) {
				chart.toggleTaskSelection(task);
			} else if (!chart.isTaskSelected(task)) {
				chart.clearSelection();
				chart.selectTask(task);
			}
		}
		
		chart.repaint(chart.getVisibleRect());
		
		if (e.isControlDown()) {
			return;
		}
		
		mode = getMode(e);
		
		if (mode == NONE) {
			return;
		}
		
		lastPoint = e.getPoint();
		
		e.consume();
	}