public abstract class DefaultKeyStrokeContext extends java.lang.Object implements KeyStrokeContext
| Constructor and Description | 
|---|
DefaultKeyStrokeContext()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
addGlobalKeyStrokes(KeyStrokeMap map)
Overwrite this method to define your global keystrokes. 
 | 
protected void | 
addLocalKeyStrokes(KeyStrokeMap map)
Overwrite this method to define your global keystrokes
 The codes is similar to addGlobalKeyStrokes. 
 | 
protected static void | 
addToMap(KeyStrokeMap map,
        int nId,
        javax.swing.KeyStroke ks)
Helper method for filling the KeyStrokeMaps in addGlobal/LocalKeyStrokes. 
 | 
protected static void | 
addToMap(KeyStrokeMap map,
        int nId,
        KeyStrokes kss)
Helper method for filling the KeyStrokeMaps in addGlobal/LocalKeyStrokes. 
 | 
java.lang.String | 
getAcceleratorFile()
If your addin provides predefined accelerator definitions, you should return the name of the .KDF file in your
 jar file. 
 | 
java.util.List | 
getAllPresets()
By default, DefaultKeyStrokeContexts only have a default preset. 
 | 
java.lang.String | 
getName()
Get the name of this context as it will appear in the shortcut
 configuration panel. 
 | 
KeyStrokeMap | 
getPresetKeyStrokeMap(java.lang.Object preset,
                     boolean bGlobal)
Returns the mapping between KeyStrokes and Actions. 
 | 
java.lang.String | 
toString()  | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAllActionspublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
KeyStrokeContextgetName in interface KeyStrokeContextpublic java.lang.String getAcceleratorFile()
KeyStrokeContextgetAcceleratorFile in interface KeyStrokeContextpublic final KeyStrokeMap getPresetKeyStrokeMap(java.lang.Object preset, boolean bGlobal)
KeyStrokeContextgetPresetKeyStrokeMap in interface KeyStrokeContextpreset - corresponds to one of the elements returned by
  getPresetKeyStrokeMaps or null to get the default map.bGlobal - true when asked for the global keys.public final java.util.List getAllPresets()
getAllPresets in interface KeyStrokeContextprotected void addGlobalKeyStrokes(KeyStrokeMap map)
addToMap(map, Xxx.YYY_CMD_ID, XxxArb.getAccelerator(XxxArb.YYY_ACCELERATOR))
protected void addLocalKeyStrokes(KeyStrokeMap map)
protected static void addToMap(KeyStrokeMap map, int nId, javax.swing.KeyStroke ks)
map - the KeyStrokeMap to fill.nId - the command ID.ks - the keystroke associated with the command ID.#addGlobalKeyStrokes, #addLocalKeyStrokesprotected static void addToMap(KeyStrokeMap map, int nId, KeyStrokes kss)
map - the KeyStrokeMap to fill.nId - the command ID.kss - the multi-keystroke associated with the command ID.#addGlobalKeyStrokes, #addLocalKeyStrokes