You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2017/08/30 20:27:20 UTC

git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] - Added drawing layer beads to enable the drop indicator to have a place outside of the itemRenderer space.

Repository: flex-asjs
Updated Branches:
  refs/heads/feature/dragAndDrop 2443273b6 -> 06213a0c1


Added drawing layer beads to enable the drop indicator to have a place outside of the itemRenderer space.


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

Branch: refs/heads/feature/dragAndDrop
Commit: 06213a0c167513327e0a80bd154d33674cd9783d
Parents: 2443273
Author: Peter Ent <pe...@apache.org>
Authored: Wed Aug 30 16:27:17 2017 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Wed Aug 30 16:27:17 2017 -0400

----------------------------------------------------------------------
 .../Basic/src/main/flex/BasicClasses.as         |   1 +
 .../flex/html/beads/DataGridPercentageView.as   |   3 +-
 .../org/apache/flex/html/beads/DataGridView.as  |   3 +-
 .../org/apache/flex/html/beads/IDataGridView.as |   6 +-
 .../Basic/src/main/resources/defaults.css       |   2 +-
 .../flex/org/apache/flex/utils/PointUtils.as    |   2 +-
 .../DragDrop/src/main/flex/DragDropClasses.as   |   8 +-
 .../flex/html/beads/DataGridDrawingLayerBead.as | 103 ++++++++++++++
 .../beads/DataGridWithDrawingLayerLayout.as     | 117 ++++++++++++++++
 .../apache/flex/html/beads/DragDropListView.as  | 134 +++++++++++++++++++
 .../apache/flex/html/beads/IDrawingLayerBead.as |  45 +++++++
 .../flex/html/beads/ListDrawingLayerBead.as     |  97 ++++++++++++++
 .../SingleSelectionDataGridDropTargetBead.as    | 112 ----------------
 .../html/beads/SingleSelectionDropTargetBead.as | 118 +++++++++-------
 .../src/main/resources/basic-manifest.xml       |   9 +-
 15 files changed, 594 insertions(+), 166 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/Basic/src/main/flex/BasicClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/BasicClasses.as b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
index 0aaa08b..e58f2cf 100644
--- a/frameworks/projects/Basic/src/main/flex/BasicClasses.as
+++ b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
@@ -169,6 +169,7 @@ internal class BasicClasses
 	import org.apache.flex.html.DataGridButtonBar; DataGridButtonBar;
 	import org.apache.flex.html.beads.DataGridColumnView; DataGridColumnView;
 	import org.apache.flex.html.beads.DataGridView; DataGridView;
+	import org.apache.flex.html.beads.IDataGridView; IDataGridView;
 	import org.apache.flex.html.beads.DataGridPercentageView; DataGridPercentageView;
 	import org.apache.flex.html.beads.DateChooserView; DateChooserView;
 	import org.apache.flex.html.beads.DateFieldView; DateFieldView;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridPercentageView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridPercentageView.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridPercentageView.as
index 74bd364..be2260f 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridPercentageView.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridPercentageView.as
@@ -31,6 +31,7 @@ package org.apache.flex.html.beads
 	import org.apache.flex.html.DataGrid;
 	import org.apache.flex.html.DataGridButtonBar;
 	import org.apache.flex.html.Container;
+	import org.apache.flex.html.beads.IDataGridView;
 	import org.apache.flex.html.beads.layouts.ButtonBarLayout;
 	import org.apache.flex.html.beads.models.ButtonBarModel;
 	import org.apache.flex.html.supportClasses.DataGridColumn;
