Package VASSAL.tools
Class NamedKeyManager
java.lang.Object
VASSAL.tools.NamedKeyManager
public class NamedKeyManager extends Object
-
Field Summary
Fields Modifier and Type Field Description protected static NamedKeyManager
instance
protected static int
NAMED_END
protected static int
NAMED_MARKER
protected static int
NAMED_START
protected static int
nextNamedKey
protected static HashMap<String,KeyStroke>
strokes
-
Constructor Summary
Constructors Constructor Description NamedKeyManager()
-
Method Summary
Modifier and Type Method Description static NamedKeyManager
getInstance()
KeyStroke
getKeyStroke(NamedKeyStroke vkey)
Return the generated KeyStroke associated with the NamedKeyStrokestatic KeyStroke
getMarkerKeyStroke()
Return a generic marker KeyStrokeint
getNextStroke()
Return the next KeyStroke from the poolstatic boolean
isNamed(KeyStroke k)
Return true if the supplied KeyStroke is in the range allocated to NamedKeyStrokes
-
Field Details
-
instance
-
NAMED_START
protected static final int NAMED_START- See Also:
- Constant Field Values
-
NAMED_END
protected static final int NAMED_END- See Also:
- Constant Field Values
-
NAMED_MARKER
protected static final int NAMED_MARKER- See Also:
- Constant Field Values
-
nextNamedKey
protected static int nextNamedKey -
strokes
-
-
Constructor Details
-
NamedKeyManager
public NamedKeyManager()
-
-
Method Details
-
getInstance
-
isNamed
Return true if the supplied KeyStroke is in the range allocated to NamedKeyStrokes- Parameters:
k
- KeyStroke- Returns:
- true if this was generated by us
-
getMarkerKeyStroke
Return a generic marker KeyStroke- Returns:
-
getKeyStroke
Return the generated KeyStroke associated with the NamedKeyStroke- Parameters:
vkey
-- Returns:
- generated KeyStroke
-
getNextStroke
public int getNextStroke()Return the next KeyStroke from the pool- Returns:
- KeyStroke Id
-