void (int button) { if (button == MouseEvent.BUTTON1 || button == MouseEvent.BUTTON2) { if (myState == STATE_INIT) { myState = STATE_DRAG; if (myInputEvent.isControlDown()) { mySelectionMode = TOGGLE_MODE; } else if (myInputEvent.isShiftDown()) { mySelectionMode = APPEND_MODE; } } } else { myState = STATE_INVALID; eraseFeedback(); } if (button != MouseEvent.BUTTON3) { refreshCursor(); } }