org.jmol.viewer

Class MouseManager

public abstract class MouseManager extends Object implements KeyListener

Nested Class Summary
classMouseManager.HoverWatcher
Field Summary
static intALT
static intALT_LEFT
static intALT_SHIFT_LEFT
static intBUTTON_MODIFIER_MASK
static intCTRL
static intCTRL_ALT_LEFT
static intCTRL_ALT_SHIFT_LEFT
static intCTRL_ALT_SHIFT_RIGHT
static intCTRL_LEFT
static intCTRL_MIDDLE
static intCTRL_RIGHT
static intCTRL_SHIFT
static intCTRL_SHIFT_LEFT
static intCTRL_SHIFT_MIDDLE
static intCTRL_SHIFT_RIGHT
booleandrawMode
booleanhoverActive
ThreadhoverWatcherThread
static intLEFT
static intLEFT_MIDDLE_RIGHT
MeasurementPendingmeasurementPending
booleanmeasuresEnabled
longmouseMovedTime
intmouseMovedX
intmouseMovedY
static longMAX_DOUBLE_CLICK_MILLIS
static intMIDDLE
static intMIDDLE_RIGHT
intpressedCount
intpreviousClickCount
intpreviousClickModifiers
longpreviousClickTime
intpreviousClickX
intpreviousClickY
intpreviousDragX
intpreviousDragY
intpreviousPressedModifiers
longpreviousPressedTime
intpreviousPressedX
intpreviousPressedY
static RectanglerectRubber
booleanrubberbandSelectionMode
static intRIGHT
static intSHIFT
static intSHIFT_LEFT
static intSHIFT_MIDDLE
static intSHIFT_RIGHT
longtimeCurrent
Viewerviewer
static floatwheelClickFractionDown
static floatwheelClickFractionUp
intxAnchor
intxCurrent
intyAnchor
intyCurrent
Constructor Summary
MouseManager(Viewer viewer)
Method Summary
intaddToMeasurement(int atomIndex, Point3f nearestPoint, boolean dblClick)
voidcalcRectRubberBand()
voidcheckMotion()
voidcheckPointOrAtomClicked(int x, int y, int modifiers, int clickCount)
voidclear()
voidclearClickCount()
voidenterMeasurementMode()
voidexitMeasurementMode()
RectanglegetRubberBand()
abstract booleanhandleOldJvm10Event(Event e)
voidhoverOff()
voidhoverOn(int atomIndex)
voidkeyPressed(KeyEvent ke)
voidkeyReleased(KeyEvent ke)
voidkeyTyped(KeyEvent ke)
voidmouseClicked(long time, int x, int y, int modifiers, int clickCount)
voidmouseDragged(long time, int x, int y, int modifiers)
voidmouseEntered(long time, int x, int y)
mth 2004 03 17 this isPopupTrigger stuff just doesn't work reliably for me and I don't have a Mac to test out CTRL-CLICK behavior Therefore ... we are going to implement both gestures to bring up the popup menu The fact that we are using CTRL_LEFT may interfere with other platforms if/when we need to support multiple selections, but we will cross that bridge when we come to it
voidmouseExited(long time, int x, int y)
voidmouseMoved(long time, int x, int y, int modifiers)
voidmousePressed(long time, int x, int y, int modifiers, boolean isPopupTrigger)
voidmouseReleased(long time, int x, int y, int modifiers)
voidmouseWheel(long time, int rotation, int modifiers)
protected voidprocessKeyEvent(KeyEvent ke)
voidremoveMouseListeners11()
voidremoveMouseListeners14()
voidsetModeMouse(int modeMouse)
voidsetMouseMode()
voidstartHoverWatcher(boolean isStart)
voidtoggleMeasurement()

Field Detail

ALT

static final int ALT

ALT_LEFT

public static final int ALT_LEFT

ALT_SHIFT_LEFT

public static final int ALT_SHIFT_LEFT

BUTTON_MODIFIER_MASK

public static final int BUTTON_MODIFIER_MASK

CTRL

static final int CTRL

CTRL_ALT_LEFT

static final int CTRL_ALT_LEFT

CTRL_ALT_SHIFT_LEFT

static final int CTRL_ALT_SHIFT_LEFT

CTRL_ALT_SHIFT_RIGHT

static final int CTRL_ALT_SHIFT_RIGHT

CTRL_LEFT

static final int CTRL_LEFT

CTRL_MIDDLE

static final int CTRL_MIDDLE

CTRL_RIGHT

static final int CTRL_RIGHT

CTRL_SHIFT

static final int CTRL_SHIFT

