This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 7ddfc36  jewel: check and radio buttons first cleaning pass
7ddfc36 is described below

commit 7ddfc36d11ebada2eb45f4ea60a6c28f75134345
Author: Carlos Rovira <[email protected]>
AuthorDate: Wed Aug 28 16:51:15 2019 +0200

    jewel: check and radio buttons first cleaning pass
---
 .../royale/org/apache/royale/jewel/CheckBox.as     | 270 ++++++++--------
 .../royale/org/apache/royale/jewel/RadioButton.as  | 339 +++++++++++++--------
 .../jewel/supportClasses/button/SimpleButton.as    |   8 +-
 3 files changed, 352 insertions(+), 265 deletions(-)

diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as
index be3eaa4..b195417 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as
@@ -20,20 +20,22 @@ package org.apache.royale.jewel
 {
     COMPILE::SWF
     {
-    import org.apache.royale.core.IStrand;
     import org.apache.royale.core.UIButtonBase;
     import org.apache.royale.events.MouseEvent;
+    import org.apache.royale.core.IToggleButtonModel;
+    import org.apache.royale.utils.ClassSelectorList;
+    import org.apache.royale.utils.IClassSelectorListSupport;
     }
+
     COMPILE::JS
     {
     import org.apache.royale.core.StyledUIBase;
     import org.apache.royale.core.WrappedHTMLElement;
     import org.apache.royale.html.util.addElementToWrapper;
     }
-    import org.apache.royale.core.IToggleButtonModel;
-    import org.apache.royale.events.Event;
-    import org.apache.royale.utils.ClassSelectorList;
+
     import org.apache.royale.core.ISelectable;
+    import org.apache.royale.events.Event;
 
     //--------------------------------------
     //  Events
@@ -51,7 +53,7 @@ package org.apache.royale.jewel
 
     /**
      *  The CheckBox class implements the common user interface
-     *  control.  The CheckBox includes its text label.
+     *  control. The CheckBox includes its text label.
      *
      *  @toplevel
      *  @langversion 3.0
@@ -60,7 +62,7 @@ package org.apache.royale.jewel
      *  @productversion Royale 0.9.4
      */
     COMPILE::SWF
-       public class CheckBox extends UIButtonBase implements IStrand, 
ISelectable
+       public class CheckBox extends UIButtonBase implements ISelectable, 
IClassSelectorListSupport
        {
         /**
          *  Constructor.
@@ -79,9 +81,83 @@ package org.apache.royale.jewel
                        
addEventListener(org.apache.royale.events.MouseEvent.CLICK, 
internalMouseHandler);
                }
 
+        /**
+                * @private
+                */
+        private function 
internalMouseHandler(event:org.apache.royale.events.MouseEvent) : void
+               {
+                       selected = !selected;
+                       dispatchEvent(new Event(Event.CHANGE));
+               }
+
         protected var classSelectorList:ClassSelectorList;
 
         /**
+         * Add a class selector to the list.
+         * 
+         * @param name Name of selector to add.
+         * 
+         * @langversion 3.0
+         * @playerversion Flash 10.2
+         * @playerversion AIR 2.6
+         * @productversion Royale 0.9.6
+         */
+        public function addClass(name:String):void
+        {
+            // To implement. Need to implement this interface or extensions 
will not compile
+        }
+
+        /**
+         * Removes a class selector from the list.
+         * 
+         * @param name Name of selector to remove.
+         *
+         * @royaleignorecoercion HTMLElement
+         * @royaleignorecoercion DOMTokenList
+         * 
+         * @langversion 3.0
+         * @playerversion Flash 10.2
+         * @playerversion AIR 2.6
+         * @productversion Royale 0.9.6
+         */
+        public function removeClass(name:String):void
+        {
+            // To implement. Need to implement this interface or extensions 
will not compile
+        }
+
+        /**
+         * Add or remove a class selector to/from the list.
+         * 
+         * @param name Name of selector to add or remove.
+         * @param value True to add, False to remove.
+         * 
+         * @langversion 3.0
+         * @playerversion Flash 10.2
+         * @playerversion AIR 2.6
+         * @productversion Royale 0.9.6
+         */
+        public function toggleClass(name:String, value:Boolean):void
+        {
+            // To implement. Need to implement this interface or extensions 
will not compile
+        }
+
+        /**
+                *  Search for the name in the element class list 
+                *
+         *  @param name Name of selector to find.
+         *  @return return true if the name is found or false otherwise.
+         * 
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion Royale 0.9.6
+                */
+               public function containsClass(name:String):Boolean
+        {
+            return false;
+        }
+
+        /**
          *  The text label for the CheckBox.
          *
          *  @langversion 3.0
@@ -93,7 +169,6 @@ package org.apache.royale.jewel
                {
                        return IToggleButtonModel(model).text;
                }
-
         /**
          *  @private
          */
@@ -116,7 +191,6 @@ package org.apache.royale.jewel
                {
                        return IToggleButtonModel(model).selected;
                }
-
         /**
          *  @private
          */
@@ -141,14 +215,12 @@ package org.apache.royale.jewel
         {
             IToggleButtonModel(model).html = newValue;
         }
-        
-               private function 
internalMouseHandler(event:org.apache.royale.events.MouseEvent) : void
-               {
-                       selected = !selected;
-                       dispatchEvent(new Event(Event.CHANGE));
-               }
        }
-
+    
+    //--------------------------------------
+    //  Events
+    //--------------------------------------
+    
     /**
      *  Dispatched when the user checks or un-checks the CheckBox.
      *
@@ -158,13 +230,14 @@ package org.apache.royale.jewel
      *  @productversion Royale 0.9.4
      */
        [Event(name="change", type="org.apache.royale.events.Event")]
-
+    
     /**
      *  The CheckBox class provides a Jewel UI-like appearance for a CheckBox.
      *
      *  A checkbox consists of a small square and, typically, text that 
clearly 
      *  communicates a binary condition that will be set or unset when the 
user 
-     *  clicks or touches it. 
+     *  clicks or touches it.
+     *  
      *  Checkboxes typically, but not necessarily, appear in groups, and can be
      *  selected and deselected individually. The Jewel checkbox component 
allows
      *  you to add display and click effects.
@@ -192,49 +265,7 @@ package org.apache.royale.jewel
             typeNames = "jewel checkbox";
         }
 
-        private var _label:WrappedHTMLElement;
-
-               private static var _checkNumber:Number = 0;
-        
-        COMPILE::JS
-        protected var input:HTMLInputElement;
-
-        COMPILE::JS
-        protected var checkbox:HTMLSpanElement;
-        
-        /**
-         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
-         * @royaleignorecoercion HTMLInputElement
-         * @royaleignorecoercion HTMLSpanElement
-         */
-        COMPILE::JS
-        override protected function createElement():WrappedHTMLElement
-        {
-            input = addElementToWrapper(this,'input') as HTMLInputElement;
-            input.type = 'checkbox';
-            checkbox = document.createElement('span') as HTMLSpanElement;
-            positioner = document.createElement('label') as 
WrappedHTMLElement;   
-            return element;
-        }
-
-        COMPILE::JS
-               private var _positioner:WrappedHTMLElement;
-
-               COMPILE::JS
-               override public function get positioner():WrappedHTMLElement
-               {
-                       return _positioner;
-               }
-
-               COMPILE::JS
-               override public function set 
positioner(value:WrappedHTMLElement):void
-               {
-                       _positioner = value;
-            _positioner.royale_wrapper = this;
-                       _positioner.appendChild(element);
-            _positioner.appendChild(checkbox);
-               }
-
+        protected var textNode:Text;
         /**
          *  The text label for the CheckBox.
          *
@@ -247,36 +278,20 @@ package org.apache.royale.jewel
          */
                public function get text():String
                {
-            COMPILE::SWF
-            {
-                       return IToggleButtonModel(model).text;
-            }
-            COMPILE::JS
-            {
-                return textNode ? textNode.nodeValue : "";
-            }
+            return textNode ? textNode.nodeValue : "";
                }
-
         /**
          *  @private
          */
         public function set text(value:String):void
                {
-            COMPILE::SWF
+            if(!textNode)
             {
-                IToggleButtonModel(model).text = value;
+                textNode = document.createTextNode('') as Text;
+                checkbox.appendChild(textNode);
             }
-
-            COMPILE::JS
-                       {
-                if(!textNode)
-                {
-                    textNode = document.createTextNode('') as Text;
-                    checkbox.appendChild(textNode);
-                }
-                
-                textNode.nodeValue = value;    
-                       }
+            
+            textNode.nodeValue = value;
                }
 
         /**
@@ -285,36 +300,17 @@ package org.apache.royale.jewel
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9
+         *  @productversion Royale 0.9.4
          */
         public function get value():String
         {
-            COMPILE::SWF
-            {
-                return IToggleButtonModel(model).html;
-            }
-
-            COMPILE::JS
-            {
-                return input.value;
-            }
+            return input.value;
         }
         public function set value(newValue:String):void
         {
-            COMPILE::SWF
-            {
-                IToggleButtonModel(model).html = newValue;
-            }
-
-            COMPILE::JS
-            {
-                input.value = newValue;
-            }
+            input.value = newValue;
         }
 
-        COMPILE::JS
-        protected var textNode:Text;
-
         [Bindable("change")]
         /**
          *  <code>true</code> if the check mark is displayed.
@@ -324,38 +320,58 @@ package org.apache.royale.jewel
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.9.4
-         *  @royaleignorecoercion HTMLInputElement
          */
                public function get selected():Boolean
                {
-            COMPILE::SWF
-            {
-                       return IToggleButtonModel(model).selected;
-            }
-            COMPILE::JS
-            {
-                return input.checked;
-            }
+            return input.checked;
                }
-
         /**
-         * @royaleignorecoercion HTMLInputElement
+         * @private
          */
         public function set selected(value:Boolean):void
         {
-            COMPILE::SWF
-            {
-                IToggleButtonModel(model).selected = value;
-            }
+            if(input.checked == value)
+                return;
+            input.checked = value;
+            dispatchEvent(new Event(Event.CHANGE));
+        }
 
-            COMPILE::JS
-                       {
-                if(input.checked == value)
-                    return;
-                input.checked = value;
-                dispatchEvent(new Event(Event.CHANGE));
-            }
+        protected var input:HTMLInputElement;
+        protected var checkbox:HTMLSpanElement;
+        
+        /**
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         * @royaleignorecoercion HTMLInputElement
+         * @royaleignorecoercion HTMLSpanElement
+         */
+        override protected function createElement():WrappedHTMLElement
+        {
+            input = addElementToWrapper(this,'input') as HTMLInputElement;
+            input.type = 'checkbox';
+            checkbox = document.createElement('span') as HTMLSpanElement;
+            positioner = document.createElement('label') as 
WrappedHTMLElement;   
+            return element;
         }
-    }
 
+        private var _positioner:WrappedHTMLElement;
+        /**
+         *  @copy org.apache.royale.core.IUIBase#positioner
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.4
+         */
+               override public function get positioner():WrappedHTMLElement
+               {
+                       return _positioner;
+               }
+               override public function set 
positioner(value:WrappedHTMLElement):void
+               {
+                       _positioner = value;
+            _positioner.royale_wrapper = this;
+                       _positioner.appendChild(element);
+            _positioner.appendChild(checkbox);
+               }
+    }
 }
diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
index 15a6237..d83ddfe 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
@@ -18,41 +18,32 @@
 
////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.jewel
 {
-    import org.apache.royale.events.Event;
-    import org.apache.royale.events.MouseEvent;
-    import org.apache.royale.utils.ClassSelectorList;
-       import org.apache.royale.core.ISelectable;
-
     COMPILE::SWF
     {
-        import flash.utils.Dictionary;
-        import org.apache.royale.core.UIButtonBase;
-        import org.apache.royale.core.IStrand;
-        import org.apache.royale.core.IValueToggleButtonModel;
+    import flash.utils.Dictionary;
+
+    import org.apache.royale.core.IValueToggleButtonModel;
+    import org.apache.royale.core.UIButtonBase;
+    import org.apache.royale.utils.ClassSelectorList;
+    import org.apache.royale.utils.IClassSelectorListSupport;
     }
 
     COMPILE::JS
     {
-        import org.apache.royale.core.StyledUIBase;
-        import org.apache.royale.core.WrappedHTMLElement;
-        import org.apache.royale.html.util.addElementToWrapper;
+    import org.apache.royale.core.StyledUIBase;
+    import org.apache.royale.core.WrappedHTMLElement;
+    import org.apache.royale.html.util.addElementToWrapper;
     }
 
+    import org.apache.royale.core.ISelectable;
+    import org.apache.royale.events.Event;
+    import org.apache.royale.events.MouseEvent;
+
     //--------------------------------------
     //  Events
     //--------------------------------------
 
     /**
-     *  Dispatched when the user clicks on RadioButton.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion Royale 0.9.4
-     */
-       [Event(name="click", type="org.apache.royale.events.MouseEvent")]
-
-    /**
      *  Dispatched when RadioButton is being selected/unselected.
      *
      *  @langversion 3.0
@@ -62,8 +53,6 @@ package org.apache.royale.jewel
      */
     [Event(name="change", type="org.apache.royale.events.Event")]
 
-    
-
     /**
      *  The Jewel radio button component in SWF is a specialized button.
      * 
@@ -79,7 +68,7 @@ package org.apache.royale.jewel
      *  @productversion Royale 0.9.4
      */
     COMPILE::SWF
-       public class RadioButton extends UIButtonBase implements IStrand, 
ISelectable
+       public class RadioButton extends UIButtonBase implements ISelectable, 
IClassSelectorListSupport
        {
         /**
                 *  constructor.
@@ -100,8 +89,85 @@ package org.apache.royale.jewel
                        
addEventListener(org.apache.royale.events.MouseEvent.CLICK, 
internalMouseHandler);
                }
 
+        /**
+                * @private
+                */
+               private function internalMouseHandler(event:MouseEvent) : void
+               {
+                       // prevent radiobutton from being turned off by a click
+                       if( !selected ) {
+                               selected = !selected;
+                               dispatchEvent(new Event(Event.CHANGE));
+                       }
+               }
+
         protected var classSelectorList:ClassSelectorList;
 
+        /**
+         * Add a class selector to the list.
+         * 
+         * @param name Name of selector to add.
+         * 
+         * @langversion 3.0
+         * @playerversion Flash 10.2
+         * @playerversion AIR 2.6
+         * @productversion Royale 0.9.6
+         */
+        public function addClass(name:String):void
+        {
+            // To implement. Need to implement this interface or extensions 
will not compile
+        }
+
+        /**
+         * Removes a class selector from the list.
+         * 
+         * @param name Name of selector to remove.
+         *
+         * @royaleignorecoercion HTMLElement
+         * @royaleignorecoercion DOMTokenList
+         * 
+         * @langversion 3.0
+         * @playerversion Flash 10.2
+         * @playerversion AIR 2.6
+         * @productversion Royale 0.9.6
+         */
+        public function removeClass(name:String):void
+        {
+            // To implement. Need to implement this interface or extensions 
will not compile
+        }
+
+        /**
+         * Add or remove a class selector to/from the list.
+         * 
+         * @param name Name of selector to add or remove.
+         * @param value True to add, False to remove.
+         * 
+         * @langversion 3.0
+         * @playerversion Flash 10.2
+         * @playerversion AIR 2.6
+         * @productversion Royale 0.9.6
+         */
+        public function toggleClass(name:String, value:Boolean):void
+        {
+            // To implement. Need to implement this interface or extensions 
will not compile
+        }
+
+        /**
+                *  Search for the name in the element class list 
+                *
+         *  @param name Name of selector to find.
+         *  @return return true if the name is found or false otherwise.
+         * 
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion Royale 0.9.6
+                */
+               public function containsClass(name:String):Boolean
+        {
+            return false;
+        }
+
                protected static var dict:Dictionary = new Dictionary(true);
 
                /**
@@ -233,18 +299,6 @@ package org.apache.royale.jewel
 
                        dict[this] = this;
                }
-
-               /**
-                * @private
-                */
-               private function internalMouseHandler(event:MouseEvent) : void
-               {
-                       // prevent radiobutton from being turned off by a click
-                       if( !selected ) {
-                               selected = !selected;
-                               dispatchEvent(new Event(Event.CHANGE));
-                       }
-               }
        }
     
     //--------------------------------------
@@ -252,16 +306,6 @@ package org.apache.royale.jewel
     //--------------------------------------
 
     /**
-     *  Dispatched when the user clicks on RadioButton.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion Royale 0.9.4
-     */
-       [Event(name="click", type="org.apache.royale.events.MouseEvent")]
-
-    /**
      *  Dispatched when RadioButton is being selected/unselected.
      *
      *  @langversion 3.0
@@ -305,97 +349,55 @@ package org.apache.royale.jewel
         }
         
         /**
-         * Provides unique name
-         */
-        protected static var radioCounter:int = 0;
-
-        private var radio:HTMLSpanElement;
-        private var icon:HTMLInputElement;
-        private var textNode:Text;
-
-        /**
-         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
-         * @royaleignorecoercion HTMLInputElement
-         * @royaleignorecoercion HTMLSpanElement
-         * @royaleignorecoercion Text
+         *  The text label for the RadioButton.
+         *
+         *  @royaleignorecoercion Text
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.4
          */
-        override protected function createElement():WrappedHTMLElement
+        public function get text():String
         {
-            icon = addElementToWrapper(this, 'input') as HTMLInputElement;
-            icon.type = 'radio';
-            icon.id = '_radio_' + Math.random();
-            icon.value = String(value);
-            
-            textNode = document.createTextNode('') as Text;
-            radio = document.createElement('span') as HTMLSpanElement;
-            radio.appendChild(textNode);
-            
-            positioner = document.createElement('label') as WrappedHTMLElement;
-            
-            return element;
+            return textNode.nodeValue;
         }
-
-        COMPILE::JS
-               private var _positioner:WrappedHTMLElement;
-
-               COMPILE::JS
-               override public function get positioner():WrappedHTMLElement
-               {
-                       return _positioner;
-               }
-
-               COMPILE::JS
-               override public function set 
positioner(value:WrappedHTMLElement):void
-               {
-                       _positioner = value;
-            _positioner.royale_wrapper = this;
-                       _positioner.appendChild(element);
-            _positioner.appendChild(radio);
-               }
-
-        override public function addEventListener(type:String, 
handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = 
null):void
+        public function set text(value:String):void
         {
-            if (type == MouseEvent.CLICK)
-            {
-                icon.addEventListener(type, handler, opt_capture);
-            }
-            else
-            {
-               super.addEventListener(type, handler, opt_capture, 
opt_handlerScope);
-            }
+            textNode.nodeValue = value;
         }
 
-        public function clickHandler(event:Event):void
+        /**
+         *  The value associated with the RadioButton.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.4
+         */
+        public function get value():Object
         {
-            selected = !selected;
+            return icon.value;
         }
-        
-        public function get groupName():String
+        public function set value(value:Object):void
         {
-            return icon.name as String;
+            icon.value = String(value);
         }
 
-        public function set groupName(value:String):void
-        {
-            icon.name = value;
-        }
-        
-        public function get text():String
-        {
-            return textNode.nodeValue;
-        }
-        
-        public function set text(value:String):void
-        {
-            textNode.nodeValue = value;
-        }
-        
-        /** @export */
+        /**
+         *  <code>true</code> if the radio mark is displayed.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.4
+         * 
+         *  @export
+         */
         public function get selected():Boolean
         {
             return icon.checked;
         }
-
         public function set selected(value:Boolean):void
         {
             if(icon.checked == value)
@@ -403,16 +405,7 @@ package org.apache.royale.jewel
             icon.checked = value;
             dispatchEvent(new Event(Event.CHANGE));
         }
-        
-        public function get value():Object
-        {
-            return icon.value;
-        }
-        public function set value(value:Object):void
-        {
-            icon.value = String(value);
-        }
-        
+
         public function get selectedValue():Object
         {
             var groupName:String = icon.name as String;
@@ -428,7 +421,6 @@ package org.apache.royale.jewel
             }
             return null;
         }
