|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.plugin.keyboardshortcut.KeyboardShortcut
@PublicApi public final class KeyboardShortcut
Defines a keyboard shortcut. A shortcut consists of the keys required for the shortcut (could be multiples for the same shortcut such as gh or gd), a context (some shortcuts only apply on the view issue page), the operation and a parameter for the operation (generally a jQuery selector, but can be anything really.).
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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)
Method Detail |
---|
public String getModuleKey()
public KeyboardShortcutManager.Context getContext()
public KeyboardShortcutManager.Operation getOperation()
public String getParameter()
public int getOrder()
public Set<List<String>> getShortcuts()
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 condition
Condition.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>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |