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 getButton3()
          Returns forth mouse button, null if the mouse hasn't got one.
 Component getButton4()
          Returns fifth 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 mouse button.
 Component getMiddle()
          Returns the middle, null if the mouse has fewer than three buttons.
 Component getPrimaryButton()
          Returns the left or primary mouse button, never null.
 Component getRight()
          Returns the right, null if the mouse is a single-button mouse.
 Component getSecondaryButton()
          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.
 Component getTertiaryButton()
          Returns the middle or tertiary mouse button, null if the mouse has fewer than three 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.


getPrimaryButton

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


getSecondaryButton

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


getTertiaryButton

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


getLeft

public Component getLeft()
Returns the left mouse button.


getRight

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


getMiddle

public Component getMiddle()
Returns the middle, 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.


getButton3

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


getButton4

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