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 booleanprivate Stringprivate EventManagerprivate intprivate intprivate Viewerprivate booleanprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddKeyBuffer(char ch) private static intapplyLeftMouse(int modifiers) voidclear()private voidprivate voidclicked(long time, int x, int y, int modifiers, int clickCount) voiddispose()private voiddragged(long time, int x, int y) private voidentry(long time, int x, int y, boolean isExit) voidkeyPressed(KeyEvent ke) voidkeyReleased(KeyEvent ke) voidvoidvoidvoidvoidvoidvoidvoidvoidprivate voidmoved(long time, int x, int y, int modifiers) private voidpressed(long time, int x, int y, int modifiers, boolean isPopupTrigger) booleanprocessEvent(int id, int x, int y, int modifiers, long time) voidprocessKeyEvent(Object event) voidprocessTwoPointGesture(float[][][] touches) called by JSmol as processTwoPointGesture(canvas.touches);private voidreleased(long time, int x, int y, int modifiers) private voidprivate voidwheeled(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:
clearin interfaceGenericMouseInterface
-
dispose
public void dispose()- Specified by:
disposein interfaceGenericMouseInterface
-
processEvent
public boolean processEvent(int id, int x, int y, int modifiers, long time) - Specified by:
processEventin interfaceGenericMouseInterface
-
processTwoPointGesture
public void processTwoPointGesture(float[][][] touches) called by JSmol as processTwoPointGesture(canvas.touches);- Specified by:
processTwoPointGesturein 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:
processKeyEventin interfaceGenericMouseInterface
-