|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.keyboard.DefaultKeyStrokeContext
This class implements the most common behavior of a KeyStrokeContext. The add/removeSubContext mechanism allows components to attach their context to another. For example, if the code editor exposes his DefaultKeyStrokeContext instance, addins that are specific to the code editor can add their context and the local accelerators will be used by the code editor. Additionally, they will appear in the code editor configuration panel.
Constructor Summary | |
DefaultKeyStrokeContext()
|
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.ide.keyboard.KeyStrokeContext |
getAllActions |
Constructor Detail |
public DefaultKeyStrokeContext()
Method Detail |
public java.lang.String getName()
KeyStrokeContext
getName
in interface KeyStrokeContext
public java.lang.String getAcceleratorFile()
KeyStrokeContext
getAcceleratorFile
in interface KeyStrokeContext
public final KeyStrokeMap getPresetKeyStrokeMap(java.lang.Object preset, boolean bGlobal)
KeyStrokeContext
getPresetKeyStrokeMap
in interface KeyStrokeContext
preset
- 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 KeyStrokeContext
protected void addGlobalKeyStrokes(KeyStrokeMap map)
addToMap(map, Xxx.YYY_CMD_ID, XxxArb.getAccelerator(XxxArb.YYY_ACCELERATOR))
protected void addLocalKeyStrokes(KeyStrokeMap map)
addGlobalKeyStrokes(oracle.ide.keyboard.KeyStrokeMap)
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, #addLocalKeyStrokes
protected 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
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.