public final class InputMapUtils extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
InputMapUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addCtrlEnterAction(javax.swing.JComponent c,
javax.swing.Action a)
Add an action activated with Ctrl+Enter key on a component.
|
static void |
addEnterAction(javax.swing.JComponent c,
javax.swing.Action a)
Add an action activated with Enter key on a component.
|
private static void |
addEnterAction(javax.swing.JComponent c,
javax.swing.Action a,
int condition) |
static void |
addEnterActionWhenAncestor(javax.swing.JComponent c,
javax.swing.Action a)
Add an action activated with Enter key on a component or its children.
|
static void |
addEscapeAction(javax.swing.JComponent c,
javax.swing.Action a)
Add an action activated with ESCAPE key on a component or its children.
|
static void |
addSpacebarAction(javax.swing.JComponent c,
javax.swing.Action a)
Add an action activated with Spacebar key on a component.
|
static void |
enableEnter(javax.swing.JButton b)
Enable activating button on Enter (which is replaced with spacebar for certain Look-And-Feels).
|
static void |
unassignCtrlShiftUpDown(javax.swing.JComponent cmp,
int condition)
Unassign Ctrl-Shift/Alt-Shift Up/Down from the given component
to allow global JOSM shortcuts to work in this component.
|
static void |
unassignPageUpDown(javax.swing.JComponent cmp,
int condition)
Unassign PageUp/PageDown from the given component
to allow global JOSM shortcuts to work in this component.
|
private InputMapUtils()
public static void unassignCtrlShiftUpDown(javax.swing.JComponent cmp, int condition)
cmp - The Swing componentcondition - one of the following values:
public static void unassignPageUpDown(javax.swing.JComponent cmp, int condition)
cmp - The Swing componentcondition - one of the following values:
public static void enableEnter(javax.swing.JButton b)
b - Buttonpublic static void addEnterAction(javax.swing.JComponent c, javax.swing.Action a)
c - The Swing componenta - action activated with Enter keyJComponent.WHEN_FOCUSEDpublic static void addEnterActionWhenAncestor(javax.swing.JComponent c, javax.swing.Action a)
c - The Swing componenta - action activated with Enter keyJComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENTprivate static void addEnterAction(javax.swing.JComponent c, javax.swing.Action a, int condition)
public static void addSpacebarAction(javax.swing.JComponent c, javax.swing.Action a)
c - The Swing componenta - action activated with Spacebar keypublic static void addEscapeAction(javax.swing.JComponent c, javax.swing.Action a)
c - The Swing componenta - action activated with ESCAPE keyJComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENTpublic static void addCtrlEnterAction(javax.swing.JComponent c, javax.swing.Action a)
c - The Swing componenta - action activated with Ctrl+Enter keyJComponent.WHEN_IN_FOCUSED_WINDOW