Package org.jmol.awtjs2d
Class Mouse
java.lang.Object
org.jmol.awtjs2d.Mouse
- All Implemented Interfaces:
GenericMouseInterface
JavaScript interface from JmolJSmol.js via handleOldJvm10Event (for now)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private String
private EventManager
private int
private int
private Viewer
private boolean
private int
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addKeyBuffer
(char ch) private static int
applyLeftMouse
(int modifiers) void
clear()
private void
private void
clicked
(long time, int x, int y, int modifiers, int clickCount) void
dispose()
private void
dragged
(long time, int x, int y) private void
entry
(long time, int x, int y, boolean isExit) void
keyPressed
(KeyEvent ke) void
keyReleased
(KeyEvent ke) void
void
void
void
void
void
void
void
void
private void
moved
(long time, int x, int y, int modifiers) private void
pressed
(long time, int x, int y, int modifiers, boolean isPopupTrigger) boolean
processEvent
(int id, int x, int y, int modifiers, long time) void
processKeyEvent
(Object event) void
processTwoPointGesture
(float[][][] touches) called by JSmol as processTwoPointGesture(canvas.touches);private void
released
(long time, int x, int y, int modifiers) private void
private void
wheeled
(long time, int rotation, int modifiers)
-
Field Details
-
vwr
-
manager
-
keyBuffer
-
isMouseDown
private boolean isMouseDown -
wheeling
private boolean wheeling -
modifiersDown
private int modifiersDown -
xWhenPressed
private int xWhenPressed -
yWhenPressed
private int yWhenPressed -
modifiersWhenPressed10
private int modifiersWhenPressed10
-
-
Constructor Details
-
Mouse
- Parameters:
privateKey
- -- not used in JavaScriptvwr
-display
-
-
-
Method Details
-
clear
public void clear()- Specified by:
clear
in interfaceGenericMouseInterface
-
dispose
public void dispose()- Specified by:
dispose
in interfaceGenericMouseInterface
-
processEvent
public boolean processEvent(int id, int x, int y, int modifiers, long time) - Specified by:
processEvent
in interfaceGenericMouseInterface
-
processTwoPointGesture
public void processTwoPointGesture(float[][][] touches) called by JSmol as processTwoPointGesture(canvas.touches);- Specified by:
processTwoPointGesture
in interfaceGenericMouseInterface
- Parameters:
touches
- [[finger1 touches],[finger2 touches]] where finger touches are [[x0,y0],[x1,y1],[x2,y2],...]
-
mouseClicked
-
mouseEntered
-
mouseExited
-
mousePressed
-
mouseReleased
-
mouseDragged
-
mouseMoved
-
mouseWheelMoved
-
keyTyped
-
keyPressed
-
keyReleased
-
clearKeyBuffer
private void clearKeyBuffer() -
addKeyBuffer
private void addKeyBuffer(char ch) -
sendKeyBuffer
private void sendKeyBuffer() -
entry
private void entry(long time, int x, int y, boolean isExit) -
clicked
private void clicked(long time, int x, int y, int modifiers, int clickCount) - Parameters:
time
-x
-y
-modifiers
-clickCount
-
-
moved
private void moved(long time, int x, int y, int modifiers) -
wheeled
private void wheeled(long time, int rotation, int modifiers) -
pressed
private void pressed(long time, int x, int y, int modifiers, boolean isPopupTrigger) - Parameters:
time
-x
-y
-modifiers
-isPopupTrigger
-
-
released
private void released(long time, int x, int y, int modifiers) -
dragged
private void dragged(long time, int x, int y) -
applyLeftMouse
private static int applyLeftMouse(int modifiers) -
processKeyEvent
- Specified by:
processKeyEvent
in interfaceGenericMouseInterface
-