oracle.ide.keyboard
Class XMLKeyStrokeContext
java.lang.Object
|
+--oracle.ide.keyboard.XMLKeyStrokeContext
- All Implemented Interfaces:
- KeyStrokeContext
- Direct Known Subclasses:
- IdeKeyStrokes
- public abstract class XMLKeyStrokeContext
- extends java.lang.Object
- implements KeyStrokeContext
Method Summary |
abstract java.util.Set |
getAllActions(boolean bGlobal)
Returns a Set of actions valid for the context. |
java.util.List |
getAllPresets()
This method is called to get a list of the predefined mappings. |
KeyStrokesConstraint |
getKeyStrokeConstraint()
Key constraints are used in the configuration panel to limit the user in
the customization of the shortcuts. |
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 |
XMLKeyStrokeContext
public XMLKeyStrokeContext(java.lang.String sName)
getName
public java.lang.String getName()
- Description copied from interface:
KeyStrokeContext
- Get the name of this context as it will appear in the shortcut
configuration panel.
- Specified by:
getName
in interface KeyStrokeContext
- Following copied from interface:
oracle.ide.keyboard.KeyStrokeContext
- Returns:
- The context name
getAllActions
public abstract java.util.Set getAllActions(boolean bGlobal)
- Description copied from interface:
KeyStrokeContext
- Returns a Set of actions valid for the context.
If bGlobal is true, return the actions that are valid event when the focus
is not on the window (ex: Debugger.stepInto).
If bGlobal is false, return actions that are only valid on the focused
window (ex: Debugger.setBreakpoint should only be valid in the editor).
- Specified by:
getAllActions
in interface KeyStrokeContext
- Following copied from interface:
oracle.ide.keyboard.KeyStrokeContext
- Returns:
- a Set of javax.swing.Action (note: IdeAction extends Action)
getPresetKeyStrokeMap
public KeyStrokeMap getPresetKeyStrokeMap(java.lang.Object preset,
boolean bGlobal)
- Description copied from interface:
KeyStrokeContext
- Returns the mapping between KeyStrokes and Actions. If bGlobal is true,
you must return mappings that are allways valid, if it is false, return
the mappings that are only valid when your window or a child has the focus.
- Specified by:
getPresetKeyStrokeMap
in interface KeyStrokeContext
- Following copied from interface:
oracle.ide.keyboard.KeyStrokeContext
- Parameters:
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.
getAllPresets
public java.util.List getAllPresets()
- Description copied from interface:
KeyStrokeContext
- This method is called to get a list of the predefined mappings.
The values in the list should be one of the PC_ constants.
- Specified by:
getAllPresets
in interface KeyStrokeContext
- Following copied from interface:
oracle.ide.keyboard.KeyStrokeContext
- Returns:
- a List of objects describing the presets or null to indicate you
only have one mapping.
getKeyStrokeConstraint
public KeyStrokesConstraint getKeyStrokeConstraint()
- Description copied from interface:
KeyStrokeContext
- Key constraints are used in the configuration panel to limit the user in
the customization of the shortcuts. For example, a text editor would not
allow "Shift+A" to be a shortcut while "S" would be valid for the UI editor
- Specified by:
getKeyStrokeConstraint
in interface KeyStrokeContext
- Following copied from interface:
oracle.ide.keyboard.KeyStrokeContext
- Returns:
- constraints for local context.