Class Mouse

java.lang.Object
org.jmol.awtjs2d.Mouse
All Implemented Interfaces:
GenericMouseInterface

public class Mouse extends Object implements GenericMouseInterface
JavaScript interface from JmolJSmol.js via handleOldJvm10Event (for now)
  • Field Details

    • 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 Details

    • Mouse

      public Mouse(double privateKey, Viewer vwr, Object display)
      Parameters:
      privateKey - -- not used in JavaScript
      vwr -
      display -
  • Method Details

    • clear

      public void clear()
      Specified by:
      clear in interface GenericMouseInterface
    • dispose

      public void dispose()
      Specified by:
      dispose in interface GenericMouseInterface
    • processEvent

      public boolean processEvent(int id, int x, int y, int modifiers, long time)
      Specified by:
      processEvent in interface GenericMouseInterface
    • processTwoPointGesture

      public void processTwoPointGesture(float[][][] touches)
      called by JSmol as processTwoPointGesture(canvas.touches);
      Specified by:
      processTwoPointGesture in interface GenericMouseInterface
      Parameters:
      touches - [[finger1 touches],[finger2 touches]] where finger touches are [[x0,y0],[x1,y1],[x2,y2],...]
    • mouseClicked

      public void mouseClicked(MouseEvent e)
    • mouseEntered

      public void mouseEntered(MouseEvent e)
    • mouseExited

      public void mouseExited(MouseEvent e)
    • mousePressed

      public void mousePressed(MouseEvent e)
    • mouseReleased

      public void mouseReleased(MouseEvent e)
    • mouseDragged

      public void mouseDragged(MouseEvent e)
    • mouseMoved

      public void mouseMoved(MouseEvent e)
    • mouseWheelMoved

      public void mouseWheelMoved(MouseWheelEvent e)
    • keyTyped

      public void keyTyped(KeyEvent ke)
    • keyPressed

      public void keyPressed(KeyEvent ke)
    • keyReleased

      public void keyReleased(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)
    • processKeyEvent

      public void processKeyEvent(Object event)
      Specified by:
      processKeyEvent in interface GenericMouseInterface