From: Niki Roo Date: Thu, 2 Jan 2020 17:19:24 +0000 (+0100) Subject: Merge branch 'upstream-sep2019-sfix' into subtree X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=commitdiff_plain;h=cd7e80930437e18ac719f8e2c5d93c2ca0d23cd8;hp=7a455971fed716123933d0f685a0d6eebcf3282b Merge branch 'upstream-sep2019-sfix' into subtree --- diff --git a/TButton.java b/TButton.java index d86fa44..d1d7b39 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 --------------------------------------------------------- diff --git a/TWidget.java b/TWidget.java index 32ed806..d60efd8 100644 --- a/TWidget.java +++ b/TWidget.java @@ -1374,7 +1374,7 @@ public abstract class TWidget implements Comparable { * * @param child TWidget to add */ - private void addChild(final TWidget child) { + public void addChild(final TWidget child) { children.add(child); if ((child.enabled)