Added SingleSelectionDropIndicatorBead and used it with the other single-selection drag and drop beads. Updated comments throughout.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/96ee5429 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/96ee5429 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/96ee5429 Branch: refs/heads/feature/browser-event Commit: 96ee5429f5e418658b0908689c692f2d47f128dc Parents: 01bc1dd Author: Peter Ent <p...@apache.org> Authored: Thu Jul 27 11:37:12 2017 -0400 Committer: Peter Ent <p...@apache.org> Committed: Thu Jul 27 11:37:12 2017 -0400 ---------------------------------------------------------------------- .../DragDrop/src/main/flex/DragDropClasses.as | 1 + .../html/beads/SingleSelectionDragImageBead.as | 22 ++-- .../html/beads/SingleSelectionDragSourceBead.as | 77 +++++++++--- .../beads/SingleSelectionDropIndicatorBead.as | 111 ++++++++++++++++ .../html/beads/SingleSelectionDropTargetBead.as | 125 ++++++++++++++++--- .../beads/controllers/DragMouseController.as | 24 ++-- .../beads/controllers/DropMouseController.as | 16 +-- .../src/main/resources/basic-manifest.xml | 1 + 8 files changed, 315 insertions(+), 62 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96ee5429/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 440b540..f2fd9c1 100644 --- a/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as +++ b/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as @@ -32,6 +32,7 @@ internal class DragDropClasses import org.apache.flex.html.beads.SingleSelectionDragImageBead; SingleSelectionDragImageBead; import org.apache.flex.html.beads.SingleSelectionDragSourceBead; SingleSelectionDragSourceBead; + import org.apache.flex.html.beads.SingleSelectionDropIndicatorBead; SingleSelectionDropIndicatorBead; import org.apache.flex.html.beads.SingleSelectionDropTargetBead; SingleSelectionDropTargetBead; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96ee5429/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragImageBead.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragImageBead.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragImageBead.as index 6fb10c9..d1ff17b 100644 --- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragImageBead.as +++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragImageBead.as @@ -50,15 +50,23 @@ package org.apache.flex.html.beads * * The createDragImage() function can be overridden and a different component returned. * - * @see org.apache.flex.html.beads.SingleSelectionDropTargetBead. + * @see org.apache.flex.html.beads.SingleSelectionDragSourceBead. * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class SingleSelectionDragImageBead extends EventDispatcher implements IBead { + /** + * Constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function SingleSelectionDragImageBead() { super(); @@ -66,6 +74,9 @@ package org.apache.flex.html.beads private var _strand:IStrand; + /** + * @private + */ public function set strand(value:IStrand):void { _strand = value; @@ -73,11 +84,6 @@ package org.apache.flex.html.beads IEventDispatcher(_strand).addEventListener(DragEvent.DRAG_START, handleDragStart); } - public function get strand():IStrand - { - return _strand; - } - /** * Creates an example/temporary component to be dragged and returns it. * @@ -87,7 +93,7 @@ package org.apache.flex.html.beads * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ protected function createDragImage(ir:DataItemRenderer):UIBase { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96ee5429/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragSourceBead.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragSourceBead.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragSourceBead.as index 5fd8e28..6ed7b62 100644 --- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragSourceBead.as +++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragSourceBead.as @@ -39,6 +39,7 @@ package org.apache.flex.html.beads import org.apache.flex.html.beads.controllers.DragMouseController; import org.apache.flex.html.supportClasses.DataItemRenderer; import org.apache.flex.utils.PointUtils; + import org.apache.flex.utils.UIUtils; /** @@ -55,10 +56,18 @@ package org.apache.flex.html.beads * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class SingleSelectionDragSourceBead extends EventDispatcher implements IBead, IDragInitiator { + /** + * Constructor + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function SingleSelectionDragSourceBead() { super(); @@ -67,16 +76,16 @@ package org.apache.flex.html.beads private var _strand:IStrand; private var _dragController:DragMouseController; - private var _itemRendererParent:IParent; - public function get itemRendererParent():IParent - { - if (_itemRendererParent == null) { - _itemRendererParent = _strand.getBeadByType(IItemRendererParent) as IParent; - } - return _itemRendererParent; - } - private var _dragType:String = "move"; + + /** + * The type of drag and drop operation: move or copy. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function get dragType():String { return _dragType; @@ -86,6 +95,9 @@ package org.apache.flex.html.beads _dragType = value; } + /** + * @private + */ public function set strand(value:IStrand):void { _strand = value; @@ -94,15 +106,15 @@ package org.apache.flex.html.beads _strand.addBead(_dragController); IEventDispatcher(_strand).addEventListener(DragEvent.DRAG_START, handleDragStart); - } - - public function get strand():IStrand - { - return _strand; + IEventDispatcher(_strand).addEventListener(DragEvent.DRAG_MOVE, handleDragMove); + IEventDispatcher(_strand).addEventListener(DragEvent.DRAG_END, handleDragEnd); } private var indexOfDragSource:int = -1; + /** + * @private + */ private function handleDragStart(event:DragEvent):void { trace("SingleSelectionDragSourceBead received the DragStart"); @@ -118,15 +130,34 @@ package org.apache.flex.html.beads var ir:DataItemRenderer = startHere as DataItemRenderer; var p:UIBase = (ir as UIBase).parent as UIBase; - indexOfDragSource = p.getElementIndex(ir); - - trace("SingleSelectionDragSourceBead index of dragged object: "+indexOfDragSource); + indexOfDragSource = p.getElementIndex(ir); } - + } + + /** + * @private + */ + protected function handleDragMove(event:DragEvent):void + { + } + + /** + * @private + */ + protected function handleDragEnd(event:DragEvent):void + { } /* IDragInitiator */ + /** + * Handles pre-drop actions. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function acceptingDrop(dropTarget:Object, type:String):void { trace("SingleSelectionDragSourceBead accepting drop of type "+type); @@ -155,6 +186,14 @@ package org.apache.flex.html.beads } } + /** + * Handles post-drop actions. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function acceptedDrop(dropTarget:Object, type:String):void { trace("SingleSelectionDragSourceBead accepted drop of type "+type); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96ee5429/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropIndicatorBead.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropIndicatorBead.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropIndicatorBead.as new file mode 100644 index 0000000..9dbf6bc --- /dev/null +++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropIndicatorBead.as @@ -0,0 +1,111 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.IBead; + import org.apache.flex.core.IDataProviderModel; + import org.apache.flex.core.IDocument; + import org.apache.flex.core.IDragInitiator; + 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.UIBase; + import org.apache.flex.events.DragEvent; + import org.apache.flex.events.Event; + 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.Group; + import org.apache.flex.html.Label; + import org.apache.flex.html.beads.controllers.DragMouseController; + import org.apache.flex.utils.PointUtils; + import org.apache.flex.svg.Rect; + import org.apache.flex.graphics.SolidColor; + + + /** + * The SingleSelectionDropIndicatorBead provides a graphic used to help the user + * place the item being dropped. + * + * @see org.apache.flex.html.beads.SingleSelectionDropTargetBead. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + public class SingleSelectionDropIndicatorBead extends EventDispatcher implements IBead + { + /** + * Constructor + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + public function SingleSelectionDropIndicatorBead() + { + super(); + } + + private var _strand:IStrand; + + /** + * @private + */ + public function set strand(value:IStrand):void + { + _strand = value; + } + + private var _dropIndicator:Rect; + + /** + * This function returns a UIBase component that is used to indicate where a drop action will occur or + * be accepted. This function is called once by the SingleSelectionDropTargetBead (or its derivatives) + * when the drop target is entered. After that only its (x,y) coordinates will be changed. + * + * @param ir Object The object that will be dragged. You can use this to help customize the drop indicator. + * @param width Number The preferred width of the drop indicator. + * @param height Number The preferred height of the drop indicator. + * @return UIBase A component that will show where the drop can be accepted. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ + public function getDropIndicator(ir:Object, width:Number, height:Number):UIBase + { + if (_dropIndicator == null) { + _dropIndicator = new Rect(); + _dropIndicator.fill = new SolidColor(0x000000); + } + + _dropIndicator.width = width; + _dropIndicator.height = height; + + return _dropIndicator; + } + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96ee5429/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 186613b..fcf8ec4 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 @@ -34,6 +34,9 @@ package org.apache.flex.html.beads 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; /** @@ -41,15 +44,23 @@ package org.apache.flex.html.beads * 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 + * @see org.apache.flex.html.beads.SingleSelectionDropIndicatorBead * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class SingleSelectionDropTargetBead extends EventDispatcher implements IBead { + /** + * Constructor + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.8 + */ public function SingleSelectionDropTargetBead() { super(); @@ -57,16 +68,27 @@ package org.apache.flex.html.beads private var _strand:IStrand; private var _dropController:DropMouseController; + private var _dropIndicator:UIBase; + private var lastItemVisited:Object; + private var indicatorVisible:Boolean = false; - private var _itemRendererParent:IParent; - public function get itemRendererParent():IParent + /** + * @private + */ + protected function getDropIndicator(ir:Object, width:Number, height:Number):UIBase { - if (_itemRendererParent == null) { - _itemRendererParent = _strand.getBeadByType(IItemRendererParent) as IParent; + if (_dropIndicator == null) { + var bead:SingleSelectionDropIndicatorBead = _strand.getBeadByType(SingleSelectionDropIndicatorBead) as SingleSelectionDropIndicatorBead; + if (bead == null) return null; + + _dropIndicator = bead.getDropIndicator(ir, width, height); } - return _itemRendererParent; + return _dropIndicator; } + /** + * @private + */ public function set strand(value:IStrand):void { _strand = value; @@ -80,31 +102,104 @@ package org.apache.flex.html.beads IEventDispatcher(_dropController).addEventListener(DragEvent.DRAG_DROP, handleDragDrop); } - public function get strand():IStrand - { - return _strand; - } - + /** + * @private + */ private function handleDragEnter(event:DragEvent):void { - trace("SingleSelectionDropTargetBead received DragEnter via: "+event.target.toString()); + trace("SingleSelectionDropTargetBead received DragEnter via: "+event.relatedObject.toString()); _dropController.acceptDragDrop(event.target as IUIBase, DropType.COPY); + + var startHere:Object = event.relatedObject; + while( !(startHere is DataItemRenderer) && startHere != null) { + startHere = startHere.parent; + } + + if (startHere is DataItemRenderer) { + var ir:DataItemRenderer = startHere as DataItemRenderer; + lastItemVisited = ir; + } + + if (lastItemVisited && !indicatorVisible) { + var host:UIBase = UIUtils.findPopUpHost(_strand as UIBase) as UIBase; + var orgPoint:Point = new Point((lastItemVisited as UIBase).x, (lastItemVisited as UIBase).y); + var pt1:Point = PointUtils.localToGlobal(orgPoint, lastItemVisited.parent); + var pt2:Point = PointUtils.globalToLocal(pt1, host); + indicatorVisible = true; + var di:UIBase = getDropIndicator(lastItemVisited, (_strand as UIBase).width, 4); + di.x = pt2.x; + di.y = pt2.y; + + trace("=== over item "+(lastItemVisited as DataItemRenderer).data.toString()+", at "+pt2.x+", "+pt2.y); + + if (_dropIndicator) host.addElement(di); + } + } + /** + * @private + */ private function handleDragExit(event:DragEvent):void { - trace("SingleSelectionDropTargetBead received DragExit via: "+event.target.toString()); + trace("SingleSelectionDropTargetBead received DragExit via: "+event.relatedObject.toString()); + + if (indicatorVisible) { + var host:UIBase = UIUtils.findPopUpHost(_strand as UIBase) as UIBase; + if (_dropIndicator) host.removeElement(_dropIndicator); + indicatorVisible = false; + } } + /** + * @private + */ private function handleDragOver(event:DragEvent):void { - trace("SingleSelectionDropTargetBead received DragOver via: "+event.target.toString()); + trace("SingleSelectionDropTargetBead received DragOver via: "+event.relatedObject.toString()); + + var startHere:Object = event.relatedObject; + while( !(startHere is DataItemRenderer) && startHere != null) { + startHere = startHere.parent; + } + if ((startHere is DataItemRenderer) && _dropIndicator != null) { + var host:UIBase = UIUtils.findPopUpHost(_strand as UIBase) as UIBase; + var orgPoint:Point = new Point((startHere as UIBase).x, (startHere as UIBase).y); + var pt1:Point = PointUtils.localToGlobal(orgPoint, startHere.parent); + var pt2:Point = PointUtils.globalToLocal(pt1, host); + _dropIndicator.x = pt2.x; + _dropIndicator.y = pt2.y - 1; + + lastItemVisited = startHere; + + trace("== over item "+(startHere as DataItemRenderer).data.toString()+", at "+pt2.x+", "+pt2.y); + } else if (lastItemVisited && _dropIndicator != null) { + trace("== beyond last item"); + + var p:UIBase = (lastItemVisited as UIBase).parent as UIBase; + if (p == null) return; + + var n:int = p.numElements; + var lastItem:UIBase = p.getElementAt(n-1) as UIBase; + + host = UIUtils.findPopUpHost(_strand as UIBase) as UIBase; + orgPoint = new Point(lastItem.x, lastItem.y); + pt1 = PointUtils.localToGlobal(orgPoint, p); + pt2 = PointUtils.globalToLocal(pt1, host); + _dropIndicator.x = pt2.x; + _dropIndicator.y = pt2.y + lastItem.height + 1; + } } + /** + * @private + */ private function handleDragDrop(event:DragEvent):void { trace("SingleSelectionDropTargetBead received DragDrop via: "+event.relatedObject.toString()); + + handleDragExit(event); var targetIndex:int = -1; // indicates drop beyond length of items http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96ee5429/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as index c7ac3ba..96965b3 100644 --- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as +++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as @@ -44,7 +44,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ [Event(name="dragStart", type="org.apache.flex.events.DragEvent")] @@ -55,7 +55,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ [Event(name="dragMove", type="org.apache.flex.events.DragEvent")] @@ -65,7 +65,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ [Event(name="dragEnd", type="org.apache.flex.events.DragEvent")] @@ -79,7 +79,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class DragMouseController extends EventDispatcher implements IBead { @@ -90,7 +90,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public static var dragging:Boolean = false; @@ -100,7 +100,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public static var dragImage:IUIBase; @@ -110,7 +110,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public static var dragImageOffsetX:Number = 0; @@ -120,7 +120,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public static var dragImageOffsetY:Number = 0; @@ -131,7 +131,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public static var defaultThreshold:int = 4; @@ -141,7 +141,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function DragMouseController() { @@ -155,7 +155,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public var threshold:int = 4; @@ -167,7 +167,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function set strand(value:IStrand):void { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96ee5429/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as index 6f39239..f9eee77 100644 --- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as +++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as @@ -40,7 +40,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ [Event(name="dragEnter", type="org.apache.flex.events.DragEvent")] @@ -51,7 +51,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ [Event(name="dragOver", type="org.apache.flex.events.DragEvent")] @@ -62,7 +62,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ [Event(name="dragExit", type="org.apache.flex.events.DragEvent")] @@ -72,7 +72,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ [Event(name="dragDrop", type="org.apache.flex.events.DragEvent")] @@ -85,7 +85,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public class DropMouseController extends EventDispatcher implements IBead { @@ -95,7 +95,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function DropMouseController() { @@ -109,7 +109,7 @@ package org.apache.flex.html.beads.controllers * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 - * @productversion FlexJS 0.0 + * @productversion FlexJS 0.8 */ public function set strand(value:IStrand):void { @@ -144,7 +144,7 @@ package org.apache.flex.html.beads.controllers */ private function dragMoveHandler(event:DragEvent):void { - trace("DROP-MOUSE: dragMove" + event.target.toString()); +// trace("DROP-MOUSE: dragMove" + event.target.toString()); var dragEvent:DragEvent; if (!inside) { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96ee5429/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 381c96f..ba07658 100644 --- a/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml +++ b/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml @@ -23,6 +23,7 @@ <component id="SingleSelectionDragImageBead" class="org.apache.flex.html.beads.SingleSelectionDragImageBead" /> <component id="SingleSelectionDragSourceBead" class="org.apache.flex.html.beads.SingleSelectionDragSourceBead" /> + <component id="SingleSelectionDropIndicatorBead" class="org.apache.flex.html.beads.SingleSelectionDropIndicatorBead"/> <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" />