Package org.openstreetmap.josm.gui.util
Class MultikeyActionsHandler
- java.lang.Object
-
- org.openstreetmap.josm.gui.util.MultikeyActionsHandler
-
public final class MultikeyActionsHandler extends java.lang.Object
Handles the different multikey actions. The possible actions can be selected through a popup menu.- Since:
- 4595
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
MultikeyActionsHandler.MyAction
private class
MultikeyActionsHandler.MyKeyEventDispatcher
private class
MultikeyActionsHandler.MyTimerTask
(package private) static class
MultikeyActionsHandler.ShowLayersPopupWorker
-
Field Summary
Fields Modifier and Type Field Description private static long
DIALOG_DELAY
private static MultikeyActionsHandler
instance
private MultikeyActionsHandler.MyAction
lastAction
private long
lastTimestamp
private java.util.Map<MultikeyShortcutAction,MultikeyActionsHandler.MyAction>
myActions
private static java.lang.String
STATUS_BAR_ID
private java.util.Timer
timer
-
Constructor Summary
Constructors Modifier Constructor Description private
MultikeyActionsHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAction(MultikeyShortcutAction action)
Registers an action and its shortcutprivate static java.lang.String
formatMenuText(javax.swing.KeyStroke keyStroke, java.lang.String index, java.lang.String description)
static MultikeyActionsHandler
getInstance()
Replies the unique instance of this class.void
removeAction(MultikeyShortcutAction action)
Unregisters an action and its shortcut completely
-
-
-
Field Detail
-
DIALOG_DELAY
private static final long DIALOG_DELAY
- See Also:
- Constant Field Values
-
STATUS_BAR_ID
private static final java.lang.String STATUS_BAR_ID
- See Also:
- Constant Field Values
-
myActions
private final java.util.Map<MultikeyShortcutAction,MultikeyActionsHandler.MyAction> myActions
-
lastTimestamp
private long lastTimestamp
-
lastAction
private MultikeyActionsHandler.MyAction lastAction
-
timer
private final java.util.Timer timer
-
instance
private static MultikeyActionsHandler instance
-
-
Constructor Detail
-
MultikeyActionsHandler
private MultikeyActionsHandler()
-
-
Method Detail
-
getInstance
public static MultikeyActionsHandler getInstance()
Replies the unique instance of this class.- Returns:
- The unique instance of this class
-
formatMenuText
private static java.lang.String formatMenuText(javax.swing.KeyStroke keyStroke, java.lang.String index, java.lang.String description)
-
addAction
public void addAction(MultikeyShortcutAction action)
Registers an action and its shortcut- Parameters:
action
- The action to add
-
removeAction
public void removeAction(MultikeyShortcutAction action)
Unregisters an action and its shortcut completely- Parameters:
action
- The action to remove
-
-