flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject [1/2] git commit: [flex-asjs] [refs/heads/develop] - Fairly big change to the Container structure: removed the "chrome" concept in favor of letting "advanced" components have access to the strand-as-parent.
Date Fri, 18 Sep 2015 18:30:58 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 58dee53bc -> 031ad2e79


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
index f7bf57d..5bd1159 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
@@ -21,7 +21,7 @@ package org.apache.flex.html.beads.layouts
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IItemRendererClassFactory;
 	import org.apache.flex.core.IItemRendererParent;
-	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.ILayoutHost;
 	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.ISelectableItemRenderer;
 	import org.apache.flex.core.ISelectionModel;
@@ -100,7 +100,7 @@ package org.apache.flex.html.beads.layouts
 		 */
 		public function layout():Boolean
 		{
-			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
+			var layoutParent:ILayoutHost = _strand.getBeadByType(ILayoutHost) as ILayoutHost;
 			var contentView:IParentIUIBase = layoutParent.contentView as IParentIUIBase;
 			var itemRendererParent:IItemRendererParent = contentView as IItemRendererParent;
 			var viewportModel:IViewportModel = (layoutParent as ButtonBarView).viewportModel;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as
b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as
index 58ed8f6..bd5de61 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as
@@ -21,7 +21,7 @@ package org.apache.flex.html.beads.layouts
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.ILayoutChild;
-	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.ILayoutHost;
 	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
@@ -82,7 +82,7 @@ package org.apache.flex.html.beads.layouts
 		public function layout():Boolean
 		{
             //trace(DOMPathUtil.getPath(host), event ? event.type : "fixed size");
-			var layoutParent:ILayoutParent = host.getBeadByType(ILayoutParent) as ILayoutParent;
+			var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
 			var contentView:IParentIUIBase = layoutParent.contentView;
             var padding:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/TileLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/TileLayout.as
b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/TileLayout.as
index 87a4cc0..5b51149 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/TileLayout.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/TileLayout.as
@@ -19,7 +19,7 @@
 package org.apache.flex.html.beads.layouts
 {	
 	import org.apache.flex.core.IBeadLayout;
-	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.ILayoutHost;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.UIBase;
@@ -132,7 +132,7 @@ package org.apache.flex.html.beads.layouts
 		{
 			// this is where the layout is calculated
 			var host:UIBase = _strand as UIBase;
-			var p:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
+			var p:ILayoutHost = _strand.getBeadByType(ILayoutHost) as ILayoutHost;
 			var area:UIBase = p.contentView as UIBase;
 			
 			var xpos:Number = 0;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
index 675a586..7b432e7 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
@@ -21,7 +21,7 @@ package org.apache.flex.html.beads.layouts
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.ILayoutChild;
-	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.ILayoutHost;
 	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
@@ -78,7 +78,7 @@ package org.apache.flex.html.beads.layouts
 		
 		public function layout():Boolean
 		{
-			var layoutParent:ILayoutParent = host.getBeadByType(ILayoutParent) as ILayoutParent;
+			var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
 			var contentView:IParentIUIBase = layoutParent ? layoutParent.contentView : IParentIUIBase(host);
             var padding:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/as/src/org/apache/flex/html/supportClasses/ScrollingViewport.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/supportClasses/ScrollingViewport.as
b/frameworks/projects/HTML/as/src/org/apache/flex/html/supportClasses/ScrollingViewport.as
index 8c8fb76..2de82b1 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/supportClasses/ScrollingViewport.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/supportClasses/ScrollingViewport.as
@@ -23,6 +23,7 @@ package org.apache.flex.html.supportClasses
 	import org.apache.flex.core.IBead;
     import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IParentIUIBase;
+	import org.apache.flex.core.IContentViewHost;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.IViewport;
@@ -112,14 +113,14 @@ package org.apache.flex.html.supportClasses
                 {
                     if (_verticalScroller == null) {
                         _verticalScroller = createVerticalScrollBar();
-                        host.addElement(_verticalScroller, false);
+						(host as IContentViewHost).strandChildren.addElement(_verticalScroller);
                     }
                 }
                 if (needH)
                 {
                     if (_horizontalScroller == null) {
                         _horizontalScroller = createHorizontalScrollBar();
-                        host.addElement(_horizontalScroller, false);
+						(host as IContentViewHost).strandChildren.addElement(_horizontalScroller);
                     }
                 }
                 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/asjs/src/org/apache/flex/html/MXMLBeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/MXMLBeadViewBase.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/MXMLBeadViewBase.as
index 4d86573..4f871a2 100644
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/MXMLBeadViewBase.as
+++ b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/MXMLBeadViewBase.as
@@ -21,7 +21,7 @@ package org.apache.flex.html
 	import org.apache.flex.states.State;
 	
 	import org.apache.flex.core.IBead;
-    import org.apache.flex.core.ILayoutParent;
+    import org.apache.flex.core.ILayoutHost;
     import org.apache.flex.core.IParent;
 	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IStrand;
@@ -44,7 +44,7 @@ package org.apache.flex.html
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class MXMLBeadViewBase extends ContainerView implements IStrand, ILayoutParent
+	public class MXMLBeadViewBase extends ContainerView implements IStrand, ILayoutHost
 	{
         /**
          *  Constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
index 5885678..4198fea 100644
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
+++ b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
@@ -20,7 +20,7 @@ package org.apache.flex.html.beads.layouts
 {
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.ILayoutChild;
-    import org.apache.flex.core.ILayoutParent;
+    import org.apache.flex.core.ILayoutHost;
 	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
@@ -130,7 +130,7 @@ package org.apache.flex.html.beads.layouts
          */
 		public function layout():Boolean
 		{
-			var layoutParent:ILayoutParent = host.getBeadByType(ILayoutParent) as ILayoutParent;
+			var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
 			var contentView:IParentIUIBase = layoutParent.contentView as IParentIUIBase;
             var padding:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
             var hostSizedToContent:Boolean = host.isHeightSizedToContent();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
index 401e417..309ef3b 100644
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
+++ b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
@@ -21,7 +21,7 @@ package org.apache.flex.html.beads.layouts
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IDocument;
 	import org.apache.flex.core.ILayoutChild;
-	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.ILayoutHost;
 	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
@@ -148,7 +148,7 @@ package org.apache.flex.html.beads.layouts
          */
 		public function layout():Boolean
 		{
-            var layoutParent:ILayoutParent = host.getBeadByType(ILayoutParent) as ILayoutParent;
+            var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
             var contentView:IParentIUIBase = layoutParent ? layoutParent.contentView : IParentIUIBase(host);
             var padding:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
             actualChild = document[flexibleChild];

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
index e06df50..77af305 100644
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
+++ b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
@@ -21,7 +21,7 @@ package org.apache.flex.html.beads.layouts
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IDocument;
 	import org.apache.flex.core.ILayoutChild;
-	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.ILayoutHost;
 	import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
@@ -147,7 +147,7 @@ package org.apache.flex.html.beads.layouts
          */
 		public function layout():Boolean
 		{
-            var layoutParent:ILayoutParent = host.getBeadByType(ILayoutParent) as ILayoutParent;
+            var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
             var contentView:IParentIUIBase = layoutParent ? layoutParent.contentView : IParentIUIBase(host);
             var padding:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
 			actualChild = document[flexibleChild];

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
index 122f9b3..885eb80 100644
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
+++ b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
@@ -20,7 +20,7 @@ package org.apache.flex.html.beads.layouts
 {	
 	import org.apache.flex.core.IBeadLayout;
 	import org.apache.flex.core.IContainer;
-	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.ILayoutHost;
 	import org.apache.flex.core.IMeasurementBead;
 	import org.apache.flex.core.IParent;
 	import org.apache.flex.core.IStrand;
@@ -98,7 +98,7 @@ package org.apache.flex.html.beads.layouts
 		public function layout():Boolean
 		{			
             var host:UIBase = UIBase(_strand);
-            var layoutParent:ILayoutParent = host.getBeadByType(ILayoutParent) as ILayoutParent;
+            var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
             var contentView:IParent = layoutParent.contentView;
             var padding:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
 			var sw:Number = host.width;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/basic-manifest.xml b/frameworks/projects/HTML/basic-manifest.xml
index acfdaa2..b2f6a19 100644
--- a/frameworks/projects/HTML/basic-manifest.xml
+++ b/frameworks/projects/HTML/basic-manifest.xml
@@ -54,7 +54,7 @@
     <component id="HorizontalLayout" class="org.apache.flex.html.beads.layouts.HorizontalLayout"/>
     <component id="TileLayout" class="org.apache.flex.html.beads.layouts.TileLayout"/>
     <component id="ListView" class="org.apache.flex.html.beads.ListView"/>
-    <component id="ListViewNoSelectionState" class="org.apache.flex.html.beads.ListViewNoSelectionState"/>
+    <!-- component id="ListViewNoSelectionState" class="org.apache.flex.html.beads.ListViewNoSelectionState"/
-->
     <component id="MultilineTextFieldView" class="org.apache.flex.html.beads.MultilineTextFieldView"/>
     
     <component id="SimpleAlert" class="org.apache.flex.html.SimpleAlert"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/js/src/org/apache/flex/html/List.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/List.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/List.js
index e214ebf..7c44d8a 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/List.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/List.js
@@ -21,6 +21,7 @@ goog.require('org.apache.flex.core.IListPresentationModel');
 goog.require('org.apache.flex.core.ItemRendererClassFactory');
 goog.require('org.apache.flex.core.ListBase');
 goog.require('org.apache.flex.core.ValuesManager');
+goog.require('org.apache.flex.events.Event');
 goog.require('org.apache.flex.html.beads.ListView');
 goog.require('org.apache.flex.html.beads.TextItemRendererFactoryForArrayData');
 goog.require('org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController');
@@ -143,6 +144,8 @@ org.apache.flex.html.List.prototype.addedToParent =
     itemRendererFactory = new m2();
     this.addBead(itemRendererFactory);
   }
+
+  this.dispatchEvent(new org.apache.flex.events.Event('initComplete'));
 };
 
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/js/src/org/apache/flex/html/NumericStepper.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/NumericStepper.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/NumericStepper.js
index 25a3e94..a9ddbc4 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/NumericStepper.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/NumericStepper.js
@@ -15,6 +15,7 @@
 goog.provide('org.apache.flex.html.NumericStepper');
 
 goog.require('org.apache.flex.core.UIBase');
+goog.require('org.apache.flex.events.Event');
 goog.require('org.apache.flex.html.Spinner');
 goog.require('org.apache.flex.html.TextInput');
 goog.require('org.apache.flex.html.beads.models.RangeModel');

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
index be440cd..db88a86 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
@@ -16,7 +16,7 @@ goog.provide('org.apache.flex.html.beads.ContainerView');
 
 goog.require('org.apache.flex.core.BeadViewBase');
 goog.require('org.apache.flex.core.IBeadLayout');
-goog.require('org.apache.flex.core.ILayoutParent');
+goog.require('org.apache.flex.core.ILayoutHost');
 goog.require('org.apache.flex.core.IViewport');
 goog.require('org.apache.flex.core.IViewportModel');
 goog.require('org.apache.flex.geom.Rectangle');
@@ -27,6 +27,7 @@ goog.require('org.apache.flex.utils.CSSContainerUtils');
 /**
  * @constructor
  * @extends {org.apache.flex.core.BeadViewBase}
+ * @implements {org.apache.flex.core.ILayoutHost}
  */
 org.apache.flex.html.beads.ContainerView = function() {
   this.lastSelectedIndex = -1;
@@ -48,7 +49,7 @@ goog.inherits(
 org.apache.flex.html.beads.ContainerView.prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'ContainerView',
                 qName: 'org.apache.flex.html.beads.ContainerView' }],
-    interfaces: [org.apache.flex.core.ILayoutParent]
+    interfaces: [org.apache.flex.core.ILayoutHost]
     };
 
 
@@ -300,6 +301,72 @@ org.apache.flex.html.beads.ContainerView.
 };
 
 
+/**
+ * @expose
+ * @return {number} The count of the elements in this object.
+ */
+org.apache.flex.html.beads.ContainerView.prototype.numElements =
+  function() {
+  return this.contentView.numElements();
+};
+
+
+/**
+ * @expose
+ * @param {Object} c The element being added.
+ * @param {boolean=} opt_dispatchEvent If true and event is dispatched.
+ */
+org.apache.flex.html.beads.ContainerView.prototype.addElement =
+  function(c, opt_dispatchEvent) {
+  this.contentView.addElement(c, opt_dispatchEvent);
+};
+
+
+/**
+ * @expose
+ * @param {Object} c The element being added.
+ * @param {number} index The index of the new element.
+ * @param {boolean=} opt_dispatchEvent If true and event is dispatched.
+ */
+org.apache.flex.html.beads.ContainerView.prototype.addElementAt =
+  function(c, index, opt_dispatchEvent) {
+  this.contentView.addElementAt(c, index, opt_dispatchEvent);
+};
+
+
+/**
+ * @expose
+ * @param {Object} c The element being removed.
+ * @param {boolean=} opt_dispatchEvent If true and event is dispatched.
+ */
+org.apache.flex.html.beads.ContainerView.prototype.removeElement =
+  function(c, opt_dispatchEvent) {
+  this.contentView.removeElement(c, opt_dispatchEvent);
+};
+
+
+/**
+ * @expose
+ * @param {Object} c The element whose index is sought.
+ * @return {number} The index of the given element.
+ */
+org.apache.flex.html.beads.ContainerView.prototype.getElementIndex =
+  function(c) {
+  return this.contentView.getElementIndex(c);
+};
+
+
+/**
+ * @expose
+ * @param {number} index The index of the element.
+ * @return {Object} The element at the given index.
+ */
+org.apache.flex.html.beads.ContainerView.prototype.getElementAt =
+  function(index) {
+  return this.contentView.getElementAt(index);
+};
+
+
 Object.defineProperties(org.apache.flex.html.beads.ContainerView.prototype, {
     /** @export */
     contentView: {
@@ -324,8 +391,7 @@ Object.defineProperties(org.apache.flex.html.beads.ContainerView.prototype,
{
         set: function(value) {
             org.apache.flex.utils.Language.superSetter(org.apache.flex.html.beads.ContainerView,
this, 'strand', value);
             this.createViewport();
-            this.host.addElement(this.viewport.contentView);
-            this.host.setActualParent(this.viewport.contentView);
+            this.host.strandChildren.addElement(this.viewport.contentView, false);
             this._strand.addEventListener('initComplete',
                   org.apache.flex.utils.Language.closure(this.initCompleteHandler, this,
'initCompleteHandler'));
          }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
index 3965772..f0e02b7 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
@@ -81,7 +81,7 @@ Object.defineProperties(org.apache.flex.html.beads.PanelView.prototype,
{
             this.titleBar_.id = 'panelTitleBar';
             this.titleBar_.model = value.model;
             this.titleBarAdded_ = true;
-            value.addElement(this.titleBar_);
+            value.strandChildren.addElement(this.titleBar_);
 
 //            this._strand.controlBar =
 //                new org.apache.flex.html.ControlBar();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicLayout.js
b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicLayout.js
index 80f0f42..4a7401b 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicLayout.js
@@ -16,6 +16,7 @@ goog.provide('org.apache.flex.html.beads.layouts.BasicLayout');
 
 goog.require('org.apache.flex.core.IBeadLayout');
 goog.require('org.apache.flex.core.ILayoutChild');
+goog.require('org.apache.flex.core.ILayoutHost');
 goog.require('org.apache.flex.core.ValuesManager');
 goog.require('org.apache.flex.utils.Language');
 
@@ -62,7 +63,7 @@ org.apache.flex.html.beads.layouts.BasicLayout.
     prototype.layout = function() {
   var i, n, h, w;
 
-  var viewBead = this.strand_.getBeadByType(org.apache.flex.core.ILayoutParent);
+  var viewBead = this.strand_.getBeadByType(org.apache.flex.core.ILayoutHost);
   var contentView = viewBead.contentView;
   w = contentView.width;
   var hasWidth = !this.strand_.isWidthSizedToContent();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
index e6e1ee3..04a3292 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
@@ -15,6 +15,7 @@
 goog.provide('org.apache.flex.html.beads.layouts.ButtonBarLayout');
 
 goog.require('org.apache.flex.core.IBeadLayout');
+goog.require('org.apache.flex.core.ILayoutHost');
 goog.require('org.apache.flex.html.beads.ListView');
 
 
@@ -74,7 +75,7 @@ Object.defineProperties(org.apache.flex.html.beads.layouts.ButtonBarLayout.proto
 org.apache.flex.html.beads.layouts.ButtonBarLayout.
     prototype.layout = function() {
 
-  var layoutParent = this.strand_.getBeadByType(org.apache.flex.core.ILayoutParent);
+  var layoutParent = this.strand_.getBeadByType(org.apache.flex.core.ILayoutHost);
   var contentView = layoutParent.contentView;
   var itemRendererParent = contentView;
   var viewportModel = layoutParent.viewportModel;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/HorizontalLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/HorizontalLayout.js
b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/HorizontalLayout.js
index efc75d0..222b2e7 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/HorizontalLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/HorizontalLayout.js
@@ -15,6 +15,7 @@
 goog.provide('org.apache.flex.html.beads.layouts.HorizontalLayout');
 
 goog.require('org.apache.flex.core.IBeadLayout');
+goog.require('org.apache.flex.core.ILayoutHost');
 
 
 
@@ -61,7 +62,7 @@ org.apache.flex.html.beads.layouts.HorizontalLayout.
     prototype.layout = function() {
   var children, i, n;
 
-  var viewBead = this.strand_.getBeadByType(org.apache.flex.core.ILayoutParent);
+  var viewBead = this.strand_.getBeadByType(org.apache.flex.core.ILayoutHost);
   var contentView = viewBead.contentView;
   children = contentView.internalChildren();
   var hasHeight = !this.strand_.isHeightSizedToContent();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/TileLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/TileLayout.js
b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/TileLayout.js
index 6a8b7e6..a27b630 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/TileLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/TileLayout.js
@@ -15,7 +15,7 @@
 goog.provide('org.apache.flex.html.beads.layouts.TileLayout');
 
 goog.require('org.apache.flex.core.IBeadLayout');
-goog.require('org.apache.flex.core.ILayoutParent');
+goog.require('org.apache.flex.core.ILayoutHost');
 
 
 
@@ -94,7 +94,7 @@ org.apache.flex.html.beads.layouts.TileLayout.
   var children, i, n, child;
   var xpos, ypos, useWidth, useHeight;
 
-  var viewBead = this.strand_.getBeadByType(org.apache.flex.core.ILayoutParent);
+  var viewBead = this.strand_.getBeadByType(org.apache.flex.core.ILayoutHost);
   var contentView = viewBead.contentView;
   children = contentView.internalChildren();
   n = children.length;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/031ad2e7/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalLayout.js
b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalLayout.js
index 4d7645e..5627202 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalLayout.js
@@ -15,6 +15,7 @@
 goog.provide('org.apache.flex.html.beads.layouts.VerticalLayout');
 
 goog.require('org.apache.flex.core.IBeadLayout');
+goog.require('org.apache.flex.core.ILayoutHost');
 goog.require('org.apache.flex.utils.Language');
 
 
@@ -64,7 +65,7 @@ org.apache.flex.html.beads.layouts.VerticalLayout.
     prototype.layout = function() {
   var children, i, n;
 
-  var viewBead = this.strand_.getBeadByType(org.apache.flex.core.ILayoutParent);
+  var viewBead = this.strand_.getBeadByType(org.apache.flex.core.ILayoutHost);
   var contentView = viewBead.contentView;
   children = contentView.internalChildren();
   var scv = getComputedStyle(this.strand_.positioner);


Mime
View raw message