Package org.jmol.awt
Class Mouse
- java.lang.Object
-
- org.jmol.awt.Mouse
-
- All Implemented Interfaces:
java.awt.event.KeyListener,java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.awt.event.MouseWheelListener,java.util.EventListener,javajs.api.GenericMouseInterface
class Mouse extends java.lang.Object implements java.awt.event.MouseWheelListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener, javajs.api.GenericMouseInterfaceformerly org.jmol.viewer.MouseManager14 methods required by Jmol that access java.awt.event private to org.jmol.awt
-
-
Field Summary
Fields Modifier and Type Field Description private booleanisMouseDownprivate java.lang.StringkeyBufferprivate javajs.api.EventManagermanagerprivate intmodifiersDownprivate intmodifiersWhenPressed10private Viewervwrprivate booleanwheelingprivate intxWhenPressedprivate intyWhenPressed
-
Constructor Summary
Constructors Constructor Description Mouse(double privateKey, javajs.api.PlatformViewer vwr, java.lang.Object odisplay)Mouse is the listener for all events.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddKeyBuffer(char ch)private static intapplyLeftMouse(int modifiers)voidclear()private voidclearKeyBuffer()voiddispose()voidkeyPressed(java.awt.event.KeyEvent ke)voidkeyReleased(java.awt.event.KeyEvent ke)voidkeyTyped(java.awt.event.KeyEvent ke)private voidmouseClicked(long time, int x, int y, int modifiers, int clickCount)voidmouseClicked(java.awt.event.MouseEvent e)private voidmouseDragged(long time, int x, int y)voidmouseDragged(java.awt.event.MouseEvent e)private voidmouseEntered(long time, int x, int y)voidmouseEntered(java.awt.event.MouseEvent e)private voidmouseExited(long time, int x, int y)voidmouseExited(java.awt.event.MouseEvent e)private voidmouseMoved(long time, int x, int y, int modifiers)voidmouseMoved(java.awt.event.MouseEvent e)private voidmousePressed(long time, int x, int y, int modifiers, boolean isPopupTrigger)voidmousePressed(java.awt.event.MouseEvent e)private voidmouseReleased(long time, int x, int y, int modifiers)voidmouseReleased(java.awt.event.MouseEvent e)private voidmouseWheel(long time, int rotation, int modifiers)voidmouseWheelMoved(java.awt.event.MouseWheelEvent e)booleanprocessEvent(int id, int x, int y, int modifiers, long time)voidprocessTwoPointGesture(float[][][] touches)private voidsendKeyBuffer()
-
-
-
Field Detail
-
vwr
private Viewer vwr
-
manager
private javajs.api.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
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clearin interfacejavajs.api.GenericMouseInterface
-
dispose
public void dispose()
- Specified by:
disposein interfacejavajs.api.GenericMouseInterface
-
processEvent
public boolean processEvent(int id, int x, int y, int modifiers, long time)- Specified by:
processEventin interfacejavajs.api.GenericMouseInterface
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressedin interfacejava.awt.event.MouseListener
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMovedin interfacejava.awt.event.MouseMotionListener
-
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
- Specified by:
mouseWheelMovedin interfacejava.awt.event.MouseWheelListener
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent ke)
- Specified by:
keyTypedin interfacejava.awt.event.KeyListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent ke)
- Specified by:
keyPressedin interfacejava.awt.event.KeyListener
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent ke)
- Specified by:
keyReleasedin interfacejava.awt.event.KeyListener
-
clearKeyBuffer
private void clearKeyBuffer()
-
addKeyBuffer
private void addKeyBuffer(char ch)
-
sendKeyBuffer
private void sendKeyBuffer()
-
mouseEntered
private void mouseEntered(long time, int x, int y)
-
mouseExited
private void mouseExited(long time, int x, int y)
-
mouseClicked
private void mouseClicked(long time, int x, int y, int modifiers, int clickCount)- Parameters:
time-x-y-modifiers-clickCount-
-
mouseMoved
private void mouseMoved(long time, int x, int y, int modifiers)
-
mouseWheel
private void mouseWheel(long time, int rotation, int modifiers)
-
mousePressed
private void mousePressed(long time, int x, int y, int modifiers, boolean isPopupTrigger)- Parameters:
time-x-y-modifiers-isPopupTrigger-
-
mouseReleased
private void mouseReleased(long time, int x, int y, int modifiers)
-
mouseDragged
private void mouseDragged(long time, int x, int y)
-
applyLeftMouse
private static int applyLeftMouse(int modifiers)
-
processTwoPointGesture
public void processTwoPointGesture(float[][][] touches)
- Specified by:
processTwoPointGesturein interfacejavajs.api.GenericMouseInterface
-
-