git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
738dd8c
)
TButton: allow to get/set the action
author
Niki Roo
<niki@nikiroo.be>
Mon, 30 Dec 2019 16:27:23 +0000
(17:27 +0100)
committer
Niki Roo
<niki@nikiroo.be>
Mon, 30 Dec 2019 16:27:23 +0000
(17:27 +0100)
TButton.java
patch
|
blob
|
blame
|
history
diff --git
a/TButton.java
b/TButton.java
index d86fa4400d16b51dc3be15dbaa38f5421ffdc7b5..d1d7b390cca0170e0c33f9cde044e968c64fc947 100644
(file)
--- a/
TButton.java
+++ b/
TButton.java
@@
-129,6
+129,20
@@
public class TButton extends TWidget {
this(parent, text, x, y);
this.action = action;
}
this(parent, text, x, y);
this.action = action;
}
+
+ /**
+ * The action to call when the button is pressed.
+ **/
+ public TAction getAction() {
+ return action;
+ }
+
+ /**
+ * The action to call when the button is pressed.
+ **/
+ public void setAction(TAction action) {
+ this.action = action;
+ }
// ------------------------------------------------------------------------
// Event handlers ---------------------------------------------------------
// ------------------------------------------------------------------------
// Event handlers ---------------------------------------------------------