Class JPanelCamera.StandardMouse

java.lang.Object
java.lang.Thread
gov.nih.mipav.view.renderer.J3D.JPanelCamera.StandardMouse
All Implemented Interfaces:
Runnable
Enclosing class:
JPanelCamera

class JPanelCamera.StandardMouse extends Thread
Class used to send Standard mouse events to the canvas. Must subclass Thread because a single mousePressed event on one of the mouse buttons needs to generate mouseDragged events on the canvas until the mouse is released.
  • Field Details

    • centerX

      int centerX
      Canvas center coordinate.
    • centerY

      int centerY
      Canvas center coordinate.
    • evt

      Mouse event
    • source

      Object source
      Event source
    • when

      long when
      Event time stamp.
    • mod

      int mod
      Mouseevent mask
    • x

      int x
      Canvas center x and y.
    • y

      int y
      Canvas center x and y.
    • id

      int id
      MouseEvent id.
  • Constructor Details

    • StandardMouse

      public StandardMouse(MouseEvent event)
      Creates new thread and sets up mouse event variables appropriately.
      Parameters:
      event - Original mouse event, from button.
  • Method Details

    • run

      public void run()
      Runs the thread. While the button is pressed, dispatches mouse dragged events at a rate consistent with the velocity slider. Once the mouse is released, pressed will be set to false and the loop will stop.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread