public class JoystickCompatibilityMappings
extends java.lang.Object
All mappings MUST be defined before the joystick support has been initialized in the InputManager.
Constructor and Description |
---|
JoystickCompatibilityMappings() |
Modifier and Type | Method and Description |
---|---|
static void |
addJoystickNameRegex(java.lang.String regex,
java.lang.String name)
Maps a regular expression to a normalized name for that joystick.
|
static void |
addMapping(java.lang.String stickName,
java.lang.String sourceComponentId,
java.lang.String remapId)
Adds a single Joystick axis or button remapping based on the
joystick's name and axis/button name.
|
static void |
addMappings(java.util.Properties p)
Adds a preconfigured set of mappings in Properties object
form where the names are dot notation "joystick"."axis/button"
and the values are the remapped component name.
|
static java.util.Map<java.lang.String,java.lang.String> |
getJoystickMappings(java.lang.String joystickName)
Returns a set of Joystick axis/button name remappings if they exist otherwise
it returns an empty map.
|
protected static java.util.Map<java.lang.String,java.lang.String> |
getMappings(java.lang.String joystickName,
boolean create) |
protected static java.lang.String |
getNormalizedName(java.lang.String name) |
protected static void |
loadDefaultMappings()
Loads the default compatibility mappings by looking for
joystick-mapping.properties files on the classpath.
|
static void |
loadMappingProperties(java.net.URL u)
Loads a set of compatibility mappings from the property file
specified by the given URL.
|
protected static void |
loadMappings(java.lang.ClassLoader cl,
java.lang.String path) |
static java.lang.String |
remapComponent(java.lang.String joystickName,
java.lang.String componentId)
Returns the remapped version of the axis/button name if there
is a mapping for it otherwise it returns the original name.
|
protected static java.util.Map<java.lang.String,java.lang.String> getMappings(java.lang.String joystickName, boolean create)
public static java.lang.String remapComponent(java.lang.String joystickName, java.lang.String componentId)
public static java.util.Map<java.lang.String,java.lang.String> getJoystickMappings(java.lang.String joystickName)
public static void addMapping(java.lang.String stickName, java.lang.String sourceComponentId, java.lang.String remapId)
public static void addMappings(java.util.Properties p)
public static void addJoystickNameRegex(java.lang.String regex, java.lang.String name)
protected static java.lang.String getNormalizedName(java.lang.String name)
public static void loadMappingProperties(java.net.URL u) throws java.io.IOException
java.io.IOException
protected static void loadMappings(java.lang.ClassLoader cl, java.lang.String path) throws java.io.IOException
java.io.IOException
protected static void loadDefaultMappings()