git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switchable windows
[fanfix.git]
/
src
/
jexer
/
TMenu.java
diff --git
a/src/jexer/TMenu.java
b/src/jexer/TMenu.java
index b0873f01ff72c618ea29df3192e7a351708f7522..bc1bc3596bb2944eda6da12e5cd366fef1edaf70 100644
(file)
--- a/
src/jexer/TMenu.java
+++ b/
src/jexer/TMenu.java
@@
-47,6
+47,15
@@
public class TMenu extends TWindow {
*/
private MnemonicString mnemonic;
*/
private MnemonicString mnemonic;
+ /**
+ * Get the mnemonic string.
+ *
+ * @return the full mnemonic string
+ */
+ public final MnemonicString getMnemonic() {
+ return mnemonic;
+ }
+
// Reserved menu item IDs
public static final int MID_UNUSED = -1;
// Reserved menu item IDs
public static final int MID_UNUSED = -1;
@@
-92,15
+101,15
@@
public class TMenu extends TWindow {
parent.closeWindow(this);
// Setup the menu shortcut
parent.closeWindow(this);
// Setup the menu shortcut
- mnemonic = new MnemonicString(
title
);
-
this.title = mnemonic.getRawLabel(
);
+ mnemonic = new MnemonicString(
label
);
+
setTitle(mnemonic.getRawLabel()
);
assert (mnemonic.getShortcutIdx() >= 0);
// Recompute width and height to reflect an empty menu
assert (mnemonic.getShortcutIdx() >= 0);
// Recompute width and height to reflect an empty menu
-
width = this.title.length() + 4
;
-
height = 2
;
+
setWidth(getTitle().length() + 4)
;
+
setHeight(2)
;
-
this.active = false
;
+
setActive(false)
;
}
}
}
}