public void setMode(final Mode mode) {
		if (this.mode != mode) {
			clearMouseListeners();
		}
		System.out.println("Set new mode: " + mode);
		this.mode = mode;
		switch (this.mode) {
		case LINE_DDA:
			addLineMouseListeners();
			break;
		case LINE_BREZENHEM:
			addLineMouseListeners();
			break;
		case LINE_WY:
			addLineMouseListeners();
		case NONE:
			addMouseListener(new DesktopMouseListener(controller, this));
			if (getMouseMotionListeners().length == 0) {
				addMouseMotionListener(new DesktopMouseListener(controller, this));
			}
			break;
		}
	}