Class NewtCameraMouseController

All Implemented Interfaces:
com.jogamp.newt.event.MouseListener, com.jogamp.newt.event.NEWTEventListener, EventListener, ICameraMouseController

public class NewtCameraMouseController extends AbstractCameraController implements com.jogamp.newt.event.MouseListener
  • Field Details

    • prevMouse

      protected Coord2d prevMouse
  • Constructor Details

    • NewtCameraMouseController

      public NewtCameraMouseController()
    • NewtCameraMouseController

      public NewtCameraMouseController(Chart chart)
  • Method Details

    • register

      public void register(Chart chart)
      Overrides:
      register in class AbstractController
    • dispose

      public void dispose()
      Overrides:
      dispose in class AbstractCameraController
    • mousePressed

      public void mousePressed(com.jogamp.newt.event.MouseEvent e)
      Handles toggle between mouse rotation/auto rotation: double-click starts the animated rotation, while simple click stops it.
      Specified by:
      mousePressed in interface com.jogamp.newt.event.MouseListener
    • handleSlaveThread

      public boolean handleSlaveThread(com.jogamp.newt.event.MouseEvent e)
    • mouseDragged

      public void mouseDragged(com.jogamp.newt.event.MouseEvent e)
      Compute shift or rotate
      Specified by:
      mouseDragged in interface com.jogamp.newt.event.MouseListener
    • isLeftDown

      public static boolean isLeftDown(com.jogamp.newt.event.MouseEvent e)
    • isRightDown

      public static boolean isRightDown(com.jogamp.newt.event.MouseEvent e)
    • isDoubleClick

      public static boolean isDoubleClick(com.jogamp.newt.event.MouseEvent e)
    • mouseWheelMoved

      public void mouseWheelMoved(com.jogamp.newt.event.MouseEvent e)
      Compute zoom
      Specified by:
      mouseWheelMoved in interface com.jogamp.newt.event.MouseListener
    • mouseClicked

      public void mouseClicked(com.jogamp.newt.event.MouseEvent e)
      Specified by:
      mouseClicked in interface com.jogamp.newt.event.MouseListener
    • mouseEntered

      public void mouseEntered(com.jogamp.newt.event.MouseEvent e)
      Specified by:
      mouseEntered in interface com.jogamp.newt.event.MouseListener
    • mouseExited

      public void mouseExited(com.jogamp.newt.event.MouseEvent e)
      Specified by:
      mouseExited in interface com.jogamp.newt.event.MouseListener
    • mouseReleased

      public void mouseReleased(com.jogamp.newt.event.MouseEvent e)
      Specified by:
      mouseReleased in interface com.jogamp.newt.event.MouseListener
    • mouseMoved

      public void mouseMoved(com.jogamp.newt.event.MouseEvent e)
      Specified by:
      mouseMoved in interface com.jogamp.newt.event.MouseListener