Package jexer.bits
Class MnemonicString
- java.lang.Object
-
- jexer.bits.MnemonicString
-
public class MnemonicString extends java.lang.ObjectMnemonicString is used to render a string like "&File" into a highlighted 'F' and the rest of 'ile'. To insert a literal '&', use two '&&' characters, e.g. "&File && Stuff" would be "File & Stuff" with the first 'F' highlighted.
-
-
Constructor Summary
Constructors Constructor Description MnemonicString(java.lang.String label)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetRawLabel()Get the raw (uncolored) string.intgetScreenShortcutIdx()Get the screen location of the highlighted character.intgetShortcut()Get the keyboard shortcut character.intgetShortcutIdx()Get location of the highlighted character.
-
-
-
Method Detail
-
getShortcut
public int getShortcut()
Get the keyboard shortcut character.- Returns:
- the highlighted character
-
getShortcutIdx
public int getShortcutIdx()
Get location of the highlighted character.- Returns:
- location of the highlighted character
-
getScreenShortcutIdx
public int getScreenShortcutIdx()
Get the screen location of the highlighted character.- Returns:
- the number of text cells required to display from the beginning of the label to shortcutIdx
-
getRawLabel
public java.lang.String getRawLabel()
Get the raw (uncolored) string.- Returns:
- the raw (uncolored) string
-
-