From 0c53bc26dbbdaf520883eea53d2dfa1f1729eaa2 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Mon, 30 Dec 2019 17:27:23 +0100 Subject: [PATCH] TButton: allow to get/set the action --- TButton.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/TButton.java b/TButton.java index d86fa440..d1d7b390 100644 --- a/TButton.java +++ b/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 --------------------------------------------------------- -- 2.27.0