Class ShortcutManager
java.lang.Object
de.julianweinelt.datacat.dbx.api.ui.ShortcutManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.getActionOptional(String name) static ShortcutManagerinstance()voidregister(ShortcutAction action) voidRegisters a new shortcut action for use in the menu and the editor.
-
Constructor Details
-
ShortcutManager
public ShortcutManager()
-
-
Method Details
-
instance
-
register
-
register
Registers a new shortcut action for use in the menu and the editor.- Parameters:
name- AStringonly containing alphanumerical upper case letters and underscores for identifying the action.displayName- A display name for better readabilitystroke- AKeyStrokeobject for the default keyboard shortcut of this action- Throws:
IllegalArgumentException- if the given name contains any illegal characters.
-
getAction
Deprecated, for removal: This API element is subject to removal in a future version.in favor ofgetActionOptional(String)with null-safetyReturn a registered action by its internal name.- Parameters:
name- The internal name of the action- Returns:
- An
ShortcutActionobject containing the action, ornullif it doesn't exist
-
getActionOptional
-
getActionOptional(String)with null-safety