royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [royale-asjs] branch develop updated: Jewel ComboBox PopUp refactor and clean code
Date Sat, 20 Oct 2018 14:10:31 GMT
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 6dcf4fb  Jewel ComboBox PopUp refactor and clean code
6dcf4fb is described below

commit 6dcf4fb2aa17d783618330cee53d0db8b5b9bda8
Author: Carlos Rovira <carlosrovira@apache.org>
AuthorDate: Sat Oct 20 16:10:24 2018 +0200

    Jewel ComboBox PopUp refactor and clean code
---
 .../projects/Jewel/src/main/resources/defaults.css |  6 +-
 .../Jewel/src/main/resources/jewel-manifest.xml    |  2 +-
 .../projects/Jewel/src/main/royale/JewelClasses.as |  3 +-
 .../jewel/beads/controllers/ComboBoxController.as  | 42 +++++------
 .../jewel/beads/controls/combobox/IComboBoxView.as |  4 +-
 .../royale/jewel/beads/views/ComboBoxPopUpView.as  | 83 ++++++++++++++++++++++
 .../royale/jewel/beads/views/ComboBoxView.as       | 66 ++++++++---------
 .../combobox/{ComboBoxList.as => ComboBoxPopUp.as} | 34 ++-------
 .../Jewel/src/main/sass/components/_combobox.sass  |  9 +--
 9 files changed, 158 insertions(+), 91 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index 87c8609..0449b7d 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -318,7 +318,7 @@ j|ComboBox {
   IBeadModel: ClassReference("org.apache.royale.jewel.beads.models.ComboBoxModel");
   IBeadView: ClassReference("org.apache.royale.jewel.beads.views.ComboBoxView");
   IBeadController: ClassReference("org.apache.royale.jewel.beads.controllers.ComboBoxController");
-  IPopUp: ClassReference("org.apache.royale.jewel.supportClasses.combobox.ComboBoxList");
+  IPopUp: ClassReference("org.apache.royale.jewel.supportClasses.combobox.ComboBoxPopUp");
 }
 
 .combobox-popup {
@@ -413,6 +413,10 @@ j|ComboBox {
     height: 34px;
   }
 }
+j|ComboBoxPopUp {
+  IBeadView: ClassReference("org.apache.royale.jewel.beads.views.ComboBoxPopUpView");
+}
+
 .jewel.datechooser .jewel.table .jewel.tableheadercell {
   padding: 12px 0px;
 }
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index 9a7e53a..11ef504 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -59,7 +59,7 @@
     <component id="List" class="org.apache.royale.jewel.List"/>
     <component id="DropDownList" class="org.apache.royale.jewel.DropDownList"/>
     <component id="ComboBox" class="org.apache.royale.jewel.ComboBox"/>
-    <component id="ComboBoxList" class="org.apache.royale.jewel.supportClasses.combobox.ComboBoxList"/>
+    <component id="ComboBoxPopUp" class="org.apache.royale.jewel.supportClasses.combobox.ComboBoxPopUp"/>
     <component id="Spacer" class="org.apache.royale.jewel.Spacer"/>
     <component id="DateChooser" class="org.apache.royale.jewel.DateChooser"/>
     <component id="DateField" class="org.apache.royale.jewel.DateField"/>
diff --git a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
index aece3cc..38e742f 100644
--- a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
+++ b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
@@ -62,6 +62,7 @@ package
         import org.apache.royale.jewel.beads.views.DateChooserView; DateChooserView;
         import org.apache.royale.jewel.beads.views.TableView; TableView;
         import org.apache.royale.jewel.beads.views.ComboBoxView; ComboBoxView;
+        import org.apache.royale.jewel.beads.views.ComboBoxPopUpView; ComboBoxPopUpView;
 		import org.apache.royale.jewel.beads.views.SnackbarView; SnackbarView;
 
         
@@ -91,7 +92,7 @@ package
         import org.apache.royale.jewel.supportClasses.datagrid.DataGridColumn; DataGridColumn;
         import org.apache.royale.jewel.supportClasses.datechooser.DateChooserTable; DateChooserTable;
         import org.apache.royale.jewel.supportClasses.table.TBodyContentArea; TBodyContentArea;
-        import org.apache.royale.jewel.supportClasses.combobox.ComboBoxList; ComboBoxList;
+        import org.apache.royale.jewel.supportClasses.combobox.ComboBoxPopUp; ComboBoxPopUp;
         import org.apache.royale.jewel.supportClasses.list.DataGroup; DataGroup;
         
         import org.apache.royale.jewel.supportClasses.util.positionInsideBoundingClientRect;
positionInsideBoundingClientRect;
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controllers/ComboBoxController.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controllers/ComboBoxController.as
index 8d33dc3..e8958b8 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controllers/ComboBoxController.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controllers/ComboBoxController.as
@@ -23,18 +23,15 @@ package org.apache.royale.jewel.beads.controllers
 		import flash.utils.setTimeout;
     }
 	import org.apache.royale.core.IBeadController;
+	import org.apache.royale.core.IComboBoxModel;
 	import org.apache.royale.core.IStrand;
-	import org.apache.royale.core.IUIBase;
 	import org.apache.royale.events.Event;
 	import org.apache.royale.events.IEventDispatcher;
 	import org.apache.royale.events.MouseEvent;
-	import org.apache.royale.jewel.beads.controls.combobox.IComboBoxView;
-	import org.apache.royale.jewel.beads.views.ListView;
 	import org.apache.royale.jewel.List;
-	import org.apache.royale.jewel.supportClasses.combobox.ComboBoxList;
-	import org.apache.royale.core.IComboBoxModel;
-	import org.apache.royale.core.ISelectionModel;
-	
+	import org.apache.royale.jewel.beads.controls.combobox.IComboBoxView;
+	import org.apache.royale.jewel.beads.views.ComboBoxPopUpView;
+	import org.apache.royale.jewel.supportClasses.combobox.ComboBoxPopUp;
 	
 	/**
 	 *  The ComboBoxController class is responsible for listening to
@@ -107,15 +104,17 @@ package org.apache.royale.jewel.beads.controllers
 			
 			viewBead.popUpVisible = true;
 			
-			IEventDispatcher(viewBead.popup.list).addEventListener(Event.CHANGE, changeHandler);
-
-			// viewBead.popup is ComboBoxList that fills 100% of browser window-> We want List
inside
-			list = (viewBead.popup as ComboBoxList).list;
-
-			IEventDispatcher(list).addEventListener(MouseEvent.MOUSE_DOWN, handleControlMouseDown);
-			IUIBase(viewBead.popup).addEventListener(MouseEvent.MOUSE_DOWN, removePopUpWhenClickOutside);
+			// viewBead.popup is ComboBoxPopUp that fills 100% of browser window-> We want List
inside its view
+			popup = viewBead.popup as ComboBoxPopUp;
+			popup.addEventListener(MouseEvent.MOUSE_DOWN, removePopUpWhenClickOutside);
+			
+			list = (popup.view as ComboBoxPopUpView).list;
+			list.addEventListener(MouseEvent.MOUSE_DOWN, handleControlMouseDown);
+			list.addEventListener(Event.CHANGE, changeHandler);
 		}
 
+		private var popup:ComboBoxPopUp;
+
 		protected function handleControlMouseDown(event:MouseEvent):void
 		{
 			event.stopImmediatePropagation();
@@ -126,9 +125,9 @@ package org.apache.royale.jewel.beads.controllers
 		 */
 		protected function removePopUpWhenClickOutside(event:MouseEvent = null):void
 		{
-			IEventDispatcher(list).removeEventListener(MouseEvent.MOUSE_DOWN, handleControlMouseDown);
-			IUIBase(viewBead.popup).removeEventListener(MouseEvent.MOUSE_DOWN, removePopUpWhenClickOutside);
-			IEventDispatcher(viewBead.popup.list).removeEventListener(Event.CHANGE, changeHandler);
+			popup.removeEventListener(MouseEvent.MOUSE_DOWN, removePopUpWhenClickOutside);
+			list.removeEventListener(MouseEvent.MOUSE_DOWN, handleControlMouseDown);
+			list.removeEventListener(Event.CHANGE, changeHandler);
 			viewBead.popUpVisible = false;
 		}
 		
@@ -139,11 +138,12 @@ package org.apache.royale.jewel.beads.controllers
 		private function changeHandler(event:Event):void
 		{
 			event.stopImmediatePropagation();
-			IEventDispatcher(list).removeEventListener(MouseEvent.MOUSE_DOWN, handleControlMouseDown);
-			IUIBase(viewBead.popup).removeEventListener(MouseEvent.MOUSE_DOWN, removePopUpWhenClickOutside);
-			IEventDispatcher(viewBead.popup.list).removeEventListener(Event.CHANGE, changeHandler);
+			
+			popup.removeEventListener(MouseEvent.MOUSE_DOWN, removePopUpWhenClickOutside);
+			list.removeEventListener(MouseEvent.MOUSE_DOWN, handleControlMouseDown);
+			list.removeEventListener(Event.CHANGE, changeHandler);
 
-			model.selectedItem = ISelectionModel(viewBead.popup.list.getBeadByType(ISelectionModel)).selectedItem;
+			model.selectedItem = IComboBoxModel(list.getBeadByType(IComboBoxModel)).selectedItem;
 			viewBead.popUpVisible = false;
 			
 			IEventDispatcher(_strand).dispatchEvent(new Event(Event.CHANGE));
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/combobox/IComboBoxView.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/combobox/IComboBoxView.as
index b740dc7..8803f3c 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/combobox/IComboBoxView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/combobox/IComboBoxView.as
@@ -53,7 +53,9 @@ package org.apache.royale.jewel.beads.controls.combobox
 		function get button():Object;
 		
 		/**
-		 *  The component housing the selection list.
+		 *  The component housing the selection list. The main component must be a placeholder
+		 *  that support responsiveness and holds a subcomponent that parents the list or other
possible
+		 *  components needed in other implementations.
 		 *
 		 *  @langversion 3.0
 		 *  @playerversion Flash 10.2
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxPopUpView.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxPopUpView.as
new file mode 100644
index 0000000..c870dea
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxPopUpView.as
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.beads.views
+{
+    import org.apache.royale.core.BeadViewBase;
+    import org.apache.royale.core.IBeadModel;
+    import org.apache.royale.core.IParent;
+    import org.apache.royale.core.IStrand;
+    import org.apache.royale.jewel.List;
+
+    /**
+	 * The ComboBoxPopUpView class is a view bead for the ComboBoxPopUp.
+     * 
+     * This class creates a list that will be pop up when the combo box needs
+     * to show the associated list
+     * 
+	 * @viewbead	 
+	 */
+	public class ComboBoxPopUpView extends BeadViewBase
+	{
+		/**
+		 *  constructor
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.4
+		 */
+		public function ComboBoxPopUpView()
+		{
+			super();
+		}
+        
+        /**
+         *  Get the strand for this bead
+         * 
+         *  @copy org.apache.royale.core.IBead#strand
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.4
+         */
+        override public function set strand(value:IStrand):void
+		{
+            _strand = value;
+            
+            var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
+
+            _list = new List();
+            _list.model = model;
+            
+            IParent(_strand).addElement(_list);
+		}
+
+        private var _list:List;
+
+        public function get list():List
+        {
+        	return _list;
+        }
+        public function set list(value:List):void
+        {
+        	_list = value;
+        }
+    }
+}
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxView.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxView.as
index 50685e0..8d7aecb 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxView.as
@@ -23,21 +23,21 @@ package org.apache.royale.jewel.beads.views
 		import flash.utils.setTimeout;
     }
 	import org.apache.royale.core.BeadViewBase;
-	import org.apache.royale.core.IUIBase;
+	import org.apache.royale.core.IComboBoxModel;
+	import org.apache.royale.core.IPopUpHost;
 	import org.apache.royale.core.IStrand;
+	import org.apache.royale.core.IUIBase;
 	import org.apache.royale.core.StyledUIBase;
 	import org.apache.royale.core.ValuesManager;
-	import org.apache.royale.core.IPopUpHost;
-	import org.apache.royale.core.IComboBoxModel;
-	import org.apache.royale.events.IEventDispatcher;
 	import org.apache.royale.events.Event;
+	import org.apache.royale.events.IEventDispatcher;
 	import org.apache.royale.geom.Point;
-	import org.apache.royale.jewel.TextInput;
+	import org.apache.royale.jewel.beads.controls.combobox.IComboBoxView;
 	import org.apache.royale.jewel.Button;
 	import org.apache.royale.jewel.List;
-	import org.apache.royale.jewel.beads.controls.combobox.IComboBoxView;
+	import org.apache.royale.jewel.TextInput;
 	import org.apache.royale.jewel.supportClasses.util.getLabelFromData;
-	import org.apache.royale.jewel.supportClasses.combobox.ComboBoxList;
+	import org.apache.royale.jewel.supportClasses.combobox.ComboBoxPopUp;
 	import org.apache.royale.jewel.supportClasses.ResponsiveSizes;
 	import org.apache.royale.jewel.supportClasses.util.positionInsideBoundingClientRect;
 	import org.apache.royale.utils.UIUtils;
