|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents a physical device. A device comprises a number of axes and buttons,
which can be retrieved by the getAxes()
and getButtons()
methods.
Axes and buttons are identified by constants in the AxisId
and ButtonId
classes. It is also possible to obtain
a particular axis or button of a device with the getAxis(AxisId)
and getButton(ButtonId)
methods; these methods simply return null
if the requested axis or button is not available for this device.
Each particular axis or button can be listened for events; it is also possible to listen to the whole device. In the latter case, the listener will receive the events of all axes and buttons of the device. See the following methods:
addListener(IDeviceListener)
#addListener(IAbsoluteAxisListener)
IRelativeAxis.addListener(IRelativeAxisListener)
IButton.addListener(IButtonListener)
Method Summary | |
void |
addListener(IDeviceListener aListener)
Adds a listener that will be notified of all the events occuring on the buttons and axes of this device. |
IAxis[] |
getAxes()
|
IAxis |
getAxis(AxisId aId)
|
IButton |
getButton(ButtonId aId)
|
IButton[] |
getButtons()
|
IDeviceInfo |
getDeviceInfo()
|
void |
removeListener(IDeviceListener aListener)
Removes a previously added listener. |
Method Detail |
public IDeviceInfo getDeviceInfo()
public void addListener(IDeviceListener aListener)
public void removeListener(IDeviceListener aListener)
public IAxis[] getAxes()
public IButton[] getButtons()
public IAxis getAxis(AxisId aId)
public IButton getButton(ButtonId aId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |