Package org.openstreetmap.josm.tools
Class InputMapUtils
java.lang.Object
org.openstreetmap.josm.tools.InputMapUtils
Tools to work with Swing InputMap.
- Since:
- 5200
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdd an action activated with Ctrl+Enter key on a component.static voidaddEnterAction(JComponent c, Action a) Add an action activated with Enter key on a component.private static voidaddEnterAction(JComponent c, Action a, int condition) static voidAdd an action activated with Enter key on a component or its children.static voidaddEscapeAction(JComponent c, Action a) Add an action activated with ESCAPE key on a component or its children.static voidAdd an action activated with Spacebar key on a component.static voidEnable activating button on Enter (which is replaced with spacebar for certain Look-And-Feels).static voidunassignCtrlShiftUpDown(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 voidunassignPageUpDown(JComponent cmp, int condition) Unassign PageUp/PageDown from the given component to allow global JOSM shortcuts to work in this component.
-
Constructor Details
-
InputMapUtils
private InputMapUtils()
-
-
Method Details
-
unassignCtrlShiftUpDown
Unassign Ctrl-Shift/Alt-Shift Up/Down from the given component to allow global JOSM shortcuts to work in this component.- Parameters:
cmp- The Swing componentcondition- one of the following values:- JComponent.FOCUS_INPUTMAP_CREATED
- JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
- JComponent.WHEN_IN_FOCUSED_WINDOW
-
unassignPageUpDown
Unassign PageUp/PageDown from the given component to allow global JOSM shortcuts to work in this component.- Parameters:
cmp- The Swing componentcondition- one of the following values:- JComponent.FOCUS_INPUTMAP_CREATED
- JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
- JComponent.WHEN_IN_FOCUSED_WINDOW
- Since:
- 6557
-
enableEnter
Enable activating button on Enter (which is replaced with spacebar for certain Look-And-Feels).- Parameters:
b- Button
-
addEnterAction
Add an action activated with Enter key on a component.- Parameters:
c- The Swing componenta- action activated with Enter key- See Also:
-
addEnterActionWhenAncestor
Add an action activated with Enter key on a component or its children.- Parameters:
c- The Swing componenta- action activated with Enter key- Since:
- 10790
- See Also:
-
addEnterAction
-
addSpacebarAction
Add an action activated with Spacebar key on a component.- Parameters:
c- The Swing componenta- action activated with Spacebar key
-
addEscapeAction
Add an action activated with ESCAPE key on a component or its children.- Parameters:
c- The Swing componenta- action activated with ESCAPE key- Since:
- 10791
- See Also:
-
addCtrlEnterAction
Add an action activated with Ctrl+Enter key on a component.- Parameters:
c- The Swing componenta- action activated with Ctrl+Enter key- See Also:
-