oracle.ide.keyboard
Class KeyStrokeMap
java.lang.Object
|
+--oracle.ide.keyboard.KeyStrokeMap
- All Implemented Interfaces:
- java.io.Serializable
- public final class KeyStrokeMap
- extends java.lang.Object
- implements java.io.Serializable
The KeyStrokeMap maps Keystrokes to action binding objects.
KeyStrokeMap does not extend a real Map but implements most of the Map
methods.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeyStrokeMap
public KeyStrokeMap()
cloneObject
public KeyStrokeMap cloneObject()
- note: does not clone the listeners
assign
public void assign(KeyStrokeMap source)
- Assing the content of source to this.
put
public void put(KeyStrokes key,
java.lang.Integer bind)
- Add a mapping from an accelerator to a command
- Parameters:
key
- the acceleratorbind
- the IdeAction.getCommandId()
putAll
public void putAll(KeyStrokeMap ksm)
- Add all the mappings in ksm to this map.
remove
public void remove(KeyStrokes key)
- Removes the mapping for this KeyStrokes
keySet
public java.util.Set keySet()
- Returns:
- a Set of KeyStrokes
values
public java.util.Collection values()
- Returns:
- a Collection of all the Integers used in the mappings
getKeyStrokesFor
public java.util.List getKeyStrokesFor(java.lang.Integer bind)
- Finds which KeyStrokes are mapped with the bind value.
- Parameters:
bind
- the IdeAction.getCommandId() value- Returns:
- a Set of KeyStrokes. If no KeyStrokes are bound to this value,
and empty set is returned. The method never returns null
getBindingFor
public java.lang.Integer getBindingFor(KeyStrokes kss)
- Returns:
- the object that binds the keystrokes and the action or null if
no mapping exists
getKeyStrokesStartingWith
public java.util.List getKeyStrokesStartingWith(KeyStrokes kss)
- Returns:
- a List of KeyStrokes. If there is no mapping for this KeyStrokes,
teh method returns an empty list. The method never returns null
getData
public java.util.ArrayList getData()
setData
public void setData(java.util.ArrayList data)
- Parameters:
data
- an ArrayList of Pair(String command, KeyStrokes key)