public void modeChange(int mode) {
		switch (mode) {
		case CPController.M_DRAW:
			curSelectedMode = curDrawMode;
			break;

		case CPController.M_FLOODFILL:
			curSelectedMode = floodFillMode;
			break;

		case CPController.M_RECT_SELECTION:
			curSelectedMode = rectSelectionMode;
			break;

		case CPController.M_MOVE_TOOL:
			curSelectedMode = moveToolMode;
			break;

		case CPController.M_ROTATE_CANVAS:
			curSelectedMode = rotateCanvasMode;
			break;
		}
	}