Aviatrix3D
2.1.0

org.j3d.renderer.aviatrix3d.device.input.mouse
Class MouseDevice

java.lang.Object
  extended by org.j3d.renderer.aviatrix3d.device.input.mouse.MouseDevice
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, org.j3d.device.input.ControllerDevice, org.j3d.device.input.InputDevice, org.j3d.device.input.TrackerDevice

public class MouseDevice
extends java.lang.Object
implements org.j3d.device.input.TrackerDevice, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener

A mouse device implementation. This mouse is a typical picking and navigation style mouse.

Version:
$Revision: 1.1 $
Author:
Alan Hudson

Field Summary
 
Fields inherited from interface org.j3d.device.input.InputDevice
FUNC_BUTTON_1, FUNC_BUTTON_2, FUNC_BUTTON_3, FUNC_BUTTON_4, FUNC_L1_BUTTON, FUNC_LEFT_HAT, FUNC_LEFT_STICK_X, FUNC_LEFT_STICK_Y, FUNC_LEFT_STICK_Z, FUNC_NAV_X, FUNC_NAV_Y, FUNC_NAV_Y_CENTERED, FUNC_NONE, FUNC_ORIENT_X, FUNC_ORIENT_Y, FUNC_R1_BUTTON, FUNC_RIGHT_STICK_X, FUNC_RIGHT_STICK_Y, FUNC_START_BUTTON, FUNC_THROTTLE, FUNC_VIEWPOINT_NEXT, FUNC_WHEEL_X
 
Constructor Summary
MouseDevice(GraphicsOutputDevice surface, java.lang.String name)
          Construct a new mouse device that interacts with the given surface, and is named.
 
Method Summary
 java.lang.String getName()
          Get the name of this device.
 int getTrackerCount()
          Get a count of the number of trackers this device has.
 org.j3d.device.input.Tracker[] getTrackers()
          Fetch the list of trackers generated by this output device
 void mouseClicked(java.awt.event.MouseEvent evt)
          Process a mouse click event.
 void mouseDragged(java.awt.event.MouseEvent evt)
          Process a mouse drag event
 void mouseEntered(java.awt.event.MouseEvent evt)
          Process a mouse enter event.
 void mouseExited(java.awt.event.MouseEvent evt)
          Process a mouse exited event.
 void mouseMoved(java.awt.event.MouseEvent evt)
          Process a mouse movement event.
 void mousePressed(java.awt.event.MouseEvent evt)
          Process a mouse press event.
 void mouseReleased(java.awt.event.MouseEvent evt)
          Process a mouse release event.
 void mouseWheelMoved(java.awt.event.MouseWheelEvent mwe)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseDevice

public MouseDevice(GraphicsOutputDevice surface,
                   java.lang.String name)
Construct a new mouse device that interacts with the given surface, and is named.

Parameters:
surface - The surface to track
name - The device name string
Method Detail

getName

public java.lang.String getName()
Get the name of this device. Names are of the form class-#. Valid classes are Gamepad, Joystick, Wheel, Midi, GenericHID.

Specified by:
getName in interface org.j3d.device.input.InputDevice
Returns:
The name

getTrackers

public org.j3d.device.input.Tracker[] getTrackers()
Fetch the list of trackers generated by this output device

Specified by:
getTrackers in interface org.j3d.device.input.TrackerDevice

getTrackerCount

public int getTrackerCount()
Get a count of the number of trackers this device has. This cannot change during the life of a device.

Specified by:
getTrackerCount in interface org.j3d.device.input.TrackerDevice

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
Process a mouse press event.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
evt - The event that caused this method to be called

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent evt)
Process a mouse release event.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
evt - The event that caused this method to be called

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent evt)
Process a mouse click event.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
evt - The event that caused this method to be called

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent evt)
Process a mouse enter event.

Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
evt - The event that caused this method to be called

mouseExited

public void mouseExited(java.awt.event.MouseEvent evt)
Process a mouse exited event.

Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
evt - The event that caused this method to be called

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent evt)
Process a mouse drag event

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Parameters:
evt - The event that caused this method to be called

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent evt)
Process a mouse movement event.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Parameters:
evt - The event that caused this method to be called

mouseWheelMoved

public void mouseWheelMoved(java.awt.event.MouseWheelEvent mwe)
Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org