abstract class DirectoryEdit.MenuItem
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) char |
hotkey
Menu item selection key
|
(package private) java.lang.String |
text
Menu item text
|
Constructor and Description |
---|
MenuItem(java.lang.String text)
Construct an instance with given menu text.
|
Modifier and Type | Method and Description |
---|---|
char |
getHotKey()
Get menu item selection key.
|
java.lang.String |
getText()
Get menu item text with making tilde removed.
|
private void |
prepareText(java.lang.String str)
Process menu item text and retrieve selection key.
|
(package private) abstract void |
run(java.lang.String[] args)
Worker routing which is executed when menu item is selected.
|
MenuItem(java.lang.String text)
First menu item - ~a
will mark a as selection
key.text
- Menu item text.public char getHotKey()
public java.lang.String getText()
abstract void run(java.lang.String[] args)
args
- Array of tokens retrieved from the user input.private void prepareText(java.lang.String str)
str
- Menu item text.java.lang.RuntimeException
- If menu item does not contain proper marker.