flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bigosma...@apache.org
Subject [40/50] [abbrv] git commit: [flex-sdk] [refs/heads/new_android_skins] - FLEX-34142 Can not change the color of the header with the property headerStyleName (MobileGridColumn)
Date Wed, 19 Mar 2014 01:41:21 GMT
FLEX-34142 Can not change the color of the header with the property headerStyleName (MobileGridColumn)


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/f46ee850
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/f46ee850
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/f46ee850

Branch: refs/heads/new_android_skins
Commit: f46ee8504a1c55ff1d42136b330169072392d4c5
Parents: 656cde8
Author: mamsellem <maurice.amsellem@systar.com>
Authored: Fri Mar 14 20:47:39 2014 +0100
Committer: mamsellem <maurice.amsellem@systar.com>
Committed: Fri Mar 14 20:47:39 2014 +0100

----------------------------------------------------------------------
 .../spark/components/supportClasses/MobileGridColumn.as   |  3 ++-
 .../spark/components/supportClasses/MobileGridHeader.as   | 10 ++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f46ee850/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
b/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
index b847c2a..44b3995 100644
--- a/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
+++ b/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridColumn.as
@@ -259,6 +259,7 @@ public class MobileGridColumn extends EventDispatcher
     /** Defines the css style name to be used for displaying this column's header label.
      * <p>Use this property to display the header in a different color or font, or
with a different text alignment.</p>
      */
+    [Bindable]
     public function get headerStyleName():String
     {
         return _headerStyleName;
@@ -266,7 +267,7 @@ public class MobileGridColumn extends EventDispatcher
 
     public function set headerStyleName(value:String):void
     {
-        _headerStyleName = value;
+        _headerStyleName = value;     // Bindable so will update MobileGridHeader corresponding
renderer, magic of ArrayList
     }
 
     private var _sortDescending:Boolean;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f46ee850/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridHeader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridHeader.as
b/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridHeader.as
index 4985112..1a943dd 100644
--- a/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridHeader.as
+++ b/frameworks/projects/experimental_mobile/src/spark/components/supportClasses/MobileGridHeader.as
@@ -23,6 +23,7 @@ import mx.collections.ArrayList;
 import mx.core.IVisualElement;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
+import mx.styles.IStyleClient;
 
 import spark.components.ButtonBar;
 import spark.components.MobileGrid;
@@ -151,6 +152,15 @@ public class MobileGridHeader extends ButtonBar
         return dataGroup.getElementAt(index);
     }
 
+    /**
+     *  @private
+     */
+    override public function updateRenderer(renderer: IVisualElement, itemIndex: int, data:
Object): void
+    {
+        super.updateRenderer(renderer, itemIndex, data);
+        IStyleClient(renderer).styleName = MobileGridColumn(data).headerStyleName;
+    }
+
     public function updateHeaderWidths():void
     {
         if (dataProvider.length != _columns.length)


Mime
View raw message