InputMap
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | KeyboardManager.
This class is used to create keys for a hashtable which looks up topContainers based on component, keystroke pairs This is used to make unregistering KeyStrokes fast |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Hashtable | componentKeyStrokeMap
Maps component/keystroke pairs to a topLevel container This is mainly used for fast unregister operations |
| pack-priv Hashtable | containerMap
maps top-level containers to a sub-hashtable full of keystrokes |
| pack-priv static KeyboardManager |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public boolean | fireKeyboardAction(KeyEvent e, boolean pressed, Container topAncestor)
This method is called when the focused component (and none of its ancestors) want the key event. |
| public static KeyboardManager | |
| private static Container | |
| public void | registerKeyStroke(KeyStroke k, JComponent c)
register keystrokes here which are for the WHEN_IN_FOCUSED_WINDOW case. |
| public void | |
| protected Hashtable | |
| public static void | |
| public void | |
| public void |
| componentKeyStrokeMap | back to summary |
|---|---|
| pack-priv Hashtable<KeyboardManager. Maps component/keystroke pairs to a topLevel container This is mainly used for fast unregister operations | |
| containerMap | back to summary |
|---|---|
| pack-priv Hashtable<Container, Hashtable<Object, Object>> containerMap maps top-level containers to a sub-hashtable full of keystrokes | |
| currentManager | back to summary |
|---|---|
| pack-priv static KeyboardManager currentManager | |
| KeyboardManager | back to summary |
|---|---|
| pack-priv KeyboardManager() | |
| fireBinding | back to summary |
|---|---|
| pack-priv void fireBinding(JComponent c, KeyStroke ks, KeyEvent e, boolean pressed) | |
| fireKeyboardAction | back to summary |
|---|---|
| public boolean fireKeyboardAction(KeyEvent e, boolean pressed, Container topAncestor) This method is called when the focused component (and none of its ancestors) want the key event. This will look up the keystroke to see if any children (or subchildren) of the specified container want a crack at the event. If one of them wants it, then it will "DO-THE-RIGHT-THING"
| |
| getCurrentManager | back to summary |
|---|---|
| public static KeyboardManager getCurrentManager() | |
| getTopAncestor | back to summary |
|---|---|
| private static Container getTopAncestor(JComponent c) Find the top focusable Window, or InternalFrame | |
| registerKeyStroke | back to summary |
|---|---|
| public void registerKeyStroke(KeyStroke k, JComponent c) register keystrokes here which are for the WHEN_IN_FOCUSED_WINDOW case. Other types of keystrokes will be handled by walking the hierarchy That simplifies some potentially hairy stuff. | |
| registerMenuBar | back to summary |
|---|---|
| public void registerMenuBar(JMenuBar mb) | |
| registerNewTopContainer | back to summary |
|---|---|
| protected Hashtable | |
| setCurrentManager | back to summary |
|---|---|
| public static void setCurrentManager(KeyboardManager km) | |
| unregisterKeyStroke | back to summary |
|---|---|
| public void unregisterKeyStroke(KeyStroke ks, JComponent c) | |
| unregisterMenuBar | back to summary |
|---|---|
| public void unregisterMenuBar(JMenuBar mb) | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public int |
| component | back to summary |
|---|---|
| pack-priv Object component | |
| keyStroke | back to summary |
|---|---|
| pack-priv Object keyStroke | |
| ComponentKeyStrokePair | back to summary |
|---|---|
| public ComponentKeyStrokePair(Object comp, Object key) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |