cage.input
Class Binding

java.lang.Object
  extended by cage.input.Binding

public class Binding
extends java.lang.Object

Represents a key value and action name pair. The values for keyCode are taken from MinuetoKeyboard. When defining a binding in either a Scene or a Production XML element, the following strings are valid names of a key value. Case matters.

Author:
Seth Marinello

Field Summary
 java.lang.String actionName
          The name of the action to call when this binding is invoked
 int keyCode
          The key value to bind the action name to.
 java.lang.String keyName
          The String the keyCode was parsed from
 
Constructor Summary
Binding()
           
 
Method Summary
 java.lang.String toXML()
          Get an XML representation of this Binding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actionName

public java.lang.String actionName
The name of the action to call when this binding is invoked


keyCode

public int keyCode
The key value to bind the action name to. Used by Cage.input.KeyboardHandler It is initialized to -1 because that is not a valid keyCode and thus will be ignored by KeyboardHandler if a binding is added without being initialized.


keyName

public java.lang.String keyName
The String the keyCode was parsed from

Constructor Detail

Binding

public Binding()
Method Detail

toXML

public java.lang.String toXML()
Get an XML representation of this Binding

Returns:
XML String with the data in this binding.