net.java.games.input
Class LinuxComponent

java.lang.Object
  extended by net.java.games.input.AbstractComponent
      extended by net.java.games.input.LinuxComponent
All Implemented Interfaces:
Component
Direct Known Subclasses:
LinuxPOV

 class LinuxComponent
extends AbstractComponent

Represents a linux Axis


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.java.games.input.Component
Component.Identifier, Component.POV
 
Constructor Summary
LinuxComponent(LinuxEventComponent component)
           
 
Method Summary
(package private)  float convertValue(float value, LinuxAxisDescriptor descriptor)
           
 LinuxEventComponent getComponent()
           
 float getDeadZone()
          Returns the suggested dead zone for this axis.
 boolean isAnalog()
          Returns whether or not the axis is analog, or false if it is digital.
 boolean isRelative()
          Returns true if data returned from poll is relative to the last call, or false if data is absolute.
protected  float poll()
           
 
Methods inherited from class net.java.games.input.AbstractComponent
getEventValue, getIdentifier, getName, getPollData, resetHasPolled, setEventValue, setPollData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinuxComponent

public LinuxComponent(LinuxEventComponent component)
Method Detail

isRelative

public final boolean isRelative()
Description copied from interface: Component
Returns true if data returned from poll is relative to the last call, or false if data is absolute.


isAnalog

public final 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 interface Component
Overrides:
isAnalog in class AbstractComponent
Returns:
false by default, can be overridden

poll

protected float poll()
              throws java.io.IOException
Specified by:
poll in class AbstractComponent
Throws:
java.io.IOException

convertValue

float convertValue(float value,
                   LinuxAxisDescriptor descriptor)

getDeadZone

public final float getDeadZone()
Description copied from class: AbstractComponent
Returns the suggested dead zone for this axis. Dead zone is the amount polled data can vary before considered a significant change in value. An application can safely ignore changes less than this value in the positive or negative direction.

Specified by:
getDeadZone in interface Component
Overrides:
getDeadZone in class AbstractComponent
Returns:
0.0f by default, can be overridden
See Also:
Component.getPollData()

getComponent

public final LinuxEventComponent getComponent()