@@ -64,7 +64,7 @@ package org.apache.royale.jewel.beads.views
 		/**
 		 *  The TextInput component of the ComboBox.
 		 * 
-		 *  @copy org.apache.royale.html.beads.IComboBoxView#text
+		 *  @copy org.apache.royale.jewel.beads.controls.combobox.IComboBoxView#textinput
 		 *
 		 *  @langversion 3.0
 		 *  @playerversion Flash 10.2
@@ -80,7 +80,7 @@ package org.apache.royale.jewel.beads.views
 		/**
 		 *  The Button component of the ComboBox.
 		 * 
-		 *  @copy org.apache.royale.html.beads.IComboBoxView#text
+		 *  @copy org.apache.royale.jewel.beads.controls.combobox.IComboBoxView#button
 		 *
 		 *  @langversion 3.0
 		 *  @playerversion Flash 10.2
@@ -92,13 +92,13 @@ package org.apache.royale.jewel.beads.views
 			return _button;
 		}
 		
-		private var _combolist:ComboBoxList;
+		private var _comboPopUp:ComboBoxPopUp;
 		private var _list:List;
 		
 		/**
 		 *  The pop-up list component of the ComboBox.
 		 * 
-		 *  @copy org.apache.royale.html.beads.IComboBoxView#text
+		 *  @copy org.apache.royale.jewel.beads.controls.combobox.IComboBoxView#popup
 		 *
 		 *  @langversion 3.0
 		 *  @playerversion Flash 10.2
@@ -107,7 +107,7 @@ package org.apache.royale.jewel.beads.views
 		 */
 		public function get popup():Object
 		{
-			return _combolist;
+			return _comboPopUp;
 		}
 		
 		/**
@@ -131,22 +131,21 @@ package org.apache.royale.jewel.beads.views
 			host.addElement(_textinput);
 			host.addElement(_button);
 			
-			var model:IComboBoxModel = _strand.getBeadByType(IComboBoxModel) as IComboBoxModel;
+			model = _strand.getBeadByType(IComboBoxModel) as IComboBoxModel;
 			model.addEventListener("selectedIndexChanged", handleItemChange);
 			model.addEventListener("selectedItemChanged", handleItemChange);
 			model.addEventListener("dataProviderChanged", itemChangeAction);
 			
 			IEventDispatcher(_strand).addEventListener("sizeChanged", handleSizeChange);
-			
-			// set initial value and positions using default sizes
-			//itemChangeAction();
-			//sizeChangeAction();
 		}
+
+		private var model:IComboBoxModel;
 		
+		private var _popUpClass:Class;
 		/**
 		 *  Returns whether or not the pop-up is visible.
 		 * 
-		 *  @copy org.apache.royale.html.beads.IComboBoxView#text
+		 *  @copy org.apache.royale.jewel.beads.controls.combobox.IComboBoxView#popUpVisible
 		 *
 		 *  @langversion 3.0
 		 *  @playerversion Flash 10.2
@@ -155,7 +154,7 @@ package org.apache.royale.jewel.beads.views
 		 */
 		public function get popUpVisible():Boolean
 		{
-			return _combolist == null ? false : true;
+			return _comboPopUp == null ? false : true;
 		}
 		/**
 		 * @royaleignorecoercion org.apache.royale.core.IComboBoxModel
@@ -164,18 +163,19 @@ package org.apache.royale.jewel.beads.views
 		public function set popUpVisible(value:Boolean):void
 		{
 			if (value) {
-				var popUpClass:Class = ValuesManager.valuesImpl.getValue(_strand, "iPopUp") as Class;
-				_combolist = new popUpClass() as ComboBoxList;
-				
-				var model:IComboBoxModel = _strand.getBeadByType(IComboBoxModel) as IComboBoxModel;
-				_combolist.model = model;
-				_combolist.list.model = _combolist.model;
+				if(!_popUpClass)
+				{
+					_popUpClass = ValuesManager.valuesImpl.getValue(_strand, "iPopUp") as Class;
+				}
+				_comboPopUp = new _popUpClass() as ComboBoxPopUp;
+				_comboPopUp.model = model;
 
 				var popupHost:IPopUpHost = UIUtils.findPopUpHost(_strand as IUIBase);
-				popupHost.popUpParent.addElement(_combolist);
+				popupHost.popUpParent.addElement(_comboPopUp);
 				
-				// popup is ComboBoxList that fills 100% of browser window-> We want the internal
List inside to adjust height
-				_list = _combolist.list;
+				// popup is ComboBoxPopUp that fills 100% of browser window-> We want the internal
List inside its view to adjust height
+				_list = (_comboPopUp.view as ComboBoxPopUpView).list;
+				// _list.model = _comboPopUp.model;
 				
 				setTimeout(prepareForPopUp,  300);
 
@@ -186,14 +186,14 @@ package org.apache.royale.jewel.beads.views
 
 				autoResizeHandler();
 			}
-			else if(_combolist != null) {
-				UIUtils.removePopUp(_combolist);
+			else if(_comboPopUp != null) {
+				UIUtils.removePopUp(_comboPopUp);
 				COMPILE::JS
 				{
 				document.body.classList.remove("viewport");
 				window.removeEventListener('resize', autoResizeHandler, false);
 				}
-				_combolist = null;
+				_comboPopUp = null;
 			}
 		}
 
@@ -201,7 +201,7 @@ package org.apache.royale.jewel.beads.views
         {
 			COMPILE::JS
 			{
-				_combolist.element.classList.add("open");
+				_comboPopUp.element.classList.add("open");
 				//avoid scroll in html
 				document.body.classList.add("viewport");
 			}
@@ -265,7 +265,7 @@ package org.apache.royale.jewel.beads.views
 			host.width = _textinput.width + _button.width;
 		}
 
-		private var comboList:ComboBoxList;
+		protected var comboList:ComboBoxPopUp;
 		/**
 		 *  Adapt the popup list to the right position taking into account
 		 *  if we are in DESKTOP screen size or in PHONE/TABLET screen size
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/combobox/ComboBoxList.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/combobox/ComboBoxPopUp.as
similarity index 85%
rename from frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/combobox/ComboBoxList.as
rename to frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/combobox/ComboBoxPopUp.as
index 0113349..518b04f 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/combobox/ComboBoxList.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/combobox/ComboBoxPopUp.as
@@ -22,7 +22,6 @@ package org.apache.royale.jewel.supportClasses.combobox
     import org.apache.royale.core.IPopUp;
     import org.apache.royale.core.ISelectionModel;
     import org.apache.royale.core.StyledUIBase;
-    import org.apache.royale.jewel.List;
     
     //--------------------------------------
     //  Events
@@ -39,7 +38,7 @@ package org.apache.royale.jewel.supportClasses.combobox
     [Event(name="change", type="org.apache.royale.events.Event")]
     
     /**
-     *  The ComboBoxList class is the List class used internally
+     *  The ComboBoxPopUp class is the popup that holds the List used internally
      *  by ComboBox as the dropdown/popup.
      *  
      *  @langversion 3.0
@@ -47,7 +46,7 @@ package org.apache.royale.jewel.supportClasses.combobox
      *  @playerversion AIR 2.6
      *  @productversion Royale 0.9.4
      */
