Class NamedHotKeyConfigurer

java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.NamedHotKeyConfigurer
All Implemented Interfaces:
KeyListener, EventListener

public class NamedHotKeyConfigurer
extends Configurer
implements KeyListener
A Configurer for NamedKeyStroke values
  • Constructor Details

  • Method Details

    • setValue

      public void setValue​(Object o)
      Description copied from class: Configurer
      Set the Object value
      Overrides:
      setValue in class Configurer
    • keyToString

      public String keyToString()
    • getValue

      public Object getValue()
      Description copied from class: Configurer
      The Object value May be null if the Object has not been initialized
      Overrides:
      getValue in class Configurer
    • getValueString

      public String getValueString()
      Specified by:
      getValueString in class Configurer
      Returns:
      a String representation of the Object value
    • getValueNamedKeyStroke

      public NamedKeyStroke getValueNamedKeyStroke()
    • setValue

      public void setValue​(String s)
      Description copied from class: Configurer
      Set the Object value from a String
      Specified by:
      setValue in class Configurer
    • setEnabled

      public void setEnabled​(boolean b)
    • getControls

      public Component getControls()
      Description copied from class: Configurer
      GUI interface for setting the option in an editing window
      Specified by:
      getControls in class Configurer
    • updateVisibility

      protected void updateVisibility()
    • isNamed

      public boolean isNamed()
    • keyTyped

      public void keyTyped​(KeyEvent e)
      Specified by:
      keyTyped in interface KeyListener
    • keyPressed

      public void keyPressed​(KeyEvent e)
      Specified by:
      keyPressed in interface KeyListener
    • keyReleased

      public void keyReleased​(KeyEvent e)
      Specified by:
      keyReleased in interface KeyListener
    • isPrintableAscii

      protected boolean isPrintableAscii​(char c)
    • isPrintableAscii

      protected boolean isPrintableAscii​(int i)
    • getString

      public static String getString​(NamedKeyStroke k)
      A plain text representation of a KeyStroke. Doesn't differ much from KeyEvent.getKeyText(int)
    • getFancyString

      public static String getFancyString​(NamedKeyStroke k)
    • getString

      public static String getString​(KeyStroke k)
    • decode

      public static NamedKeyStroke decode​(String s)
      Decode a String into a NamedKeyStroke
    • encode

      public static String encode​(NamedKeyStroke stroke)
      Encode a NamedKeyStroke into a String