Top Description Constructors Methods
org.lwjgl.util.input

public Class ControllerAdapter

extends Object
implements Controller
Class Inheritance
All Implemented Interfaces
org.lwjgl.input.Controller
Imports
org.lwjgl.input.Controller

Adapter for the Controller interface. It can be used as placeholder Controller, which doesn't do anything (eg if Controllers.create() fails and you don't want to take care of that).
Author
Onyx, Aho and all the other aliases...

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The number of axes available on this controller.
getAxisCount
()

Implements org.lwjgl.input.Controller.getAxisCount.

Retrieve the number of axes available on this controller.
public String

Returns:

The name of the specified axis.
getAxisName
(int
The index of the axis whose name should be retrieved
index
)

Implements org.lwjgl.input.Controller.getAxisName.

Get the name that's given to the specified axis
public float

Returns:

The value from the specified axis.
getAxisValue
(int
The index of axis to be read
index
)

Implements org.lwjgl.input.Controller.getAxisValue.

Retrieve the value thats currently available on a specified axis.
public int

Returns:

The number of butotns available on this controller
getButtonCount
()

Implements org.lwjgl.input.Controller.getButtonCount.

Retrieve the number of buttons available on this controller
public String

Returns:

The name of the button requested
getButtonName
(int
The index of the button whose name should be retrieved
index
)

Implements org.lwjgl.input.Controller.getButtonName.

Get the name of the specified button.
public float

Returns:

The dead zone for the specified axis
getDeadZone
(int
The index of the axis for which to retrieve the dead zone
index
)

Implements org.lwjgl.input.Controller.getDeadZone.

Get the dead zone for a specified axis
public int

Returns:

The index of this controller in the collection
getIndex
()

Implements org.lwjgl.input.Controller.getIndex.

Get the index of this controller in the collection
public String

Returns:

The name assigned to this controller
getName
()

Implements org.lwjgl.input.Controller.getName.

Get the name assigned to this controller.
public float

Returns:

The X-Axis value of the POV on this controller
getPovX
()

Implements org.lwjgl.input.Controller.getPovX.

Get the X-Axis value of the POV on this controller
public float

Returns:

The Y-Axis value of the POV on this controller
getPovY
()

Implements org.lwjgl.input.Controller.getPovY.

Get the Y-Axis value of the POV on this controller
public int
getRumblerCount()

Implements org.lwjgl.input.Controller.getRumblerCount.

Returns the number of rumblers this controller supports
public String
getRumblerName(int
The rumbler index
index
)

Implements org.lwjgl.input.Controller.getRumblerName.

Returns the name of the specified rumbler
public float

Returns:

The dead zone for the RX axis
getRXAxisDeadZone
()

Implements org.lwjgl.input.Controller.getRXAxisDeadZone.

Get the dead zone for the RX axis.
public float

Returns:

The value from the RX axis
getRXAxisValue
()

Implements org.lwjgl.input.Controller.getRXAxisValue.

Get the value from the RX axis if there is one.
public float

Returns:

The dead zone for the RY axis
getRYAxisDeadZone
()

Implements org.lwjgl.input.Controller.getRYAxisDeadZone.

Get the dead zone for the RY axis.
public float

Returns:

The value from the RY axis
getRYAxisValue
()

Implements org.lwjgl.input.Controller.getRYAxisValue.

Get the value from the RY axis if there is one.
public float

Returns:

The dead zone for the RZ axis
getRZAxisDeadZone
()

Implements org.lwjgl.input.Controller.getRZAxisDeadZone.

Get the dead zone for the RZ axis.
public float

Returns:

The value from the RZ axis
getRZAxisValue
()

Implements org.lwjgl.input.Controller.getRZAxisValue.

Get the value from the RZ axis if there is one.
public float

Returns:

The dead zone for the X axis
getXAxisDeadZone
()

Implements org.lwjgl.input.Controller.getXAxisDeadZone.

Get the dead zone for the X axis.
public float

Returns:

The value from the X axis
getXAxisValue
()

Implements org.lwjgl.input.Controller.getXAxisValue.

Get the value from the X axis if there is one.
public float

Returns:

The dead zone for the Y axis
getYAxisDeadZone
()

Implements org.lwjgl.input.Controller.getYAxisDeadZone.

Get the dead zone for the Y axis.
public float

Returns:

The value from the Y axis
getYAxisValue
()

Implements org.lwjgl.input.Controller.getYAxisValue.

Get the value from the Y axis if there is one.
public float

Returns:

The dead zone for the Z axis
getZAxisDeadZone
()

Implements org.lwjgl.input.Controller.getZAxisDeadZone.

Get the dead zone for the Z axis.
public float

Returns:

The value from the Z axis
getZAxisValue
()

Implements org.lwjgl.input.Controller.getZAxisValue.

Get the value from the Z axis if there is one.
public boolean

Returns:

True if the button is currently pressed
isButtonPressed
(int
The button to check
index
)

Implements org.lwjgl.input.Controller.isButtonPressed.

Check if a button is currently pressed
public void
poll()