CTRL_SHIFT_LEFT

static final int CTRL_SHIFT_LEFT

CTRL_SHIFT_MIDDLE

static final int CTRL_SHIFT_MIDDLE

CTRL_SHIFT_RIGHT

static final int CTRL_SHIFT_RIGHT

drawMode

boolean drawMode

hoverActive

boolean hoverActive

hoverWatcherThread

Thread hoverWatcherThread

LEFT

static final int LEFT

LEFT_MIDDLE_RIGHT

static final int LEFT_MIDDLE_RIGHT

measurementPending

MeasurementPending measurementPending

measuresEnabled

boolean measuresEnabled

mouseMovedTime

long mouseMovedTime

mouseMovedX

int mouseMovedX

mouseMovedY

int mouseMovedY

MAX_DOUBLE_CLICK_MILLIS

static final long MAX_DOUBLE_CLICK_MILLIS

MIDDLE

static final int MIDDLE

MIDDLE_RIGHT

static final int MIDDLE_RIGHT

pressedCount

int pressedCount

previousClickCount

int previousClickCount

previousClickModifiers

int previousClickModifiers

previousClickTime

long previousClickTime

previousClickX

int previousClickX

previousClickY

int previousClickY

previousDragX

int previousDragX

previousDragY

int previousDragY

previousPressedModifiers

int previousPressedModifiers

previousPressedTime

long previousPressedTime

previousPressedX

int previousPressedX

previousPressedY

int previousPressedY

rectRubber

static final Rectangle rectRubber

rubberbandSelectionMode

private boolean rubberbandSelectionMode

RIGHT

static final int RIGHT

SHIFT

public static final int SHIFT

SHIFT_LEFT

public static final int SHIFT_LEFT

SHIFT_MIDDLE

static final int SHIFT_MIDDLE

SHIFT_RIGHT

static final int SHIFT_RIGHT

timeCurrent

long timeCurrent

viewer

Viewer viewer

wheelClickFractionDown

static final float wheelClickFractionDown

wheelClickFractionUp

static final float wheelClickFractionUp

xAnchor

int xAnchor

xCurrent

int xCurrent

yAnchor

int yAnchor

yCurrent

int yCurrent

Constructor Detail

MouseManager

MouseManager(Viewer viewer)

Method Detail

addToMeasurement

private int addToMeasurement(int atomIndex, Point3f nearestPoint, boolean dblClick)

calcRectRubberBand

private void calcRectRubberBand()

checkMotion

void checkMotion()

checkPointOrAtomClicked

private void checkPointOrAtomClicked(int x, int y, int modifiers, int clickCount)

clear

void clear()

clearClickCount

void clearClickCount()

enterMeasurementMode

private void enterMeasurementMode()

exitMeasurementMode

private void exitMeasurementMode()

getRubberBand

Rectangle getRubberBand()

handleOldJvm10Event

abstract boolean handleOldJvm10Event(Event e)

hoverOff

void hoverOff()

hoverOn

void hoverOn(int atomIndex)

keyPressed

public void keyPressed(KeyEvent ke)

keyReleased

public void keyReleased(KeyEvent ke)

keyTyped

public void keyTyped(KeyEvent ke)

mouseClicked

void mouseClicked(long time, int x, int y, int modifiers, int clickCount)

mouseDragged

void mouseDragged(long time, int x, int y, int modifiers)

mouseEntered

void mouseEntered(long time, int x, int y)
mth 2004 03 17 this isPopupTrigger stuff just doesn't work reliably for me and I don't have a Mac to test out CTRL-CLICK behavior Therefore ... we are going to implement both gestures to bring up the popup menu The fact that we are using CTRL_LEFT may interfere with other platforms if/when we need to support multiple selections, but we will cross that bridge when we come to it

mouseExited

void mouseExited(long time, int x, int y)

mouseMoved

void mouseMoved(long time, int x, int y, int modifiers)

mousePressed

void mousePressed(long time, int x, int y, int modifiers, boolean isPopupTrigger)

mouseReleased

void mouseReleased(long time, int x, int y, int modifiers)

mouseWheel

void mouseWheel(long time, int rotation, int modifiers)

processKeyEvent

protected void processKeyEvent(KeyEvent ke)

removeMouseListeners11

void removeMouseListeners11()

removeMouseListeners14

void removeMouseListeners14()

setModeMouse

void setModeMouse(int modeMouse)

setMouseMode

void setMouseMode()

startHoverWatcher

void startHoverWatcher(boolean isStart)

toggleMeasurement

private void toggleMeasurement()