@@ -53,7 +54,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class DataGridPercentageView extends GroupView implements IBeadView
+	public class DataGridPercentageView extends GroupView implements IBeadView, IDataGridView
 	{
 		/**
 		 *  constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridView.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridView.as
index 10e317f..58ee8c7 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridView.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridView.as
@@ -31,6 +31,7 @@ package org.apache.flex.html.beads
 	import org.apache.flex.html.DataGrid;
 	import org.apache.flex.html.DataGridButtonBar;
 	import org.apache.flex.html.Container;
+	import org.apache.flex.html.beads.IDataGridView;
 	import org.apache.flex.html.beads.layouts.ButtonBarLayout;
 	import org.apache.flex.html.beads.models.ButtonBarModel;
 	import org.apache.flex.html.supportClasses.DataGridColumn;
@@ -52,7 +53,7 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public class DataGridView extends GroupView implements IBeadView
+		public class DataGridView extends GroupView implements IBeadView, IDataGridView
 		{
 			/**
 			 *  constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/IDataGridView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/IDataGridView.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/IDataGridView.as
index 8f04d11..fb6b5f4 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/IDataGridView.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/IDataGridView.as
@@ -19,6 +19,8 @@
 package org.apache.flex.html.beads
 {
 	import org.apache.flex.core.IBeadView;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.html.Container;
 	
 	/**
 	 *  The IDataGridView interface marks as a component as being the bead that
@@ -31,6 +33,8 @@ package org.apache.flex.html.beads
 	 */
 	public interface IDataGridView extends IBeadView
 	{
-		
+		function get columnLists():Array;
+		function get listArea():Container;
+		function get header():IUIBase;
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/Basic/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/resources/defaults.css b/frameworks/projects/Basic/src/main/resources/defaults.css
index f267363..ea7537e 100644
--- a/frameworks/projects/Basic/src/main/resources/defaults.css
+++ b/frameworks/projects/Basic/src/main/resources/defaults.css
@@ -494,7 +494,7 @@ Spinner
 StringItemRenderer
 {
 	IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ItemRendererMouseController");
-	height: 24;
+	height: 24px;
 	flex-shrink: 0;
 	flex-grow: 1;
 	cursor: pointer;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
index a0158b1..a3bf905 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
@@ -75,7 +75,7 @@ package org.apache.flex.utils
                 do {
                     x -= element.offsetLeft;
                     y -= element.offsetTop;
-                    if (local.hasOwnProperty('parent')) {
+					if (local['parent'] !== undefined) {
                         local = local.parent;
                         element = local.element as HTMLElement;
                     } else {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as b/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
index 9a91547..0ae4f1c 100644
--- a/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
+++ b/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
@@ -34,7 +34,13 @@ internal class DragDropClasses
 	import org.apache.flex.html.beads.SingleSelectionDragSourceBead; SingleSelectionDragSourceBead;
 	import org.apache.flex.html.beads.SingleSelectionDropIndicatorBead; SingleSelectionDropIndicatorBead;
 	import org.apache.flex.html.beads.SingleSelectionDropTargetBead; SingleSelectionDropTargetBead;
-	import org.apache.flex.html.beads.SingleSelectionDataGridDropTargetBead; SingleSelectionDataGridDropTargetBead;
+	
+	import org.apache.flex.html.beads.DataGridDrawingLayerBead; DataGridDrawingLayerBead;
+	import org.apache.flex.html.beads.DataGridWithDrawingLayerLayout; DataGridWithDrawingLayerLayout;
+	import org.apache.flex.html.beads.IDrawingLayerBead; IDrawingLayerBead;
+	import org.apache.flex.html.beads.DragDropListView; DragDropListView;
+	import org.apache.flex.html.beads.ListDrawingLayerBead; ListDrawingLayerBead;
+	
 }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DataGridDrawingLayerBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DataGridDrawingLayerBead.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DataGridDrawingLayerBead.as
new file mode 100644
index 0000000..c6fff19
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DataGridDrawingLayerBead.as
@@ -0,0 +1,103 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.flex.html.beads
+{
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.html.beads.IDataGridView;
+	import org.apache.flex.html.beads.IDrawingLayerBead;
+	
+    
+	/**
+	 *  DataGridDrawingLayerBead places a graphic space into the DataGrid that is
+	 *  positioned above the Container used to hold the columns. This graphic space
+	 *  can be used to insert visualizations into the DataGrid.
+     *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.8
+	 */
+	public class DataGridDrawingLayerBead implements IBead, IDrawingLayerBead
+	{
+		/**
+		 * Constructor
+	     *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function DataGridDrawingLayerBead()
+		{
+			super();
+		}
+		
+		private var _strand:IStrand;
+		
+		/**
+		 * @private
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			IEventDispatcher(_strand).addEventListener("beadsAdded", handleBeadsAdded);
+		}
+		
+		private var _layer:UIBase;
+		
+		/**
+		 * The component used as the drawing layer.
+	     *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function get layer():UIBase
+		{
+			return _layer;
+		}
+		
+		/**
+		 * @private
+		 */
+		private function handleBeadsAdded(event:Event):void
+		{
+			var view:IDataGridView = UIBase(_strand).view as IDataGridView;
+			if (view != null) {
+				_layer = new UIBase();
+				_layer.className = "DataGridDrawingLayer";
+				COMPILE::JS {
+					_layer.element.style.position = "absolute";
+					_layer.element.style['pointer-events'] = 'none';
+					_layer.element.style['overflow'] = 'hidden';
+				}
+				UIBase(_strand).addElement(_layer);
+			}
+			// else: this is an error as this bead cannot be used with anything but
+			// a DataGrid.
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DataGridWithDrawingLayerLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DataGridWithDrawingLayerLayout.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DataGridWithDrawingLayerLayout.as
new file mode 100644
index 0000000..31c7c30
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DataGridWithDrawingLayerLayout.as
@@ -0,0 +1,117 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.flex.html.beads
+{	
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.html.beads.IDataGridView;
+	import org.apache.flex.html.beads.layouts.VerticalFlexLayout;
+	
+	COMPILE::SWF {
+		import org.apache.flex.html.supportClasses.ScrollingViewport;
+		import org.apache.flex.html.supportClasses.ScrollBar;
+	}
+	
+	/**
+	 * DataGridWithDrawingLayerLayout is a class that extends VerticalFlexLayout
+	 * and positions the drawing layer created by a DataGridDrawingLayerBead.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class DataGridWithDrawingLayerLayout extends VerticalFlexLayout
+	{
+		/**
+		 *  constructor
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function DataGridWithDrawingLayerLayout()
+		{
+			super();
+		}
+		
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			_strand = value;
+		}
+		
+		/**
+		 * @private
+		 */
+		override public function layout():Boolean
+		{
+			// If there is a drawing layer, remove it so the super.layout function
+			// will not include it.
+			var layerBead:IDrawingLayerBead = _strand.getBeadByType(IDrawingLayerBead) as IDrawingLayerBead;
+			if (layerBead) {
+				UIBase(_strand).removeElement(layerBead.layer);
+			}
+			
+			// Run the actual layout
+			var result:Boolean = super.layout();
+			
+			// Put the drawing layer back, sizing it to fit over the listArea.
+			if (layerBead) {
+				UIBase(_strand).addElement(layerBead.layer);
+				
+				var layerX:Number = 0;
+				var layerY:Number = 0;
+				var useWidth:Number = UIBase(_strand).width;
+				var useHeight:Number = UIBase(_strand).height;
+				
+				var view:IDataGridView = UIBase(_strand).view as IDataGridView;
+				var listArea:UIBase = view.listArea;
+				
+				COMPILE::SWF {
+					var scrollViewport:ScrollingViewport = listArea.getBeadByType(ScrollingViewport) as ScrollingViewport;
+					if (scrollViewport) {
+						var vbar:ScrollBar = scrollViewport.verticalScroller as ScrollBar;
+						if (vbar != null && vbar.visible) useWidth -= vbar.width;
+						var hbar:ScrollBar = scrollViewport.horizontalScroller as ScrollBar;
+						if (hbar != null && hbar.visible) useHeight -= hbar.height;
+					}
+				}
+				
+				layerBead.layer.x = layerX; 
+				layerBead.layer.y = layerY;
+				layerBead.layer.setWidthAndHeight(useWidth, useHeight, true);
+				
+			}
+			return result;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DragDropListView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DragDropListView.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DragDropListView.as
new file mode 100644
index 0000000..c900d50
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/DragDropListView.as
@@ -0,0 +1,134 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.flex.html.beads
+{
+	import org.apache.flex.core.IItemRendererParent;
+	import org.apache.flex.core.IContainer;
+	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.ListView;
+	import org.apache.flex.html.beads.layouts.VerticalLayout;
+	import org.apache.flex.html.supportClasses.DataGroup;
+	import org.apache.flex.html.supportClasses.ScrollingViewport;
+
+
+	/**
+	 *  DragDropListView is the view to use for Lists when you want to use
+	 *  drag and drop beads. This view provides a drawing layer in which the
+	 *  the drop indicator can be displayed when the list is the target for
+	 *  drag and drop operations.
+     *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.8
+	 */
+	COMPILE::JS
+	public class DragDropListView extends ListView
+	{
+		private var _strand:IStrand;
+		
+		private var _layer:UIBase;
+		
+		/**
+		 * @private
+		 */
+		override public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			super.strand = value;
+			
+			var layerBead:ListDrawingLayerBead = new ListDrawingLayerBead();
+			_strand.addBead(layerBead);
+			_layer = layerBead.layer;
+			
+			var chost:IContainer = host as IContainer;
+			chost.strandChildren.addElement(_layer);
+			
+			UIBase(_strand).element.style['overflow'] = 'auto';
+			
+		}
+		
+		/**
+		 * @private
+		 */
+		override public function afterLayout():void
+		{
+			super.afterLayout();
+			
+			_layer.x = 0;
+			_layer.y = 0;
+			_layer.width = UIBase(_strand).width;
+			_layer.height = UIBase(_strand).height;
+		}
+	}
+	
+	COMPILE::SWF
+	public class DragDropListView extends ListView
+	{
+		/**
+		 * Constructor
+	     *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function DragDropListView()
+		{
+			super();
+		}
+
+		private var _strand:IStrand;
+		
+		private var _layer:UIBase;
+
+		/**
+		 * @private
+		 */
+		override public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			super.strand = value;
+			
+			var layerBead:ListDrawingLayerBead = new ListDrawingLayerBead();
+			_strand.addBead(layerBead);
+			_layer = layerBead.layer;
+			
+			var chost:IContainer = host as IContainer;
+			chost.strandChildren.addElement(_layer);
+			
+		}
+		
+		/**
+		 * @private
+		 */
+		override public function afterLayout():void
+		{
+			super.afterLayout();
+			
+			_layer.x = 0;
+			_layer.y = 0;
+			_layer.width = UIBase(_strand).width;
+			_layer.height = UIBase(_strand).height;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/IDrawingLayerBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/IDrawingLayerBead.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/IDrawingLayerBead.as
new file mode 100644
index 0000000..f2bc37d
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/IDrawingLayerBead.as
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.flex.html.beads
+{
+	import org.apache.flex.core.UIBase;
+	
+    
+	/**
+	 *  The IDrawingLayerBead interface is implemented by beads that providing a
+	 *  a drawing surface within a component.
+     *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.8
+	 */
+	public interface IDrawingLayerBead
+	{
+		/**
+		 * Returns the component to use as the actual drawing surface.
+	     *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+	 	 *  @productversion FlexJS 0.8
+		 */
+		function get layer():UIBase;
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/ListDrawingLayerBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/ListDrawingLayerBead.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/ListDrawingLayerBead.as
new file mode 100644
index 0000000..8a466ce
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/ListDrawingLayerBead.as
@@ -0,0 +1,97 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.flex.html.beads
+{	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.html.beads.IDrawingLayerBead;
+	
+	COMPILE::SWF {
+		import flash.display.DisplayObjectContainer;
+	}
+	
+    
+	/**
+	 *  ListDrawingLayerBead places a graphic space into the List that is
+	 *  positioned the item renderers.
+     *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.8
+	 */
+	public class ListDrawingLayerBead implements IBead, IDrawingLayerBead
+	{
+		/**
+		 * Constructor
+	     *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function ListDrawingLayerBead()
+		{
+			super();
+			
+			_layer = new UIBase();
+			_layer.className = "ListDrawingLayer";
+			
+			COMPILE::SWF {
+				var doc:DisplayObjectContainer = _layer.$displayObject as DisplayObjectContainer;
+				doc.mouseEnabled = false;
+				doc.mouseChildren = false;
+			}
+			COMPILE::JS {
+				_layer.element.style.position = 'absolute';
+				_layer.element.style['pointer-events'] = 'none';
+				_layer.element.style['overflow'] = 'hidden';
+			}
+		}
+		
+		private var _strand:IStrand;
+		
+		/**
+		 * @private
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+		}
+		
+		private var _layer:UIBase;
+		
+		/**
+		 * Returns the component drawing layer.
+	     *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function get layer():UIBase
+		{
+			return _layer;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDataGridDropTargetBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDataGridDropTargetBead.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDataGridDropTargetBead.as
deleted file mode 100644
index e4b2a43..0000000
--- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDataGridDropTargetBead.as
+++ /dev/null
@@ -1,112 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.flex.html.beads
-{
-	import org.apache.flex.collections.ArrayList;
-	import org.apache.flex.core.DropType;
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IDataProviderModel;
-	import org.apache.flex.core.IItemRenderer;
-	import org.apache.flex.core.IItemRendererParent;
-	import org.apache.flex.core.IParent;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.IUIBase;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.events.DragEvent;
-	import org.apache.flex.events.EventDispatcher;
-	import org.apache.flex.events.IEventDispatcher;
-	import org.apache.flex.geom.Point;
-	import org.apache.flex.geom.Rectangle;
-	import org.apache.flex.html.beads.controllers.DropMouseController;
-	import org.apache.flex.html.supportClasses.DataItemRenderer;
-	import org.apache.flex.utils.PointUtils;
-	import org.apache.flex.utils.UIUtils;
-	
-    
-	/**
-	 *  The SingleSelectionDataGridDropTargetBead enables items to be dropped onto single-selection DataGrid
-	 *  components. This bead can be used with SingleSelectionDragSourceBead to enable the re-arrangement
-	 *  of rows within the same list.
-     *  
-	 *  @see org.apache.flex.html.beads.SingleSelectionDropTargetBead
-     *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.8
-	 */
-	public class SingleSelectionDataGridDropTargetBead extends SingleSelectionDropTargetBead
-	{
-		/**
-		 * Constructor
-	     *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.8
-		 */
-		public function SingleSelectionDataGridDropTargetBead()
-		{
-			super();
-		}
-		
-		private var _strand:IStrand;
-		private var _dropIndicator:UIBase;
-		
-		/**
-		 * @private
-		 */
-		override public function set strand(value:IStrand):void
-		{
-			super.strand = value;
-			_strand = value;
-		}
-		
-		/**
-		 * @private
-		 */
-		override protected function getDropIndicator(ir:Object, width:Number, height:Number):UIBase
-		{
-			if (_dropIndicator == null) {
-				var bead:SingleSelectionDropIndicatorBead = _strand.getBeadByType(SingleSelectionDropIndicatorBead) as SingleSelectionDropIndicatorBead;
-				if (bead == null) return null;
-				
-				_dropIndicator = bead.getDropIndicator(ir, width, height);
-			}
-			if (indicatorParent == null) {
-				indicatorParent = findListContainer(_strand as UIBase);
-			}
-			return _dropIndicator;
-		}
-		
-		private function findListContainer(object:UIBase):UIBase
-		{
-			const cname:String = "opt_org-apache-flex-html-DataGrid_ListArea";
-			
-			if (object == null) return null;
-			if (object.className == cname) return object;
-			var n:Number = object.numElements;
-			for (var i:int=0; i < n; i++) {
-				var result:UIBase = findListContainer(object.getElementAt(i) as UIBase);
-				if (result != null) return result;
-			}
-			return null;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropTargetBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropTargetBead.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropTargetBead.as
index 7fe8562..ee93eca 100644
--- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropTargetBead.as
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropTargetBead.as
@@ -23,7 +23,6 @@ package org.apache.flex.html.beads
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IDataProviderModel;
 	import org.apache.flex.core.IItemRenderer;
-	import org.apache.flex.core.IItemRendererParent;
 	import org.apache.flex.core.IParent;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
@@ -66,34 +65,13 @@ package org.apache.flex.html.beads
 			super();
 		}
 		
-		private var _strand:IStrand;
 		private var _dropController:DropMouseController;
+		private var _dropIndicatorBead:SingleSelectionDropIndicatorBead;
 		private var _dropIndicator:UIBase;
 		private var lastItemVisited:Object;
 		private var indicatorVisible:Boolean = false;
-		protected var indicatorParent:UIBase;
 		
-		/**
-		 * @private
-		 */
-		protected function getDropIndicator(ir:Object, width:Number, height:Number):UIBase
-		{
-			if (_dropIndicator == null) {
-				var bead:SingleSelectionDropIndicatorBead = _strand.getBeadByType(SingleSelectionDropIndicatorBead) as SingleSelectionDropIndicatorBead;
-				if (bead == null) return null;
-				
-				_dropIndicator = bead.getDropIndicator(ir, width, height);
-			}
-			if (indicatorParent == null) {
-				COMPILE::SWF {
-					indicatorParent = _strand.getBeadByType(IItemRendererParent) as UIBase;
-				}
-				COMPILE::JS {
-					indicatorParent = _strand as UIBase;
-				}
-			}
-			return _dropIndicator;
-		}
+		private var _strand:IStrand;
 		
 		/**
 		 * @private
@@ -111,12 +89,41 @@ package org.apache.flex.html.beads
 			IEventDispatcher(_dropController).addEventListener(DragEvent.DRAG_DROP, handleDragDrop);
 		}
 		
+		protected var _indicatorParent:UIBase;
+		
+		protected function get indicatorParent():UIBase
+		{
+			if (_indicatorParent == null) {
+				var layerBead:IDrawingLayerBead = _strand.getBeadByType(IDrawingLayerBead) as IDrawingLayerBead;
+				if (layerBead != null) {
+					_indicatorParent = layerBead.layer;
+				}
+			}
+			return _indicatorParent;
+		}
+		
+		/**
+		 * @private
+		 */
+		protected function getDropIndicator(ir:Object, width:Number, height:Number):UIBase
+		{
+			if (_dropIndicatorBead == null) {
+				_dropIndicatorBead = _strand.getBeadByType(SingleSelectionDropIndicatorBead) as SingleSelectionDropIndicatorBead;
+				if (_dropIndicatorBead == null) return null;
+			}
+			_dropIndicator = _dropIndicatorBead.getDropIndicator(ir, width, height);
+			return _dropIndicator;
+		}
+		
 		/**
 		 * @private
 		 */
 		private function handleDragEnter(event:DragEvent):void
 		{
 			trace("SingleSelectionDropTargetBead received DragEnter via: "+event.relatedObject.toString());
+			var pt0:Point;
+			var pt1:Point;
+			var pt2:Point;
 			
 			_dropController.acceptDragDrop(event.target as IUIBase, DropType.COPY);
 			
@@ -130,19 +137,23 @@ package org.apache.flex.html.beads
 				lastItemVisited = ir;
 			}
 			
-			if (lastItemVisited && !indicatorVisible) {
-				var di:UIBase = getDropIndicator(lastItemVisited, (_strand as UIBase).width, 4);
-				var pt2:Point = new Point((lastItemVisited as UIBase).x, (lastItemVisited as UIBase).y);
+			if (lastItemVisited && !indicatorVisible && indicatorParent) {
+				var di:UIBase = getDropIndicator(lastItemVisited, indicatorParent.width, 4);
 				indicatorVisible = true;
-				di.x = pt2.x;
-				di.y = pt2.y;
-				
-				trace("=== over item "+(lastItemVisited as DataItemRenderer).data.toString()+", at "+pt2.x+", "+pt2.y);
-				
+				COMPILE::SWF {
+					pt0 = new Point(0, (lastItemVisited as UIBase).y);
+					pt1 = PointUtils.localToGlobal(pt0, lastItemVisited.parent ? lastItemVisited.parent : _strand);
+					pt2 = PointUtils.globalToLocal(pt1, indicatorParent);
+					di.x = 0;
+					di.y = pt2.y;
+				}
+				COMPILE::JS {
+					di.x = 0;
+					di.y = (lastItemVisited as UIBase).y;
+				}
+								
 				if (indicatorParent != null) {
 					indicatorParent.addElement(di);
-//				} else {
-//					if (_dropIndicator) host.addElement(di);
 				}
 			}
 			
@@ -156,11 +167,9 @@ package org.apache.flex.html.beads
 			trace("SingleSelectionDropTargetBead received DragExit via: "+event.relatedObject.toString());
 			
 			if (indicatorVisible) {
-				var host:UIBase = UIUtils.findPopUpHost(_strand as UIBase) as UIBase;
 				if (indicatorParent != null) {
 					indicatorParent.removeElement(_dropIndicator);
 				}
-//				else if (_dropIndicator) host.removeElement(_dropIndicator);
 				indicatorVisible = false;
 			}
 		}
@@ -171,25 +180,44 @@ package org.apache.flex.html.beads
 		private function handleDragOver(event:DragEvent):void
 		{
 			trace("SingleSelectionDropTargetBead received DragOver via: "+event.relatedObject.toString());
+			var pt0:Point;
+			var pt1:Point;
+			var pt2:Point;
 			
 			var startHere:Object = event.relatedObject;
 			while( !(startHere is DataItemRenderer) && startHere != null) {
 				startHere = startHere.parent;
 			}
-			if ((startHere is DataItemRenderer) && _dropIndicator != null) {
-				var pt2:Point = new Point((startHere as UIBase).x, (startHere as UIBase).y);
-				_dropIndicator.x = pt2.x;
-				_dropIndicator.y = pt2.y - 1;
+			
+			if ((startHere is DataItemRenderer) && _dropIndicator != null && indicatorParent) {
+				COMPILE::SWF {
+					pt0 = new Point(0, (startHere as UIBase).y);
+					pt1 = PointUtils.localToGlobal(pt0, startHere.parent);
+					pt2 = PointUtils.globalToLocal(pt1, indicatorParent);
+					_dropIndicator.x = 0;
+					_dropIndicator.y = pt2.y - 1;
+				}
+				COMPILE::JS {
+					_dropIndicator.x = 0;
+					_dropIndicator.y = (startHere as UIBase).y;
+				}
 				
 				lastItemVisited = startHere;
 				
 			} 
-			else if (lastItemVisited && _dropIndicator != null) {
+			else if (lastItemVisited && _dropIndicator != null && indicatorParent) {
 				var lastItem:UIBase = lastItemVisited as UIBase;
-
-				pt2 = new Point(lastItem.x, lastItem.y);
-				_dropIndicator.x = pt2.x;
-				_dropIndicator.y = pt2.y + lastItem.height + 1;
+				COMPILE::SWF {
+					pt0 = new Point(0, lastItem.y);
+					pt1 = PointUtils.localToGlobal(pt0, lastItem.parent);
+					pt2 = PointUtils.globalToLocal(pt1, indicatorParent);
+					_dropIndicator.x = 0;
+					_dropIndicator.y = pt2.y + lastItem.height + 1;
+				}
+				COMPILE::JS {
+					_dropIndicator.x = 0;
+					_dropIndicator.y = lastItem.y;
+				}
 			}
 		}
 		

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/06213a0c/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml b/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
index 8489785..68804ac 100644
--- a/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
@@ -27,7 +27,10 @@
 	<component id="SingleSelectionDropTargetBead" class="org.apache.flex.html.beads.SingleSelectionDropTargetBead" />
     <component id="DragMouseController" class="org.apache.flex.html.beads.controllers.DragMouseController" />
     <component id="DropMouseController" class="org.apache.flex.html.beads.controllers.DropMouseController" />
-    
-	<component id="SingleSelectionDataGridDropTargetBead" class="org.apache.flex.html.beads.SingleSelectionDataGridDropTargetBead" />
-
+    	
+	<component id="DataGridDrawingLayerBead" class="org.apache.flex.html.beads.DataGridDrawingLayerBead" />
+	<component id="DataGridWithDrawingLayerLayout" class="org.apache.flex.html.beads.DataGridWithDrawingLayerLayout" />
+	<component id="DragDropListView" class="org.apache.flex.html.beads.DragDropListView" />
+	<component id="ListDrawingLayerBead" class="org.apache.flex.html.beads.ListDrawingLayerBead" />
+	
 </componentPackage>