flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [2/3] git commit: [flex-asjs] [refs/heads/develop] - better dropdownlists. Still need to get rid of scrollbar
Date Thu, 30 Jul 2015 23:21:54 GMT
better dropdownlists.  Still need to get rid of scrollbar


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

Branch: refs/heads/develop
Commit: ac1fc71e2f76c82a75e667cca792ed10170a034d
Parents: 4241aca
Author: Alex Harui <aharui@apache.org>
Authored: Thu Jul 30 14:20:26 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Thu Jul 30 14:20:26 2015 -0700

----------------------------------------------------------------------
 frameworks/projects/Flat/as/defaults.css                  |  2 +-
 .../as/src/org/apache/flex/flat/beads/DropDownListView.as | 10 +++++-----
 .../as/src/org/apache/flex/html/beads/DropDownListView.as | 10 +++++-----
 .../flex/html/beads/controllers/DropDownListController.as |  7 ++++---
 4 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ac1fc71e/frameworks/projects/Flat/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/defaults.css b/frameworks/projects/Flat/as/defaults.css
index a54c912..aef2c28 100644
--- a/frameworks/projects/Flat/as/defaults.css
+++ b/frameworks/projects/Flat/as/defaults.css
@@ -573,7 +573,7 @@ DropDownListList
     IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
     IItemRenderer: ClassReference("org.apache.flex.flat.supportClasses.DropDownListStringItemRenderer");
     iBackgroundBead: ClassReference('org.apache.flex.html.beads.SolidBackgroundBead');
-    border-style: solid;
+    border-style: none;
     border-radius: 4px;
     border-color: #000000;
     border-width: 1px;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ac1fc71e/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/DropDownListView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/DropDownListView.as
b/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/DropDownListView.as
index a9e4cde..3d7d838 100644
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/DropDownListView.as
+++ b/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/DropDownListView.as
@@ -251,6 +251,11 @@ package org.apache.flex.flat.beads
          */
         public function get popUp():IStrand
         {
+            if (!_popUp)
+            {
+                var popUpClass:Class = ValuesManager.valuesImpl.getValue(_strand, "iPopUp")
as Class;
+                _popUp = new popUpClass() as IStrand;
+            }
             return _popUp;
         }
         
@@ -280,11 +285,6 @@ package org.apache.flex.flat.beads
                 _popUpVisible = value;
                 if (value)
                 {
-                    if (!_popUp)
-                    {
-                        var popUpClass:Class = ValuesManager.valuesImpl.getValue(_strand,
"iPopUp") as Class;
-                        _popUp = new popUpClass() as IStrand;
-                    }
 					var root:Object = DisplayObject(_strand).root;
 					var host:DisplayObjectContainer = DisplayObject(_strand).parent;
                     while (host && !(host is IPopUpHost))

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ac1fc71e/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/DropDownListView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/DropDownListView.as
b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/DropDownListView.as
index 391350b..e3f1a7e 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/DropDownListView.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/DropDownListView.as
@@ -242,6 +242,11 @@ package org.apache.flex.html.beads
          */
         public function get popUp():IStrand
         {
+            if (!_popUp)
+            {
+                var popUpClass:Class = ValuesManager.valuesImpl.getValue(_strand, "iPopUp")
as Class;
+                _popUp = new popUpClass() as IStrand;
+            }
             return _popUp;
         }
         
@@ -271,11 +276,6 @@ package org.apache.flex.html.beads
                 _popUpVisible = value;
                 if (value)
                 {
-                    if (!_popUp)
-                    {
-                        var popUpClass:Class = ValuesManager.valuesImpl.getValue(_strand,
"iPopUp") as Class;
-                        _popUp = new popUpClass() as IStrand;
-                    }
 					var root:Object = DisplayObject(_strand).root;
 					var host:DisplayObjectContainer = DisplayObject(_strand).parent;
                     while (host && !(host is IPopUpHost))

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ac1fc71e/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/controllers/DropDownListController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/controllers/DropDownListController.as
b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/controllers/DropDownListController.as
index 36a9fce..848eda5 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/controllers/DropDownListController.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/controllers/DropDownListController.as
@@ -25,6 +25,7 @@ package org.apache.flex.html.beads.controllers
 	import org.apache.flex.core.IBeadController;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.UIBase;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.html.beads.IDropDownListView;
@@ -76,11 +77,11 @@ package org.apache.flex.html.beads.controllers
         private function clickHandler(event:Event):void
         {
             var viewBead:IDropDownListView = _strand.getBeadByType(IDropDownListView) as
IDropDownListView;
-            viewBead.popUpVisible = true;
             var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as
ISelectionModel;
-            var popUpModel:ISelectionModel = viewBead.popUp.getBeadByType(ISelectionModel)
as ISelectionModel;
+            var popUpModel:ISelectionModel = UIBase(viewBead.popUp).model as ISelectionModel;
             DisplayObject(viewBead.popUp).width = DisplayObject(_strand).width;
             popUpModel.dataProvider = selectionModel.dataProvider;
+            viewBead.popUpVisible = true; // adds to display list as well
             popUpModel.selectedIndex = selectionModel.selectedIndex;
             var pt:Point = new Point(DisplayObject(_strand).x, DisplayObject(_strand).y +
DisplayObject(_strand).height);
             pt = DisplayObject(_strand).parent.localToGlobal(pt);
@@ -94,7 +95,7 @@ package org.apache.flex.html.beads.controllers
             var viewBead:IDropDownListView = _strand.getBeadByType(IDropDownListView) as
IDropDownListView;
             viewBead.popUpVisible = false;
             var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as
ISelectionModel;
-            var popUpModel:ISelectionModel = viewBead.popUp.getBeadByType(ISelectionModel)
as ISelectionModel;
+            var popUpModel:ISelectionModel = UIBase(viewBead.popUp).model as ISelectionModel;
             selectionModel.selectedIndex = popUpModel.selectedIndex;
 			IEventDispatcher(_strand).dispatchEvent(new Event("change"));
         }


Mime
View raw message