royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yish...@apache.org
Subject [royale-asjs] 01/03: Implement UIComponent.enabled
Date Tue, 07 Aug 2018 07:15:26 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 6faacc781c0a68350e201640cd3d2e4c9a64476f
Author: DESKTOP-RH4S838\Yishay <yishayjobs@hotmail.com>
AuthorDate: Sun Aug 5 14:52:18 2018 +0300

    Implement UIComponent.enabled
---
 .../MXRoyale/src/main/royale/mx/core/UIComponent.as       | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index 2fd6210..e042339 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -51,6 +51,8 @@ import mx.managers.IFocusManager;
 import mx.managers.IFocusManagerContainer;
 import mx.managers.ISystemManager;
 
+import org.apache.royale.html.beads.DisableBead;
+import org.apache.royale.html.beads.DisabledAlphaBead;
 import org.apache.royale.core.CallLaterBead;
 import org.apache.royale.core.IStatesImpl;
 import org.apache.royale.core.IStatesObject;
@@ -946,9 +948,6 @@ public class UIComponent extends UIBase
      */
     public function get enabled():Boolean
     {
-        // TODO
-        if (GOOG::DEBUG)
-            trace("enabled not implemented");
         return _enabled;
     }
 
@@ -957,10 +956,13 @@ public class UIComponent extends UIBase
      */
     public function set enabled(value:Boolean):void
     {
-        // TODO
-        if (GOOG::DEBUG)
-            trace("enabled not implemented");
         _enabled = value;
+        if (_disableBead == null) {
+		_disableBead = new DisableBead();
+		addBead(_disableBead);
+		addBead(new DisabledAlphaBead());
+	}
+	_disableBead.disabled = !_enabled;
     }
 
     //----------------------------------
@@ -2854,6 +2856,7 @@ public class UIComponent extends UIBase
     private var _toolTip:String;
 	
 	private var _toolTipBead: ToolTipBead;
+	private var _disableBead: DisableBead;
 
     [Bindable("toolTipChanged")]
     [Inspectable(category="General", defaultValue="null")]


Mime
View raw message