net.java.games.input
Class Mouse

java.lang.Object
  extended by net.java.games.input.AbstractController
      extended by net.java.games.input.Mouse
All Implemented Interfaces:
Controller

public abstract class Mouse
extends AbstractController

A Mouse is a type of controller consisting of two child controllers, a ball and a button pad. This includes devices such as touch pads, trackballs, and fingersticks.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.java.games.input.Controller
Controller.PortType, Controller.Type
 
Constructor Summary
protected Mouse(java.lang.String name, Component[] components, Controller[] children, Rumbler[] rumblers)
           
 
Method Summary
 Component getBack()
          Returns the back mouse button, null if the mouse hasn't got one.
 Component getExtra()
          Returns the extra or 5th mouse button, null if the mouse has fewer than 5 buttons.
 Component getForward()
          Returns the forward mouse button, null if the mouse hasn't got one.
 Component getLeft()
          Returns the left or primary mouse button, never null.
 Component getMiddle()
          Returns the middle or tertiary mouse button, null if the mouse has fewer than three buttons.
 Component getRight()
          Returns the right or secondary mouse button, null if the mouse is a single-button mouse.
 Component getSide()
          Returns the side or 4th mouse button, null if the mouse has fewer than 4 buttons.
 Controller.Type getType()
          Returns the type of the Controller.
 Component getWheel()
          Returns the mouse wheel, or null if no mouse wheel is present.
 Component getX()
          Returns the x-axis for the mouse ball, never null.
 Component getY()
          Returns the y-axis for the mouse ball, never null.
 
Methods inherited from class net.java.games.input.AbstractController
getComponent, getComponents, getControllers, getEventQueue, getName, getNextDeviceEvent, getPortNumber, getPortType, getRumblers, poll, pollDevice, setDeviceEventQueueSize, setEventQueueSize, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Mouse

protected Mouse(java.lang.String name,
                Component[] components,
                Controller[] children,
                Rumbler[] rumblers)
Method Detail

getType

public Controller.Type getType()
Returns the type of the Controller.

Specified by:
getType in interface Controller
Overrides:
getType in class AbstractController

getX

public Component getX()
Returns the x-axis for the mouse ball, never null.


getY

public Component getY()
Returns the y-axis for the mouse ball, never null.


getWheel

public Component getWheel()
Returns the mouse wheel, or null if no mouse wheel is present.


getLeft

public Component getLeft()
Returns the left or primary mouse button, never null.


getRight

public Component getRight()
Returns the right or secondary mouse button, null if the mouse is a single-button mouse.


getMiddle

public Component getMiddle()
Returns the middle or tertiary mouse button, null if the mouse has fewer than three buttons.


getSide

public Component getSide()
Returns the side or 4th mouse button, null if the mouse has fewer than 4 buttons.


getExtra

public Component getExtra()
Returns the extra or 5th mouse button, null if the mouse has fewer than 5 buttons.


getForward

public Component getForward()
Returns the forward mouse button, null if the mouse hasn't got one.


getBack

public Component getBack()
Returns the back mouse button, null if the mouse hasn't got one.