@PublicApi public final class KeyboardShortcut extends Object implements Comparable<KeyboardShortcut>
Constructor and Description |
---|
KeyboardShortcut(String moduleKey,
KeyboardShortcutManager.Context context,
KeyboardShortcutManager.Operation operation,
String parameter,
int order,
Set<List<String>> shortcuts,
String descriptionI18nKey,
boolean hidden) |
KeyboardShortcut(String moduleKey,
KeyboardShortcutManager.Context context,
KeyboardShortcutManager.Operation operation,
String parameter,
int order,
Set<List<String>> shortcuts,
String descriptionI18nKey,
boolean hidden,
com.atlassian.plugin.web.Condition condition) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(KeyboardShortcut shortcut) |
com.atlassian.plugin.web.Condition |
getCondition() |
KeyboardShortcutManager.Context |
getContext() |
String |
getDescriptionI18nKey() |
String |
getModuleKey() |
KeyboardShortcutManager.Operation |
getOperation() |
int |
getOrder() |
String |
getParameter() |
String |
getPrettyShortcut(I18nHelper i18nHelper)
Given a set of shortcuts (such as ["gh", "gd"]), this method will produce a pretty
internationalized HTML string such as
|
Set<List<String>> |
getShortcuts() |
boolean |
isHidden() |
boolean |
shouldDisplay(Map<String,Object> context)
Returns whether the user can use the keyboard shortcut.
|
String |
toString() |
public KeyboardShortcut(String moduleKey, KeyboardShortcutManager.Context context, KeyboardShortcutManager.Operation operation, String parameter, int order, Set<List<String>> shortcuts, String descriptionI18nKey, boolean hidden)
public KeyboardShortcut(String moduleKey, KeyboardShortcutManager.Context context, KeyboardShortcutManager.Operation operation, String parameter, int order, Set<List<String>> shortcuts, String descriptionI18nKey, boolean hidden, com.atlassian.plugin.web.Condition condition)
public String getModuleKey()
public KeyboardShortcutManager.Context getContext()
public KeyboardShortcutManager.Operation getOperation()
public String getParameter()
public int getOrder()
public String getDescriptionI18nKey()
public boolean isHidden()
public com.atlassian.plugin.web.Condition getCondition()
public boolean shouldDisplay(Map<String,Object> context)
context
- the context to be passed to the conditionCondition.shouldDisplay(java.util.Map)
public String getPrettyShortcut(I18nHelper i18nHelper)
<kbd>g</kbd>
then <kbd>h</kbd>
or
<kbd>g</kbd>
then <kbd>d</kbd>
i18nHelper
- the i18nHelper to user for translations.public int compareTo(KeyboardShortcut shortcut)
compareTo
in interface Comparable<KeyboardShortcut>
Copyright © 2002-2021 Atlassian. All Rights Reserved.