VASSAL.configure
Class HotKeyConfigurer

java.lang.Object
  |
  +--VASSAL.configure.Configurer
        |
        +--VASSAL.configure.HotKeyConfigurer
All Implemented Interfaces:
java.util.EventListener, java.awt.event.KeyListener

public class HotKeyConfigurer
extends Configurer
implements java.awt.event.KeyListener

A Configurer for KeyStroke values


Fields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, key, name, NAME_PROPERTY, noUpdate, value
 
Constructor Summary
HotKeyConfigurer(java.lang.String key, java.lang.String name)
           
HotKeyConfigurer(java.lang.String key, java.lang.String name, javax.swing.KeyStroke val)
           
 
Method Summary
static javax.swing.KeyStroke decode(java.lang.String s)
          Decode a String into a KeyStroke
static java.lang.String encode(javax.swing.KeyStroke stroke)
          Encode a KeyStroke into a String
 java.awt.Component getControls()
          GUI interface for setting the option in an editing window
static java.lang.String getString(javax.swing.KeyStroke k)
          A plain text representation of a KeyStroke.
 java.lang.String getValueString()
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 java.lang.String keyToString()
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void setValue(java.lang.Object o)
          Set the Object value
 void setValue(java.lang.String s)
          Set the Object value from a String
 
Methods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getKey, getName, getValue, isFrozen, setFrozen, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HotKeyConfigurer

public HotKeyConfigurer(java.lang.String key,
                        java.lang.String name)

HotKeyConfigurer

public HotKeyConfigurer(java.lang.String key,
                        java.lang.String name,
                        javax.swing.KeyStroke val)
Method Detail

setValue

public void setValue(java.lang.Object o)
Description copied from class: Configurer
Set the Object value
Overrides:
setValue in class Configurer

keyToString

public java.lang.String keyToString()

getValueString

public java.lang.String getValueString()
Overrides:
getValueString in class Configurer
Following copied from class: VASSAL.configure.Configurer
Returns:
a String representation of the Object value

setValue

public void setValue(java.lang.String s)
Description copied from class: Configurer
Set the Object value from a String
Overrides:
setValue in class Configurer

getControls

public java.awt.Component getControls()
Description copied from class: Configurer
GUI interface for setting the option in an editing window
Overrides:
getControls in class Configurer

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

getString

public static java.lang.String getString(javax.swing.KeyStroke k)
A plain text representation of a KeyStroke. Doesn't differ much from KeyEvent.getKeyText(int)

decode

public static javax.swing.KeyStroke decode(java.lang.String s)
Decode a String into a KeyStroke

encode

public static java.lang.String encode(javax.swing.KeyStroke stroke)
Encode a KeyStroke into a String