com.atlassian.jira.plugin.keyboardshortcut
Class KeyboardShortcut
java.lang.Object
com.atlassian.jira.plugin.keyboardshortcut.KeyboardShortcut
- All Implemented Interfaces:
- java.lang.Comparable<KeyboardShortcut>
public final class KeyboardShortcut
- extends java.lang.Object
- implements java.lang.Comparable<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.).
- Since:
- v4.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
KeyboardShortcut
public KeyboardShortcut(KeyboardShortcutManager.Context context,
KeyboardShortcutManager.Operation operation,
java.lang.String parameter,
int order,
java.util.Set<java.util.List<java.lang.String>> shortcuts,
java.lang.String descriptionI18nKey,
boolean hidden)
getContext
public KeyboardShortcutManager.Context getContext()
getShortcuts
public java.util.Set<java.util.List<java.lang.String>> getShortcuts()
getOrder
public int getOrder()
getOperation
public KeyboardShortcutManager.Operation getOperation()
getParameter
public java.lang.String getParameter()
getDescriptionI18nKey
public java.lang.String getDescriptionI18nKey()
isHidden
public boolean isHidden()
getPrettyShortcut
public java.lang.String getPrettyShortcut(I18nHelper i18nHelper)
- Given a set of shortcuts (such as ["gh", "gd"]), this method will produce a pretty
internationalized HTML string such as
<kbd>g</kbd>
then <kbd>h</kbd>
or
<kbd>g</kbd>
then <kbd>d</kbd>
- Parameters:
i18nHelper
- the i18nHelper to user for translations.
- Returns:
- pretty printed shortcut.
compareTo
public int compareTo(KeyboardShortcut shortcut)
- Specified by:
compareTo
in interface java.lang.Comparable<KeyboardShortcut>
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2002-2010 Atlassian. All Rights Reserved.