Game Control Plus  1.2.2
 All Classes Namespaces Functions Variables Pages
net.java.games.input.AbstractComponent Class Referenceabstract
Inheritance diagram for net.java.games.input.AbstractComponent:

Public Member Functions

Identifier getIdentifier ()
 
boolean isAnalog ()
 
float getDeadZone ()
 
final float getPollData ()
 
final float getEventValue ()
 
final void setEventValue (float event_value)
 
String getName ()
 
String toString ()
 
- Public Member Functions inherited from net.java.games.input.Component
abstract boolean isRelative ()
 

Protected Member Functions

 AbstractComponent (String name, Identifier id)
 
abstract float poll () throws IOException
 

Package Functions

final void setPollData (float value)
 

Private Attributes

final String name
 
final Identifier id
 
float value
 
float event_value
 

Detailed Description

Skeleton implementation of a named axis.

Constructor & Destructor Documentation

net.java.games.input.AbstractComponent.AbstractComponent ( String  name,
Identifier  id 
)
protected

Protected constructor

Parameters
nameA name for the axis

Member Function Documentation

float net.java.games.input.AbstractComponent.getDeadZone ( )
virtual

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.

Returns
0.0f by default, can be overridden

Implements net.java.games.input.Component.

Reimplemented in net.java.games.input.LinuxComponent, and net.java.games.input.DIComponent.

Identifier net.java.games.input.AbstractComponent.getIdentifier ( )
virtual

Returns the type or identifier of the axis.

Implements net.java.games.input.Component.

String net.java.games.input.AbstractComponent.getName ( )
virtual

Returns a human-readable name for this axis.

Implements net.java.games.input.Component.

final float net.java.games.input.AbstractComponent.getPollData ( )
virtual

Returns the data from the last time the control has been polled. If this axis is a button, the value returned will be either 0.0f or 1.0f. If this axis is normalized, the value returned will be between -1.0f and 1.0f.

Returns
0.0f by default, can be overridden

Implements net.java.games.input.Component.

boolean net.java.games.input.AbstractComponent.isAnalog ( )
virtual
String net.java.games.input.AbstractComponent.toString ( )

Returns a non-localized string description of this axis.

Member Data Documentation

final String net.java.games.input.AbstractComponent.name
private

Human-readable name for this Axis