Package net.java.games.input
Class WinTabComponent
java.lang.Object
net.java.games.input.AbstractComponent
net.java.games.input.WinTabComponent
- All Implemented Interfaces:
Component
- Direct Known Subclasses:
WinTabButtonComponent
,WinTabCursorComponent
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.java.games.input.Component
Component.Identifier, Component.POV
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
WinTabComponent
(WinTabContext context, int parentDevice, String name, Component.Identifier id) protected
WinTabComponent
(WinTabContext context, int parentDevice, String name, Component.Identifier id, int min, int max) -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<WinTabButtonComponent>
createButtons
(WinTabContext context, int deviceIndex, int numberOfButtons) static List<WinTabComponent>
createComponents
(WinTabContext context, int parentDevice, int axisId, int[] axisRanges) static Collection<WinTabCursorComponent>
createCursors
(WinTabContext context, int deviceIndex, String[] cursorNames) boolean
isAnalog()
Returns whether or not the axis is analog, or false if it is digital.boolean
Returnstrue
if data returned frompoll
is relative to the last call, orfalse
if data is absolute.protected float
poll()
processPacket
(WinTabPacket packet) Methods inherited from class net.java.games.input.AbstractComponent
getDeadZone, getIdentifier, getName, getPollData, toString
-
Field Details
-
lastKnownValue
protected float lastKnownValue
-
-
Constructor Details
-
WinTabComponent
protected WinTabComponent(WinTabContext context, int parentDevice, String name, Component.Identifier id, int min, int max) -
WinTabComponent
protected WinTabComponent(WinTabContext context, int parentDevice, String name, Component.Identifier id)
-
-
Method Details
-
poll
- Specified by:
poll
in classAbstractComponent
- Throws:
IOException
-
isAnalog
public boolean isAnalog()Description copied from class:AbstractComponent
Returns whether or not the axis is analog, or false if it is digital.- Specified by:
isAnalog
in interfaceComponent
- Overrides:
isAnalog
in classAbstractComponent
- Returns:
- false by default, can be overridden
-
isRelative
public boolean isRelative()Description copied from interface:Component
Returnstrue
if data returned frompoll
is relative to the last call, orfalse
if data is absolute. -
createComponents
public static List<WinTabComponent> createComponents(WinTabContext context, int parentDevice, int axisId, int[] axisRanges) -
createButtons
public static Collection<WinTabButtonComponent> createButtons(WinTabContext context, int deviceIndex, int numberOfButtons) -
processPacket
-
createCursors
public static Collection<WinTabCursorComponent> createCursors(WinTabContext context, int deviceIndex, String[] cursorNames)
-