public void mousePressed(MouseEvent e) {
			if ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0 && color != null) {
				controller.setCurColor(color);
				repaint();
			}
			if ((e.getModifiers() & InputEvent.BUTTON2_MASK) != 0 && color != null) {
				color = null;
				repaint();
			}
			if ((e.getModifiers() & InputEvent.BUTTON3_MASK) != 0
					|| ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0 && color == null)) {
				color = (CPColor) controller.getCurColor().clone();
				repaint();
			}
		}