Top Description Fields Constructors Methods
net.java.games.input

public abstract Class Mouse

extends AbstractController
Class Inheritance

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.

Field Summary

Inherited from net.java.games.input.AbstractController:
EVENT_QUEUE_DEPTH

Constructor Summary

AccessConstructor and Description
protected
Mouse(String name, Component[] components, Controller[] children, Rumbler[] rumblers)

Method Summary

Modifier and TypeMethod and Description
public Component
getBack()

Returns the back mouse button, null if the mouse hasn't got one.

public Component
getButton3()

Returns forth mouse button, null if the mouse hasn't got one.

public Component
getButton4()

Returns fifth mouse button, null if the mouse hasn't got one.

public Component
getExtra()

Returns the extra or 5th mouse button, null if the mouse has fewer than 5 buttons.

public Component
getForward()

Returns the forward mouse button, null if the mouse hasn't got one.

public Component
getLeft()

Returns the left mouse button.

public Component
getMiddle()

Returns the middle, null if the mouse has fewer than three buttons.

public Component
getPrimaryButton()

Returns the left or primary mouse button, never null.

public Component
getRight()

Returns the right, null if the mouse is a single-button mouse.

public Component
getSecondaryButton()

Returns the right or secondary mouse button, null if the mouse is a single-button mouse.

public Component
getSide()

Returns the side or 4th mouse button, null if the mouse has fewer than 4 buttons.

public Component
getTertiaryButton()

Returns the middle or tertiary mouse button, null if the mouse has fewer than three buttons.

public Controller.Type
getType()

Overrides net.java.games.input.AbstractController.getType.

Implements net.java.games.input.Controller.getType.

Returns the type of the Controller.
public Component
getWheel()

Returns the mouse wheel, or null if no mouse wheel is present.

public Component
getX()

Returns the x-axis for the mouse ball, never null.

public Component
getY()

Returns the y-axis for the mouse ball, never null.

Inherited from net.java.games.input.AbstractController:
getComponentgetComponentsgetControllersgetEventQueuegetNamegetNextDeviceEventgetPortNumbergetPortTypegetRumblerspollpollDevicesetDeviceEventQueueSizesetEventQueueSizetoString

Constructor Detail

Mouseback to summary
protected Mouse(String name, Component[] components, Controller[] children, Rumbler[] rumblers)

Method Detail

getBackback to summary
public Component getBack()

Returns the back mouse button, null if the mouse hasn't got one.

getButton3back to summary
public Component getButton3()

Returns forth mouse button, null if the mouse hasn't got one.

getButton4back to summary
public Component getButton4()

Returns fifth mouse button, null if the mouse hasn't got one.

getExtraback to summary
public Component getExtra()

Returns the extra or 5th mouse button, null if the mouse has fewer than 5 buttons.

getForwardback to summary
public Component getForward()

Returns the forward mouse button, null if the mouse hasn't got one.

getLeftback to summary
public Component getLeft()

Returns the left mouse button.

getMiddleback to summary
public Component getMiddle()

Returns the middle, null if the mouse has fewer than three buttons.

getPrimaryButtonback to summary
public Component getPrimaryButton()

Returns the left or primary mouse button, never null.

getRightback to summary
public Component getRight()

Returns the right, null if the mouse is a single-button mouse.

getSecondaryButtonback to summary
public Component getSecondaryButton()

Returns the right or secondary mouse button, null if the mouse is a single-button mouse.

getSideback to summary
public Component getSide()

Returns the side or 4th mouse button, null if the mouse has fewer than 4 buttons.

getTertiaryButtonback to summary
public Component getTertiaryButton()

Returns the middle or tertiary mouse button, null if the mouse has fewer than three buttons.

getTypeback to summary
public Controller.Type getType()

Overrides net.java.games.input.AbstractController.getType.

Implements net.java.games.input.Controller.getType.

Returns the type of the Controller.

getWheelback to summary
public Component getWheel()

Returns the mouse wheel, or null if no mouse wheel is present.

getXback to summary
public Component getX()

Returns the x-axis for the mouse ball, never null.

getYback to summary
public Component getY()

Returns the y-axis for the mouse ball, never null.