com.threerings.opengl.camera
Class MouseOrbiter

java.lang.Object
  extended by com.threerings.opengl.camera.MouseOrbiter
All Implemented Interfaces:
ComponentListener, MouseMotionListener, MouseWheelListener, EventListener

public class MouseOrbiter
extends Object
implements MouseMotionListener, MouseWheelListener, MouseMotionListener, MouseWheelListener

Provides a means of manipulating an OrbitCameraHandler using the mouse.


Constructor Summary
MouseOrbiter(OrbitCameraHandler camhand)
          Creates new mouse orbiter for the specified camera handler.
MouseOrbiter(OrbitCameraHandler camhand, boolean panXY)
          Creates a new mouse orbiter for the specified camera handler.
 
Method Summary
 void addTo(Component comp)
          Adds the orbiter to the specified component.
 void mouseDragged(MouseEvent event)
           
 void mouseDragged(MouseEvent event)
          Dispatched when the mouse is moved after a button having been pressed within the bounds of the target component.
 void mouseMoved(MouseEvent event)
           
 void mouseMoved(MouseEvent event)
          Dispatched when the mouse is moved within the bounds of the target component.
 void mouseWheeled(MouseEvent event)
          Dispatched when the mouse wheel is rotated within the bounds of the target component.
 void mouseWheelMoved(MouseWheelEvent event)
           
 void removeFrom(Component comp)
          Removes the orbiter from the specified component.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseOrbiter

public MouseOrbiter(OrbitCameraHandler camhand)
Creates new mouse orbiter for the specified camera handler.


MouseOrbiter

public MouseOrbiter(OrbitCameraHandler camhand,
                    boolean panXY)
Creates a new mouse orbiter for the specified camera handler.

Parameters:
panXY - if true, limit panning to the XY plane.
Method Detail

addTo

public void addTo(Component comp)
Adds the orbiter to the specified component.


removeFrom

public void removeFrom(Component comp)
Removes the orbiter from the specified component.


mouseDragged

public void mouseDragged(MouseEvent event)

mouseMoved

public void mouseMoved(MouseEvent event)

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent event)

mouseMoved

public void mouseMoved(MouseEvent event)
Description copied from interface: MouseMotionListener
Dispatched when the mouse is moved within the bounds of the target component.

Specified by:
mouseMoved in interface MouseMotionListener

mouseDragged

public void mouseDragged(MouseEvent event)
Description copied from interface: MouseMotionListener
Dispatched when the mouse is moved after a button having been pressed within the bounds of the target component.

Specified by:
mouseDragged in interface MouseMotionListener

mouseWheeled

public void mouseWheeled(MouseEvent event)
Description copied from interface: MouseWheelListener
Dispatched when the mouse wheel is rotated within the bounds of the target component.

Specified by:
mouseWheeled in interface MouseWheelListener


Copyright © 2011. All Rights Reserved.