Package org.jmol.awtjs2d
Class Mouse
- java.lang.Object
-
- org.jmol.awtjs2d.Mouse
-
- All Implemented Interfaces:
GenericMouseInterface
public class Mouse extends java.lang.Object implements GenericMouseInterface
JavaScript interface from JmolJSmol.js via handleOldJvm10Event (for now)
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
isMouseDown
private java.lang.String
keyBuffer
private EventManager
manager
private int
modifiersDown
private int
modifiersWhenPressed10
private Viewer
vwr
private boolean
wheeling
private int
xWhenPressed
private int
yWhenPressed
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addKeyBuffer(char ch)
private static int
applyLeftMouse(int modifiers)
void
clear()
private void
clearKeyBuffer()
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(java.awt.event.KeyEvent ke)
void
keyReleased(java.awt.event.KeyEvent ke)
void
keyTyped(java.awt.event.KeyEvent ke)
void
mouseClicked(java.awt.event.MouseEvent e)
void
mouseDragged(java.awt.event.MouseEvent e)
void
mouseEntered(java.awt.event.MouseEvent e)
void
mouseExited(java.awt.event.MouseEvent e)
void
mouseMoved(java.awt.event.MouseEvent e)
void
mousePressed(java.awt.event.MouseEvent e)
void
mouseReleased(java.awt.event.MouseEvent e)
void
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
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
processTwoPointGesture(float[][][] touches)
called by JSmol as processTwoPointGesture(canvas.touches);private void
released(long time, int x, int y, int modifiers)
private void
sendKeyBuffer()
private void
wheeled(long time, int rotation, int modifiers)
-
-
-
Field Detail
-
vwr
private Viewer vwr
-
manager
private EventManager manager
-
keyBuffer
private java.lang.String 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 Detail
-
Mouse
public Mouse(double privateKey, Viewer vwr, java.lang.Object display)
- Parameters:
privateKey
- -- not used in JavaScriptvwr
-display
-
-
-
Method Detail
-
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
public void mouseClicked(java.awt.event.MouseEvent e)
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
-
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent ke)
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent ke)
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent ke)
-
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)
-
-