Merge branch 'upstream-sep2019-sfix' into subtree
authorNiki Roo <niki@nikiroo.be>
Thu, 2 Jan 2020 17:19:24 +0000 (18:19 +0100)
committerNiki Roo <niki@nikiroo.be>
Thu, 2 Jan 2020 17:19:24 +0000 (18:19 +0100)
TButton.java
TWidget.java

index d86fa4400d16b51dc3be15dbaa38f5421ffdc7b5..d1d7b390cca0170e0c33f9cde044e968c64fc947 100644 (file)
@@ -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 ---------------------------------------------------------
index 32ed80656882ec6f6267d042d8c52febbb3fd4dc..d60efd8d3a321236e2069199c6db2fb364505d69 100644 (file)
@@ -1374,7 +1374,7 @@ public abstract class TWidget implements Comparable<TWidget> {
      *
      * @param child TWidget to add
      */
-    private void addChild(final TWidget child) {
+    public void addChild(final TWidget child) {
         children.add(child);
 
         if ((child.enabled)