From: Niki Roo Date: Mon, 30 Dec 2019 16:32:16 +0000 (+0100) Subject: TButton: allow to get/set the action X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=03f6ef47b94f4db8f7d19ca1f3fec3a0edc10ed1;p=fanfix-jexer.git TButton: allow to get/set the action --- 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 ---------------------------------------------------------