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
public class WinTabComponent extends AbstractComponent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.java.games.input.Component
Component.Identifier, Component.POV
-
-
Field Summary
Fields Modifier and Type Field Description protected float
lastKnownValue
-
Constructor Summary
Constructors Modifier Constructor Description protected
WinTabComponent(WinTabContext context, int parentDevice, java.lang.String name, Component.Identifier id)
protected
WinTabComponent(WinTabContext context, int parentDevice, java.lang.String name, Component.Identifier id, int min, int max)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Collection<WinTabButtonComponent>
createButtons(WinTabContext context, int deviceIndex, int numberOfButtons)
static java.util.List<WinTabComponent>
createComponents(WinTabContext context, int parentDevice, int axisId, int[] axisRanges)
static java.util.Collection<WinTabCursorComponent>
createCursors(WinTabContext context, int deviceIndex, java.lang.String[] cursorNames)
boolean
isAnalog()
Returns whether or not the axis is analog, or false if it is digital.boolean
isRelative()
Returnstrue
if data returned frompoll
is relative to the last call, orfalse
if data is absolute.protected float
poll()
Event
processPacket(WinTabPacket packet)
-
Methods inherited from class net.java.games.input.AbstractComponent
getDeadZone, getIdentifier, getName, getPollData, toString
-
-
-
-
Constructor Detail
-
WinTabComponent
protected WinTabComponent(WinTabContext context, int parentDevice, java.lang.String name, Component.Identifier id, int min, int max)
-
WinTabComponent
protected WinTabComponent(WinTabContext context, int parentDevice, java.lang.String name, Component.Identifier id)
-
-
Method Detail
-
poll
protected float poll() throws java.io.IOException
- Specified by:
poll
in classAbstractComponent
- Throws:
java.io.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 java.util.List<WinTabComponent> createComponents(WinTabContext context, int parentDevice, int axisId, int[] axisRanges)
-
createButtons
public static java.util.Collection<WinTabButtonComponent> createButtons(WinTabContext context, int deviceIndex, int numberOfButtons)
-
processPacket
public Event processPacket(WinTabPacket packet)
-
createCursors
public static java.util.Collection<WinTabCursorComponent> createCursors(WinTabContext context, int deviceIndex, java.lang.String[] cursorNames)
-
-