-
         /**
          * @royaleignorecoercion HTMLInputElement
          */
@@ -447,5 +439,84 @@ package org.apache.royale.jewel
                 }
             }
         }
+
+        /**
+         *  The name of the group to which this radio belongs
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.4
+         */
+        public function get groupName():String
+        {
+            return icon.name as String;
+        }
+        public function set groupName(value:String):void
+        {
+            icon.name = value;
+        }
+
+        private var radio:HTMLSpanElement;
+        private var icon:HTMLInputElement;
+        private var textNode:Text;
+
+        /**
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         * @royaleignorecoercion HTMLInputElement
+         * @royaleignorecoercion HTMLSpanElement
+         * @royaleignorecoercion Text
+         */
+        override protected function createElement():WrappedHTMLElement
+        {
+            icon = addElementToWrapper(this, 'input') as HTMLInputElement;
+            icon.type = 'radio';
+            icon.id = '_radio_' + Math.random();
+            icon.value = String(value);
+            
+            textNode = document.createTextNode('') as Text;
+            radio = document.createElement('span') as HTMLSpanElement;
+            radio.appendChild(textNode);
+            
+            positioner = document.createElement('label') as WrappedHTMLElement;
+            
+            return element;
+        }
+
+        private var _positioner:WrappedHTMLElement;
+        /**
+         *  @copy org.apache.royale.core.IUIBase#positioner
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.4
+         */
+               override public function get positioner():WrappedHTMLElement
+               {
+                       return _positioner;
+               }
+        override public function set positioner(value:WrappedHTMLElement):void
+               {
+                       _positioner = value;
+            _positioner.royale_wrapper = this;
+                       _positioner.appendChild(element);
+            _positioner.appendChild(radio);
+               }
+
+        /**
+         * @copy org.apache.royale.events.EventDispatcher#addEventListener
+         */
+        override public function addEventListener(type:String, 
handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = 
null):void
+        {
+            if (type == MouseEvent.CLICK)
+            {
+                icon.addEventListener(type, handler, opt_capture);
+            }
+            else
+            {
+               super.addEventListener(type, handler, opt_capture, 
opt_handlerScope);
+            }
+        }
     }
 }
\ No newline at end of file
diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/button/SimpleButton.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/button/SimpleButton.as
index 5a95fdd..f3da34e 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/button/SimpleButton.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/button/SimpleButton.as
@@ -20,14 +20,14 @@ package org.apache.royale.jewel.supportClasses.button
 {
     COMPILE::SWF
     {
-       import org.apache.royale.core.UIButtonBase;
+    import org.apache.royale.core.UIButtonBase;
     }
 
     COMPILE::JS
     {
-        import org.apache.royale.core.StyledUIBase;
-        import org.apache.royale.core.WrappedHTMLElement;
-        import org.apache.royale.html.util.addElementToWrapper;
+    import org.apache.royale.core.StyledUIBase;
+    import org.apache.royale.core.WrappedHTMLElement;
+    import org.apache.royale.html.util.addElementToWrapper;
     }
     
     import org.apache.royale.core.IStrand;

Reply via email to