Top Description Fields Constructors Methods
net.java.games.input

pack-priv Class DefaultControllerEnvironment

extends ControllerEnvironment
Class Inheritance
Imports
net.java.games.util.plugins.Plugins, java.io.File, java.util.ArrayList, .Collection, .Iterator, .StringTokenizer, java.util.logging.Logger

The default controller environment.
Author
Michael Martak
Version
%I% %G%

Field Summary

Modifier and TypeField and Description
private ArrayList<Controller>
controllers

List of all controllers in this environment

pack-priv static String
private Collection<String>
private static java.util.logging.Logger
Inherited from net.java.games.input.ControllerEnvironment:
controllerListeners

Constructor Summary

AccessConstructor and Description
public
DefaultControllerEnvironment()

Public no-arg constructor.

Method Summary

Modifier and TypeMethod and Description
private void
addControllers(Controller[] c)

Add the array of controllers to our list of controllers.

public Controller[]
getControllers()

Implements abstract net.java.games.input.ControllerEnvironment.getControllers.

Returns a list of all controllers available to this environment, or an empty array if there are no controllers in this environment.
public boolean
isSupported()

Implements abstract net.java.games.input.ControllerEnvironment.isSupported.

Returns the isSupported status of this environment.
pack-priv static void
loadLibrary(final String lib_name)

Static utility method for loading native libraries.

private Void
private void
Inherited from net.java.games.input.ControllerEnvironment:
addControllerListenerfireControllerAddedfireControllerRemovedgetDefaultEnvironmentlogremoveControllerListener

Field Detail

controllersback to summary
private ArrayList<Controller> controllers

List of all controllers in this environment

libPathback to summary
pack-priv static String libPath
loadedPluginNamesback to summary
private Collection<String> loadedPluginNames
logback to summary
private static java.util.logging.Logger log

Constructor Detail

DefaultControllerEnvironmentback to summary
public DefaultControllerEnvironment()

Public no-arg constructor.

Method Detail

addControllersback to summary
private void addControllers(Controller[] c)

Add the array of controllers to our list of controllers.

getControllersback to summary
public Controller[] getControllers()

Implements abstract net.java.games.input.ControllerEnvironment.getControllers.

Returns a list of all controllers available to this environment, or an empty array if there are no controllers in this environment.

isSupportedback to summary
public boolean isSupported()

Implements abstract net.java.games.input.ControllerEnvironment.isSupported.

Doc from net.java.games.input.ControllerEnvironment.isSupported.

Returns the isSupported status of this environment. What makes an environment supported or not is up to the particular plugin, but may include OS or available hardware.

loadLibraryback to summary
pack-priv static void loadLibrary(final String lib_name)

Static utility method for loading native libraries. It will try to load from either the path given by the net.java.games.input.librarypath property or through System.loadLibrary().

scanControllersback to summary
private Void scanControllers()
scanControllersAtback to summary
private void scanControllersAt(String path)