uk.ac.essex.keymapper
Class KeyMapManagerImpl

java.lang.Object
  extended by uk.ac.essex.keymapper.KeyMapManagerImpl
All Implemented Interfaces:
KeyMapManager
Direct Known Subclasses:
IAKeyMapManager

public class KeyMapManagerImpl
extends java.lang.Object
implements KeyMapManager


Date: 15-Jul-2002


Field Summary
protected static KeyMapManagerImpl ourInstance
          The singleton instance
 
Fields inherited from interface uk.ac.essex.keymapper.KeyMapManager
DEFAULT_KEY_MAP_NAME
 
Constructor Summary
protected KeyMapManagerImpl()
           
 
Method Summary
static KeyMapManager getInstance()
           
 KeyMap getKeyMap(java.lang.String name)
           
 java.lang.String[] getKeyMapNames()
          Get an array of the key map names that are available
 javax.swing.KeyStroke getKeyStrokeFor(java.lang.String actionId)
          Gets a key stroke for the given identifier, this uses the default key map name 'DEFAULT_KEY_MAP'.
 javax.swing.KeyStroke getKeyStrokeFor(java.lang.String keyMapName, java.lang.String actionId)
          Gets a key stroke for the given identifier
 void loadDirectory(java.io.File directoryToLoadFrom)
          Loads all xml files from the given directory
static void main(java.lang.String[] argStrings)
          For testing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ourInstance

protected static KeyMapManagerImpl ourInstance
The singleton instance

Constructor Detail

KeyMapManagerImpl

protected KeyMapManagerImpl()
Method Detail

getInstance

public static KeyMapManager getInstance()
Returns:
KeyMapManagerImpl - The singleton instance

loadDirectory

public void loadDirectory(java.io.File directoryToLoadFrom)
Loads all xml files from the given directory

Specified by:
loadDirectory in interface KeyMapManager
Parameters:
directoryToLoadFrom -

getKeyStrokeFor

public javax.swing.KeyStroke getKeyStrokeFor(java.lang.String keyMapName,
                                             java.lang.String actionId)
Gets a key stroke for the given identifier

Specified by:
getKeyStrokeFor in interface KeyMapManager
Parameters:
keyMapName - - the name of the key map to use
actionId - - the name of the action whose key stroke to get
Returns:
- The key stroke, or null if one is not defined

getKeyStrokeFor

public javax.swing.KeyStroke getKeyStrokeFor(java.lang.String actionId)
Gets a key stroke for the given identifier, this uses the default key map name 'DEFAULT_KEY_MAP'.

Specified by:
getKeyStrokeFor in interface KeyMapManager
Parameters:
actionId - - the name of the action whose key stroke to get
Returns:
- The key stroke, or null if one is not defined

getKeyMap

public KeyMap getKeyMap(java.lang.String name)
Parameters:
name -
Returns:

getKeyMapNames

public java.lang.String[] getKeyMapNames()
Get an array of the key map names that are available

Specified by:
getKeyMapNames in interface KeyMapManager
Returns:

main

public static void main(java.lang.String[] argStrings)
For testing

Parameters:
argStrings -