-	public class ComboBoxList extends StyledUIBase implements IPopUp
+	public class ComboBoxPopUp extends StyledUIBase implements IPopUp
 	{
         /**
          *  Constructor.
@@ -57,35 +56,12 @@ package org.apache.royale.jewel.supportClasses.combobox
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.9.4
          */
-		public function ComboBoxList()
+		public function ComboBoxPopUp()
 		{
 			super();
-            typeNames = "combobox-popup"
-
-            _list = new List();
-        }
-
-        /**
-		 * @private
-		 */
-		override public function addedToParent():void
-		{
-            super.addedToParent();
-            addElement(_list);
+            typeNames = "combobox-popup";
         }
-
-        private var _list:List;
-
-        public function get list():List
-        {
-        	return _list;
-        }
-
-        public function set list(value:List):void
-        {
-        	_list = value;
-        }
-
+		
         /**
 		 *  The data for display by the ComboBox.
 		 *
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_combobox.sass b/frameworks/projects/Jewel/src/main/sass/components/_combobox.sass
index 80d88e0..f0602d5 100644
--- a/frameworks/projects/Jewel/src/main/sass/components/_combobox.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_combobox.sass
@@ -56,10 +56,10 @@ j|ComboBox
     IBeadModel: ClassReference("org.apache.royale.jewel.beads.models.ComboBoxModel")
     IBeadView: ClassReference("org.apache.royale.jewel.beads.views.ComboBoxView")
     IBeadController: ClassReference("org.apache.royale.jewel.beads.controllers.ComboBoxController")
-    IPopUp: ClassReference("org.apache.royale.jewel.supportClasses.combobox.ComboBoxList")
+    IPopUp: ClassReference("org.apache.royale.jewel.supportClasses.combobox.ComboBoxPopUp")
 
 
-// ComboBoxList variables
+// ComboBoxPopUp variables
 $combobox-popup-margin-offset: 10px
 $combobox-popup-overlay-color: #000 !default
 $combobox-popup-overlay-opacity: .65 !default
@@ -170,10 +170,11 @@ $combobox-item-min-heigh: 34px
 
 
 // this is a StyledUIBase with a List inside
-j|ComboBoxList
+j|ComboBoxPopUp
+    IBeadView: ClassReference("org.apache.royale.jewel.beads.views.ComboBoxPopUpView")
 
 
 // @media -royale-swf
-//     j|ComboBoxList
+//     j|ComboBoxPopUp
 //         IBackgroundBead: ClassReference('org.apache.royale.html.beads.SolidBackgroundBead')
 	
\ No newline at end of file


Mime
View raw message