Package VASSAL.configure
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-
Field Summary
Fields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, key, name, NAME_PROPERTY, noUpdate, value -
Constructor Summary
Constructors Constructor Description NamedHotKeyConfigurer(String key, String name)NamedHotKeyConfigurer(String key, String name, NamedKeyStroke val) -
Method Summary
Modifier and Type Method Description static NamedKeyStrokedecode(String s)Decode a String into a NamedKeyStrokestatic Stringencode(NamedKeyStroke stroke)Encode a NamedKeyStroke into a StringComponentgetControls()GUI interface for setting the option in an editing windowstatic StringgetFancyString(NamedKeyStroke k)static StringgetString(KeyStroke k)static StringgetString(NamedKeyStroke k)A plain text representation of a KeyStroke.ObjectgetValue()The Object value May be null if the Object has not been initializedNamedKeyStrokegetValueNamedKeyStroke()StringgetValueString()booleanisNamed()protected booleanisPrintableAscii(char c)protected booleanisPrintableAscii(int i)voidkeyPressed(KeyEvent e)voidkeyReleased(KeyEvent e)StringkeyToString()voidkeyTyped(KeyEvent e)voidsetEnabled(boolean b)voidsetValue(Object o)Set the Object valuevoidsetValue(String s)Set the Object value from a Stringprotected voidupdateVisibility()Methods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getKey, getName, isFrozen, removePropertyChangeListener, setFrozen, setName
-
Constructor Details
-
NamedHotKeyConfigurer
-
NamedHotKeyConfigurer
-
-
Method Details
-
setValue
Description copied from class:ConfigurerSet the Object value- Overrides:
setValuein classConfigurer
-
keyToString
-
getValue
Description copied from class:ConfigurerThe Object value May be null if the Object has not been initialized- Overrides:
getValuein classConfigurer
-
getValueString
- Specified by:
getValueStringin classConfigurer- Returns:
- a String representation of the Object value
-
getValueNamedKeyStroke
-
setValue
Description copied from class:ConfigurerSet the Object value from a String- Specified by:
setValuein classConfigurer
-
setEnabled
public void setEnabled(boolean b) -
getControls
Description copied from class:ConfigurerGUI interface for setting the option in an editing window- Specified by:
getControlsin classConfigurer
-
updateVisibility
protected void updateVisibility() -
isNamed
public boolean isNamed() -
keyTyped
- Specified by:
keyTypedin interfaceKeyListener
-
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-
isPrintableAscii
protected boolean isPrintableAscii(char c) -
isPrintableAscii
protected boolean isPrintableAscii(int i) -
getString
A plain text representation of a KeyStroke. Doesn't differ much fromKeyEvent.getKeyText(int) -
getFancyString
-
getString
-
decode
Decode a String into a NamedKeyStroke -
encode
Encode a NamedKeyStroke into a String
-