|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.ui.KeyBindingManager
public class KeyBindingManager
Contains Hashtables that are used in the key-binding process along with methods to build them and access their contents. Performs the assigning of keys to actions, checking for and resolving conflicts, and setting appropriate menu accelerators. TODO: fix the design of our key binding scheme. We should be able to bind multiple keys to the same action!
| Nested Class Summary | |
|---|---|
static class |
KeyBindingManager.KeyStrokeData
|
class |
KeyBindingManager.KeyStrokeOptionListener
A listener that can be attached to KeyStrokeOptions that automatically updates the Hashtables in KeyBindingManager, the corresponding selection Action bindings, and the menu accelerators |
| Field Summary | |
|---|---|
static KeyBindingManager |
ONLY
|
| Method Summary | |
|---|---|
void |
addShiftAction(Option<KeyStroke> opt,
Action shiftA)
Assigns the given selection action to the combination of the shift key and the given key stroke option. |
void |
addShiftAction(Option<KeyStroke> opt,
String shiftS)
Assigns the selection action with the given name to the combination of the shift key and the given key stroke option. |
KeyStroke |
addShiftModifier(KeyStroke k)
Takes a KeyStroke and returns a KeyStroke that is the same that has the shift modifier |
Action |
get(KeyStroke ks)
Takes a KeyStroke and gets its Action from the keyToActionMap |
Collection<KeyBindingManager.KeyStrokeData> |
getKeyStrokeData()
|
String |
getName(Action a)
|
String |
getName(KeyStroke ks)
|
void |
put(Option<KeyStroke> kso,
Action a,
JMenuItem jmi,
String name)
|
void |
setActionMap(ActionMap actionMap)
Sets the ActionMap |
void |
setMainFrame(MainFrame mainFrame)
|
void |
setShouldCheckConflict(boolean bool)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final KeyBindingManager ONLY
| Method Detail |
|---|
public void setMainFrame(MainFrame mainFrame)
public void setActionMap(ActionMap actionMap)
actionMap - the ActionMap to set topublic void setShouldCheckConflict(boolean bool)
public Collection<KeyBindingManager.KeyStrokeData> getKeyStrokeData()
public void put(Option<KeyStroke> kso,
Action a,
JMenuItem jmi,
String name)
public Action get(KeyStroke ks)
ks - KeyStroke to look up
public String getName(KeyStroke ks)
public String getName(Action a)
public void addShiftAction(Option<KeyStroke> opt,
String shiftS)
opt - the KeyStroke Option of the ActionshiftS - the name of the Selection Action
public void addShiftAction(Option<KeyStroke> opt,
Action shiftA)
opt - the KeyStroke Option of the ActionshiftA - the Selection Actionpublic KeyStroke addShiftModifier(KeyStroke k)
k - a KeyStroke
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||