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
color chooser widget
[fanfix.git]
/
src
/
jexer
/
TButton.java
diff --git
a/src/jexer/TButton.java
b/src/jexer/TButton.java
index 0fc36a2de2afac6f682e44af5e930289c9cbb60a..064e927566effd281321502a7ad02031012fff84 100644
(file)
--- a/
src/jexer/TButton.java
+++ b/
src/jexer/TButton.java
@@
-1,4
+1,4
@@
-/*
*
+/*
* Jexer - Java Text User Interface
*
* License: LGPLv3 or later
* Jexer - Java Text User Interface
*
* License: LGPLv3 or later
@@
-56,7
+56,7
@@
public final class TButton extends TWidget {
*
* @return mnemonic string
*/
*
* @return mnemonic string
*/
- public
final
MnemonicString getMnemonic() {
+ public MnemonicString getMnemonic() {
return mnemonic;
}
return mnemonic;
}
@@
-75,6
+75,16
@@
public final class TButton extends TWidget {
*/
private TAction action;
*/
private TAction action;
+ /**
+ * Act as though the button was pressed. This is useful for other UI
+ * elements to get the same action as if the user clicked the button.
+ */
+ public void dispatch() {
+ if (action != null) {
+ action.DO();
+ }
+ }
+
/**
* Private constructor.
*
/**
* Private constructor.
*