Package org.jmol.awt
Class Mouse
- java.lang.Object
-
- org.jmol.awt.Mouse
-
- All Implemented Interfaces:
KeyListener,MouseListener,MouseMotionListener,MouseWheelListener,EventListener,GenericMouseInterface
class Mouse extends Object implements MouseWheelListener, MouseListener, MouseMotionListener, KeyListener, GenericMouseInterface
formerly 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 StringkeyBufferprivate EventManagermanagerprivate intmodifiersDownprivate intmodifiersWhenPressed10private Viewervwrprivate booleanwheelingprivate intxWhenPressedprivate intyWhenPressed
-
Constructor Summary
Constructors Constructor Description Mouse(double privateKey, PlatformViewer vwr, 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)private voidcheckElementSelected(char ch)voidclear()private voidclearKeyBuffer()voiddispose()voidkeyPressed(KeyEvent ke)voidkeyReleased(KeyEvent ke)voidkeyTyped(KeyEvent ke)private voidmouseClicked(long time, int x, int y, int modifiers, int clickCount)voidmouseClicked(MouseEvent e)private voidmouseDragged(long time, int x, int y)voidmouseDragged(MouseEvent e)private voidmouseEntered(long time, int x, int y)voidmouseEntered(MouseEvent e)private voidmouseExited(long time, int x, int y)voidmouseExited(MouseEvent e)private voidmouseMoved(long time, int x, int y, int modifiers)voidmouseMoved(MouseEvent e)private voidmousePressed(long time, int x, int y, int modifiers, boolean isPopupTrigger)voidmousePressed(MouseEvent e)private voidmouseReleased(long time, int x, int y, int modifiers)voidmouseReleased(MouseEvent e)private voidmouseWheel(long time, int rotation, int modifiers)voidmouseWheelMoved(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 EventManager manager
-
keyBuffer
private 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
Mouse(double privateKey, PlatformViewer vwr, Object odisplay)Mouse is the listener for all events.- Parameters:
privateKey-vwr-odisplay-
-
-
Method Detail
-
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
-
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClickedin interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExitedin interfaceMouseListener
-
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mouseWheelMoved
public void mouseWheelMoved(MouseWheelEvent e)
- Specified by:
mouseWheelMovedin interfaceMouseWheelListener
-
keyTyped
public void keyTyped(KeyEvent ke)
- Specified by:
keyTypedin interfaceKeyListener
-
keyPressed
public void keyPressed(KeyEvent ke)
- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
public void keyReleased(KeyEvent ke)
- Specified by:
keyReleasedin interfaceKeyListener
-
clearKeyBuffer
private void clearKeyBuffer()
-
addKeyBuffer
private void addKeyBuffer(char ch)
-
checkElementSelected
private void checkElementSelected(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 interfaceGenericMouseInterface
-
-