X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fjexer%2FTButton.java;fp=src%2Fjexer%2FTButton.java;h=d1d7b390cca0170e0c33f9cde044e968c64fc947;hp=d86fa4400d16b51dc3be15dbaa38f5421ffdc7b5;hb=c62861dfee8e7aa2411e91b0f8a257297f08316f;hpb=b6d172980d63ca3fa6880f152373de46deaaadcc diff --git a/src/jexer/TButton.java b/src/jexer/TButton.java index d86fa44..d1d7b39 100644 --- a/src/jexer/TButton.java +++ b/src/jexer/TButton.java @@ -129,6 +129,20 @@ public class TButton extends TWidget { 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 ---------------------------------------------------------