Implements org.lwjgl.input.Controller.poll.

Poll the controller for new data.
public void
setDeadZone(int
The index of hte axis for which to set the dead zone
index
,
float
The dead zone to use for the specified axis
zone
)

Implements org.lwjgl.input.Controller.setDeadZone.

Set the dead zone for the specified axis
public void
setRumblerStrength(int
The index of the rumbler
index
,
float
The strength to vibrate at
strength
)

Implements org.lwjgl.input.Controller.setRumblerStrength.

Sets the vibration strength of the specified rumbler
public void
setRXAxisDeadZone(float
The dead zone to use for the RX axis
zone
)

Implements org.lwjgl.input.Controller.setRXAxisDeadZone.

Set the dead zone for the RX axis
public void
setRYAxisDeadZone(float
The dead zone to use for the RY axis
zone
)

Implements org.lwjgl.input.Controller.setRYAxisDeadZone.

Set the dead zone for the RY axis
public void
setRZAxisDeadZone(float
The dead zone to use for the RZ axis
zone
)

Implements org.lwjgl.input.Controller.setRZAxisDeadZone.

Set the dead zone for the RZ axis
public void
setXAxisDeadZone(float
The dead zone to use for the X axis
zone
)

Implements org.lwjgl.input.Controller.setXAxisDeadZone.

Set the dead zone for the X axis
public void
setYAxisDeadZone(float
The dead zone to use for the Y axis
zone
)

Implements org.lwjgl.input.Controller.setYAxisDeadZone.

Set the dead zone for the Y axis
public void
setZAxisDeadZone(float
The dead zone to use for the Z axis
zone
)

Implements org.lwjgl.input.Controller.setZAxisDeadZone.

Set the dead zone for the Z axis
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ControllerAdapterback to summary
public ControllerAdapter()

Method Detail

getAxisCountback to summary
public int getAxisCount()

Implements org.lwjgl.input.Controller.getAxisCount.

Retrieve the number of axes available on this controller.

Returns:int

The number of axes available on this controller.

getAxisNameback to summary
public String getAxisName(int index)

Implements org.lwjgl.input.Controller.getAxisName.

Get the name that's given to the specified axis

Parameters
index:int

The index of the axis whose name should be retrieved

Returns:String

The name of the specified axis.

getAxisValueback to summary
public float getAxisValue(int index)

Implements org.lwjgl.input.Controller.getAxisValue.

Retrieve the value thats currently available on a specified axis. The value will always be between 1.0 and -1.0 and will calibrate as values are passed read. It may be useful to get the player to wiggle the joystick from side to side to get the calibration right.

Parameters
index:int

The index of axis to be read

Returns:float

The value from the specified axis.

getButtonCountback to summary
public int getButtonCount()

Implements org.lwjgl.input.Controller.getButtonCount.

Retrieve the number of buttons available on this controller

Returns:int

The number of butotns available on this controller

getButtonNameback to summary
public String getButtonName(int index)

Implements org.lwjgl.input.Controller.getButtonName.

Get the name of the specified button. Be warned, often this is as exciting as "Button X"

Parameters
index:int

The index of the button whose name should be retrieved

Returns:String

The name of the button requested

getDeadZoneback to summary
public float getDeadZone(int index)

Implements org.lwjgl.input.Controller.getDeadZone.

Get the dead zone for a specified axis

Parameters
index:int

The index of the axis for which to retrieve the dead zone

Returns:float

The dead zone for the specified axis

getIndexback to summary
public int getIndex()

Implements org.lwjgl.input.Controller.getIndex.

Get the index of this controller in the collection

Returns:int

The index of this controller in the collection

getNameback to summary
public String getName()

Implements org.lwjgl.input.Controller.getName.

Get the name assigned to this controller.

Returns:String

The name assigned to this controller

getPovXback to summary
public float getPovX()

Implements org.lwjgl.input.Controller.getPovX.

Get the X-Axis value of the POV on this controller

Returns:float

The X-Axis value of the POV on this controller

getPovYback to summary
public float getPovY()

Implements org.lwjgl.input.Controller.getPovY.

Get the Y-Axis value of the POV on this controller

Returns:float

The Y-Axis value of the POV on this controller

getRumblerCountback to summary
public int getRumblerCount()

Implements org.lwjgl.input.Controller.getRumblerCount.

Doc from org.lwjgl.input.Controller.getRumblerCount.

Returns the number of rumblers this controller supports

getRumblerNameback to summary
public String getRumblerName(int index)

Implements org.lwjgl.input.Controller.getRumblerName.

Doc from org.lwjgl.input.Controller.getRumblerName.

Returns the name of the specified rumbler

Parameters
index:int

The rumbler index

getRXAxisDeadZoneback to summary
public float getRXAxisDeadZone()

Implements org.lwjgl.input.Controller.getRXAxisDeadZone.

Get the dead zone for the RX axis.

Returns:float

The dead zone for the RX axis

getRXAxisValueback to summary
public float getRXAxisValue()

Implements org.lwjgl.input.Controller.getRXAxisValue.

Get the value from the RX axis if there is one. If no RX axis is defined a zero value will be returned.

Returns:float

The value from the RX axis

getRYAxisDeadZoneback to summary
public float getRYAxisDeadZone()

Implements org.lwjgl.input.Controller.getRYAxisDeadZone.

Get the dead zone for the RY axis.

Returns:float

The dead zone for the RY axis

getRYAxisValueback to summary
public float getRYAxisValue()

Implements org.lwjgl.input.Controller.getRYAxisValue.

Get the value from the RY axis if there is one. If no RY axis is defined a zero value will be returned.

Returns:float

The value from the RY axis

getRZAxisDeadZoneback to summary
public float getRZAxisDeadZone()

Implements org.lwjgl.input.Controller.getRZAxisDeadZone.

Get the dead zone for the RZ axis.

Returns:float

The dead zone for the RZ axis

getRZAxisValueback to summary
public float getRZAxisValue()

Implements org.lwjgl.input.Controller.getRZAxisValue.

Get the value from the RZ axis if there is one. If no RZ axis is defined a zero value will be returned.

Returns:float

The value from the RZ axis

getXAxisDeadZoneback to summary
public float getXAxisDeadZone()

Implements org.lwjgl.input.Controller.getXAxisDeadZone.

Get the dead zone for the X axis.

Returns:float

The dead zone for the X axis

getXAxisValueback to summary
public float getXAxisValue()

Implements org.lwjgl.input.Controller.getXAxisValue.

Get the value from the X axis if there is one. If no X axis is defined a zero value will be returned.

Returns:float

The value from the X axis

getYAxisDeadZoneback to summary
public float getYAxisDeadZone()

Implements org.lwjgl.input.Controller.getYAxisDeadZone.

Get the dead zone for the Y axis.

Returns:float

The dead zone for the Y axis

getYAxisValueback to summary
public float getYAxisValue()

Implements org.lwjgl.input.Controller.getYAxisValue.

Get the value from the Y axis if there is one. If no Y axis is defined a zero value will be returned.

Returns:float

The value from the Y axis

getZAxisDeadZoneback to summary
public float getZAxisDeadZone()

Implements org.lwjgl.input.Controller.getZAxisDeadZone.

Get the dead zone for the Z axis.

Returns:float

The dead zone for the Z axis

getZAxisValueback to summary
public float getZAxisValue()

Implements org.lwjgl.input.Controller.getZAxisValue.

Get the value from the Z axis if there is one. If no Z axis is defined a zero value will be returned.

Returns:float

The value from the Z axis

isButtonPressedback to summary
public boolean isButtonPressed(int index)

Implements org.lwjgl.input.Controller.isButtonPressed.

Check if a button is currently pressed

Parameters
index:int

The button to check

Returns:boolean

True if the button is currently pressed

pollback to summary
public void poll()

Implements org.lwjgl.input.Controller.poll.

Poll the controller for new data. This will also update events

setDeadZoneback to summary
public void setDeadZone(int index, float zone)

Implements org.lwjgl.input.Controller.setDeadZone.

Set the dead zone for the specified axis

Parameters
index:int

The index of hte axis for which to set the dead zone

zone:float

The dead zone to use for the specified axis

setRumblerStrengthback to summary
public void setRumblerStrength(int index, float strength)

Implements org.lwjgl.input.Controller.setRumblerStrength.

Doc from org.lwjgl.input.Controller.setRumblerStrength.

Sets the vibration strength of the specified rumbler

Parameters
index:int

The index of the rumbler

strength:float

The strength to vibrate at

setRXAxisDeadZoneback to summary
public void setRXAxisDeadZone(float zone)

Implements org.lwjgl.input.Controller.setRXAxisDeadZone.

Set the dead zone for the RX axis

Parameters
zone:float

The dead zone to use for the RX axis

setRYAxisDeadZoneback to summary
public void setRYAxisDeadZone(float zone)

Implements org.lwjgl.input.Controller.setRYAxisDeadZone.

Set the dead zone for the RY axis

Parameters
zone:float

The dead zone to use for the RY axis

setRZAxisDeadZoneback to summary
public void setRZAxisDeadZone(float zone)

Implements org.lwjgl.input.Controller.setRZAxisDeadZone.

Set the dead zone for the RZ axis

Parameters
zone:float

The dead zone to use for the RZ axis

setXAxisDeadZoneback to summary
public void setXAxisDeadZone(float zone)

Implements org.lwjgl.input.Controller.setXAxisDeadZone.

Set the dead zone for the X axis

Parameters
zone:float

The dead zone to use for the X axis

setYAxisDeadZoneback to summary
public void setYAxisDeadZone(float zone)

Implements org.lwjgl.input.Controller.setYAxisDeadZone.

Set the dead zone for the Y axis

Parameters
zone:float

The dead zone to use for the Y axis

setZAxisDeadZoneback to summary
public void setZAxisDeadZone(float zone)

Implements org.lwjgl.input.Controller.setZAxisDeadZone.

Set the dead zone for the Z axis

Parameters
zone:float

The dead zone to use for the Z axis