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 2012/08/06 22:17:23 UTC
svn commit: r1369970 [5/16] - in
/incubator/flex/trunk/mustella/tests/Managers: ./ CursorManager/
CursorManager/Methods/ CursorManager/Props/ CursorManager/SWFs/
CursorManager/SWFs/Assets/ DragManager/ DragManager/Events/
DragManager/Halo/ DragManager/...
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/DragManager_customcursors_RTL.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/DragManager_customcursors_RTL.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/DragManager_customcursors_RTL.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/DragManager_customcursors_RTL.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!--
+
+ 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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="800" height="600"
+ >
+
+<mx:Script>
+ <![CDATA[
+
+ import mx.managers.DragManager;
+ import mx.collections.ArrayCollection;
+
+ var date1:Date = new Date(2007,4,20);
+ var date2:Date = new Date(2007,0,15);
+ var date3:Date = new Date(2007,9,24);
+
+
+ [Bindable]
+ public var myData:Array = [
+ {label:"Toys", available:false, quantity: 0, shipDate: date1, url: "../../../../../Assets/Images/redrect.jpg", color: "Red"},
+ {label:"Stuffed Animals", available:false, quantity: 0, shipDate: date1, url: "../../../../../Assets/Images/orangerect.jpg", color: "Red"},
+ {label:"Stuffed Bears", available:true, quantity: 2, shipDate: date2, url: "../../../../../Assets/Images/brownrect.jpg", color: "Green"},
+ {label:"Dinosaur", available:true, quantity: 8, shipDate: date1, url: "../../../../../Assets/Images/purplerect.jpg", color: "Fuscia"},
+ {label:"Movies", available:true, quantity: 9, shipDate: date1, url: "../../../../../Assets/Images/yellowrect.jpg", color: "Yellow"},
+ {label:"Games", available:false, quantity: 0, shipDate: date2, url: "../../../../../Assets/Images/greenrect.jpg", color: "Black"},
+ {label:"Board Games", available:false, quantity: 0, shipDate: date3, url: "../../../../../Assets/Images/bluerect.jpg", color: "Black"},
+ {label:"White Squares", available:true, quantity: 4, shipDate: date3, url: "../../../../../Assets/Images/whiterect.jpg", color: "White"},
+ {label:"Some Action Figure", available:false, quantity: 0, shipDate: date1, url: "../../../../../Assets/Images/blackrect.jpg", color: "Rose"},
+ {label:"Video Game",available:true, quantity: 8, shipDate: date3, url: "../../../../../Assets/Images/cyanrect.jpg", color: "Periwinkle"},
+ ];
+ ]]>
+
+</mx:Script>
+
+<mx:Style source="assets/myStyles.css" />
+<mx:Style>
+@namespace "library://ns.adobe.com/flex/mx";
+
+ DragManager {
+ copyCursor: Embed(source="../../../../Assets/Images/bluerect.jpg");
+ linkCursor: Embed(source="../../../../Assets/Images/purplerect.jpg");
+ moveCursor: Embed(source="../../../../Assets/Images/greenrect.jpg");
+ rejectCursor: Embed(source="../../../../Assets/Images/orangerect.jpg");
+ }
+</mx:Style>
+<mx:HBox>
+ <mx:List id="firstList"
+ width="250"
+ dragEnabled="true"
+ dragMoveEnabled = "true"
+ allowMultipleSelection="true"
+ dropEnabled="true"
+ dataProvider="{myData}" />
+
+ <mx:List id="secondList"
+ dropEnabled="true"
+ width="250"
+ />
+</mx:HBox>
+
+</mx:Application>
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/DragManager_customcursors_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/DragManager_customcursors_spark.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/DragManager_customcursors_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/DragManager_customcursors_spark.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!--
+
+ 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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" width="800" height="600">
+<s:layout>
+ <s:VerticalLayout />
+</s:layout>
+<fx:Script>
+ <![CDATA[
+
+ import mx.managers.DragManager;
+
+]]>
+
+</fx:Script>
+
+<fx:Style source="assets/myStyles.css" />
+<fx:Style>
+ @namespace s "library://ns.adobe.com/flex/spark";
+ @namespace mx "library://ns.adobe.com/flex/mx";
+
+ mx|DragManager {
+ copyCursor: Embed(source="../../../../Assets/Images/bluerect.jpg");
+ linkCursor: Embed(source="../../../../Assets/Images/purplerect.jpg");
+ moveCursor: Embed(source="../../../../Assets/Images/greenrect.jpg");
+ rejectCursor: Embed(source="../../../../Assets/Images/orangerect.jpg");
+ }
+</fx:Style>
+<mx:HBox>
+ <mx:List id="firstList"
+ width="250"
+ dragEnabled="true"
+ dragMoveEnabled = "true"
+ allowMultipleSelection="true"
+ dropEnabled="true"
+
+ />
+
+ <mx:List id="secondList"
+ dropEnabled="true"
+ width="250"
+ />
+</mx:HBox>
+
+</s:Application>
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares.compile
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares.compile?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares.compile (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares.compile Mon Aug 6 20:17:09 2012
@@ -0,0 +1 @@
+ -theme=${flexlib}/themes/Halo/halo.swc
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!--
+
+ 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.
+
+-->
+<mx:Application backgroundColor="0xFFFFFF" backgroundImage="" xmlns:mx="http://www.adobe.com/2006/mxml" width="600" height="600" paddingLeft="6" paddingRight="6" creationComplete="appInit()" borderStyle="solid">
+
+ <mx:Script>
+ <![CDATA[
+ import mx.managers.DragManager;
+ import mx.core.DragSource;
+ import mx.containers.VBox;
+ import mx.collections.*;
+ import mx.events.DragEvent;
+
+ public function dragIt(event:*, text:String, format:*) :void {
+ var ds:DragSource = new DragSource();
+
+ ds.addData(text, format);
+ var di:VBox = new VBox();
+ mx.managers.DragManager.doDrag(event.currentTarget, ds, event, di , 30, 30 );
+ event.preventDefault();
+ }
+
+ public function doDragEnter(event:*, format:*) :void {
+ if (event.dragSource.hasFormat(format) || format == "any")
+ {
+ mx.managers.DragManager.acceptDragDrop(event.target);
+
+ }
+ event.preventDefault();
+ }
+
+ public function doDragOver(event:DragEvent) :void {
+
+ if (event.ctrlKey)
+ mx.managers.DragManager.showFeedback(mx.managers.DragManager.COPY);
+ else if (event.shiftKey)
+ mx.managers.DragManager.showFeedback(mx.managers.DragManager.LINK);
+ else
+ mx.managers.DragManager.showFeedback(mx.managers.DragManager.MOVE);
+
+ event.preventDefault();
+ }
+
+ public function doDragDrop (event:DragEvent, target:*, formats:*) :void {
+ var prefix:String = "";
+
+ if (event.action == mx.managers.DragManager.COPY)
+ prefix = "Copy of ";
+ else if (event.action == mx.managers.DragManager.LINK)
+ prefix = "LinkButton to ";
+
+
+ for (var i:int = 0; i < formats.length; i++)
+ {
+ var data:* = event.dragSource.dataForFormat(formats[i]);
+ trace(data);
+ if (data != undefined)
+ IList(target.dataProvider).addItem(prefix + data);
+ }
+ event.preventDefault();
+ }
+
+ public function appInit() :void {
+ firstList.dataProvider = [];
+ secondList.dataProvider = [];
+ thirdList.dataProvider=[];
+ }
+
+ ]]>
+ </mx:Script>
+
+<mx:Text width="100%" text="Drag squares into lists. Verify first list only accepts red squares, second list only accepts blue squares, and third list accepts red, blue, and green squares " />
+
+
+ <mx:Tile width="200" id="tileComp">
+ <mx:Canvas id="canvas1" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 1', 'red')">
+ <mx:Label text="1" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas2" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 2', 'red')">
+ <mx:Label text="2" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas3" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 3', 'red')">
+ <mx:Label text="3" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas4" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 4', 'red')">
+ <mx:Label text="4" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas5" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 5', 'red')">
+ <mx:Label text="5" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas6" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#0000FF" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Blue 1', 'blue')">
+ <mx:Label text="1" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas7" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#0000FF" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Blue 2', 'blue')">
+ <mx:Label text="2" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas8" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#0000FF" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Blue 3', 'blue')">
+ <mx:Label text="3" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas9" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#0000FF" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Blue 4', 'blue')">
+ <mx:Label text="4" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas10" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#0000FF" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Blue 5', 'blue')">
+ <mx:Label text="5" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas11" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#00FF00" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Green 1', 'green')">
+ <mx:Label text="1" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas12" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#00FF00" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Green 2', 'green')">
+ <mx:Label text="2" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas13" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#00FF00" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Green 3', 'green')">
+ <mx:Label text="3" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas14" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#00FF00" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Green 4', 'green')">
+ <mx:Label text="4" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas15" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#00FF00" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Green 5', 'green')">
+ <mx:Label text="5" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ </mx:Tile>
+ <mx:VBox>
+ <mx:Label text="Drag red items into this list" />
+ <mx:List dragEnter="doDragEnter(event, 'red')"
+ dragOver="doDragOver(event);"
+ dragDrop="doDragDrop(event, firstList, ['red'])"
+ id="firstList"
+ dropEnabled="true"
+ width="250"
+ />
+ <mx:Label text="Drag blue items into this list" />
+ <mx:List dragEnter="doDragEnter(event, 'blue')"
+ dragOver="doDragOver(event);"
+ dragDrop="doDragDrop(event, secondList, ['blue'])"
+ id="secondList"
+ dropEnabled="true"
+ width="250"
+ />
+ <mx:Label text="Drag any items into this list" />
+ <mx:List dragEnter="doDragEnter(event, 'any')"
+ dragOver="doDragOver(event);"
+ dragDrop="doDragDrop(event, thirdList, ['red','blue','green'])"
+ id="thirdList"
+ dropEnabled="true"
+ width="250"
+ />
+ </mx:VBox>
+</mx:Application>
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares_spark.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/Drag_Custom_Squares_spark.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!--
+
+ 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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" width="600" height="600" creationComplete="appInit()"
+ skinClass="FxApplicationSkin2">
+<s:layout>
+ <s:VerticalLayout />
+</s:layout>
+ <fx:Script>
+ <![CDATA[
+ import mx.managers.DragManager;
+ import mx.core.DragSource;
+ import mx.containers.VBox;
+ import mx.collections.*;
+ import mx.events.DragEvent;
+
+ public function dragIt(event:*, text:String, format:*) :void {
+ var ds:DragSource = new DragSource();
+
+ ds.addData(text, format);
+ var di:VBox = new VBox();
+ mx.managers.DragManager.doDrag(event.currentTarget, ds, event, di , 30, 30 );
+ event.preventDefault();
+ }
+
+ public function doDragEnter(event:*, format:*) :void {
+ if (event.dragSource.hasFormat(format) || format == "any")
+ {
+ mx.managers.DragManager.acceptDragDrop(event.target);
+
+ }
+ event.preventDefault();
+ }
+
+ public function doDragOver(event:DragEvent) :void {
+
+ if (event.ctrlKey)
+ mx.managers.DragManager.showFeedback(mx.managers.DragManager.COPY);
+ else if (event.shiftKey)
+ mx.managers.DragManager.showFeedback(mx.managers.DragManager.LINK);
+ else
+ mx.managers.DragManager.showFeedback(mx.managers.DragManager.MOVE);
+
+ event.preventDefault();
+ }
+
+ public function doDragDrop (event:DragEvent, target:*, formats:*) :void {
+ var prefix:String = "";
+
+ if (event.action == mx.managers.DragManager.COPY)
+ prefix = "Copy of ";
+ else if (event.action == mx.managers.DragManager.LINK)
+ prefix = "LinkButton to ";
+
+
+ for (var i:int = 0; i < formats.length; i++)
+ {
+ var data:* = event.dragSource.dataForFormat(formats[i]);
+ trace(data);
+ if (data != undefined)
+ IList(target.dataProvider).addItem(prefix + data);
+ }
+ event.preventDefault();
+ }
+
+ public function appInit() :void {
+ firstList.dataProvider = [];
+ secondList.dataProvider = [];
+ thirdList.dataProvider=[];
+ }
+
+ ]]>
+ </fx:Script>
+
+<mx:Text width="100%" text="Drag squares into lists. Verify first list only accepts red squares, second list only accepts blue squares, and third list accepts red, blue, and green squares " />
+
+
+ <mx:Tile width="200" id="tileComp">
+ <mx:Canvas id="canvas1" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 1', 'red')">
+ <mx:Label text="1" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas2" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 2', 'red')">
+ <mx:Label text="2" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas3" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 3', 'red')">
+ <mx:Label text="3" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas4" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 4', 'red')">
+ <mx:Label text="4" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas5" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 5', 'red')">
+ <mx:Label text="5" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas6" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#0000FF" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Blue 1', 'blue')">
+ <mx:Label text="1" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas7" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#0000FF" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Blue 2', 'blue')">
+ <mx:Label text="2" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas8" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#0000FF" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Blue 3', 'blue')">
+ <mx:Label text="3" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas9" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#0000FF" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Blue 4', 'blue')">
+ <mx:Label text="4" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas10" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#0000FF" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Blue 5', 'blue')">
+ <mx:Label text="5" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas11" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#00FF00" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Green 1', 'green')">
+ <mx:Label text="1" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas12" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#00FF00" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Green 2', 'green')">
+ <mx:Label text="2" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas13" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#00FF00" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Green 3', 'green')">
+ <mx:Label text="3" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas14" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#00FF00" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Green 4', 'green')">
+ <mx:Label text="4" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ <mx:Canvas id="canvas15" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#00FF00" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Green 5', 'green')">
+ <mx:Label text="5" x="8" y="6" width="22" height="24"/>
+ </mx:Canvas>
+ </mx:Tile>
+ <mx:VBox>
+ <mx:Label text="Drag red items into this list" />
+ <mx:List dragEnter="doDragEnter(event, 'red')"
+ dragOver="doDragOver(event);"
+ dragDrop="doDragDrop(event, firstList, ['red'])"
+ id="firstList"
+ dropEnabled="true"
+ width="250"
+ />
+ <mx:Label text="Drag blue items into this list" />
+ <mx:List dragEnter="doDragEnter(event, 'blue')"
+ dragOver="doDragOver(event);"
+ dragDrop="doDragDrop(event, secondList, ['blue'])"
+ id="secondList"
+ dropEnabled="true"
+ width="250"
+ />
+ <mx:Label text="Drag any items into this list" />
+ <mx:List dragEnter="doDragEnter(event, 'any')"
+ dragOver="doDragOver(event);"
+ dragDrop="doDragDrop(event, thirdList, ['red','blue','green'])"
+ id="thirdList"
+ dropEnabled="true"
+ width="250"
+ />
+ </mx:VBox>
+</s:Application>
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/FxApplicationSkin2.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/FxApplicationSkin2.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/FxApplicationSkin2.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/FxApplicationSkin2.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ 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.
+
+-->
+
+<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
+
+ <fx:Metadata>
+ [HostComponent("spark.components.Application")]
+ </fx:Metadata>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- fill -->
+ <s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{hostComponent.getStyle('backgroundColor') as uint}" />
+ </s:fill>
+ </s:Rect>
+
+ <s:Scroller left="1" top="1" right="1" bottom="1" id="scroller">
+ <s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" />
+ </s:Scroller>
+</s:Skin>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/assets/myStyles.css
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/assets/myStyles.css?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/assets/myStyles.css (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/assets/myStyles.css Mon Aug 6 20:17:09 2012
@@ -0,0 +1,52 @@
+/*
+ *
+ * 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.
+ *
+ */
+@font-face {
+ src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+ fontFamily: "MyVerdana";
+ embedAsCFF: false;
+}
+
+@font-face {
+ src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+ fontFamily: "MyVerdana";
+ fontWeight: bold;
+ embedAsCFF: false;
+}
+
+@font-face {
+ src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+ fontFamily: "MyVerdana";
+ fontStyle: italic;
+ embedAsCFF: false;
+}
+
+@font-face {
+ src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-BoldItalic.ttf");
+ fontFamily: "MyVerdana";
+ fontWeight: bold;
+ fontStyle: italic;
+ embedAsCFF: false;
+}
+
+global {
+ fontFamily: "MyVerdana";
+ fontAntiAliasType: "normal";
+}
+
+
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/CustomComp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/CustomComp.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/CustomComp.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/CustomComp.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+ 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.
+
+-->
+ <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="0xFF2499">
+ <mx:Label color="yellow" fontSize="15" text="{data.label}" />
+ <mx:Text width="150" text="{data.color}" />
+ </mx:VBox>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/DragDataGrid.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/DragDataGrid.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/DragDataGrid.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/DragDataGrid.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ 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.
+
+-->
+<mx:DataGrid xmlns:mx="http://www.adobe.com/2006/mxml" width="350" height="200"
+ dragEnabled="true" dropEnabled="true">
+
+</mx:DataGrid>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/DragList.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/DragList.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/DragList.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/DragList.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ 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.
+
+-->
+<mx:List xmlns:mx="http://www.adobe.com/2006/mxml" width="250" height="200"
+ dragEnabled="true" dropEnabled="true">
+
+</mx:List>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/MXMLcomp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/MXMLcomp.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/MXMLcomp.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/SWFs/comps/MXMLcomp.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+ 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.
+
+-->
+ <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
+ <mx:Image id="img" width="200" height="200" source="@Embed('../../../../../Assets/Images/unknown.jpg')"/>
+ </mx:VBox>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_Cursors_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_Cursors_spark.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_Cursors_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_Cursors_spark.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ 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.
+
+-->
+<UnitTester testDir="Managers/DragManager/Spark/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="DragManager_customcursors_spark.mxml">
+
+ <mx:Script>
+ <![CDATA[
+ import data.ListDataAS;
+ import comps.DragList;
+ import comps.DragDataGrid;
+ import comps.CustomComp;
+
+ public static function init(o:DisplayObject):void
+ {
+
+ }
+
+ private function addData(component:Object): void
+ {
+ var newData:ListDataAS = new ListDataAS();
+ component.dataProvider = newData.myData;
+ }
+ ]]>
+ </mx:Script>
+
+ <mx:Metadata>
+ <![CDATA[
+ [Mixin]
+ ]]>
+ </mx:Metadata>
+
+ <testCases>
+ <TestCase testID="DragManager_copyCursor" description="Test that a custom copyCursor works." keywords="[DragManager, copyCursor, List]">
+ <setup>
+ <ResetComponent target="firstList" className="mx.controls.List" waitTarget="firstList" waitEvent="updateComplete" />
+ <SetProperty propertyName="dragEnabled" value="true" target="firstList" />
+ <SetProperty propertyName="width" value="250" target="firstList" />
+ <RunCode code="addData(application.firstList)" waitTarget="firstList" waitEvent="updateComplete" />
+ <ResetComponent target="secondList" className="mx.controls.List" waitTarget="secondList" waitEvent="updateComplete" />
+ <SetProperty propertyName="dropEnabled" value="true" target="secondList" />
+ <SetProperty propertyName="width" value="250" target="secondList" />
+ </setup>
+ <body>
+ <DispatchMouseEvent target="firstList.mx_internal:rendererArray.0.0" type="mouseOver" localX="5" localY="5" />
+ <DispatchMouseEvent target="firstList.mx_internal:rendererArray.0.0" type="mouseDown" localX="5" localY="5" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="100" localY="75" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="200" localY="75" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="260" localY="75" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="350" localY="75" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="480" localY="85" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <CompareBitmap target="secondList" url="../Spark/baselines/copyCursor_custom.png" timeout="2500" />
+ <DispatchMouseEvent target="stage" type="mouseUp" localX="480" localY="85" waitTarget="secondList" waitEvent="dragDrop" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_moveCursor" description="Test that a custom moveCursor works." keywords="[DragManager, moveCursor, List]">
+ <setup>
+ <ResetComponent target="firstList" className="mx.controls.List" waitTarget="firstList" waitEvent="updateComplete" />
+ <SetProperty propertyName="dragEnabled" value="true" target="firstList" />
+ <SetProperty propertyName="width" value="250" target="firstList" />
+ <SetProperty propertyName="dragMoveEnabled" value="true" target="firstList" />
+ <RunCode code="addData(application.firstList)" waitTarget="firstList" waitEvent="updateComplete" />
+ <ResetComponent target="secondList" className="mx.controls.List" waitTarget="secondList" waitEvent="updateComplete" />
+ <SetProperty propertyName="dropEnabled" value="true" target="secondList" />
+ <SetProperty propertyName="width" value="250" target="secondList" />
+ </setup>
+ <body>
+ <DispatchMouseEvent target="firstList.mx_internal:rendererArray.0.0" type="mouseOver" localX="5" localY="5" />
+ <DispatchMouseEvent target="firstList.mx_internal:rendererArray.0.0" type="mouseDown" localX="5" localY="5" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="100" localY="75" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="190" localY="75" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="250" localY="75" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="340" localY="75" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="450" localY="75" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <CompareBitmap target="secondList" url="../Spark/baselines/moveCursor_custom.png" timeout="2500" />
+ <DispatchMouseEvent target="stage" type="mouseUp" localX="450" localY="75" waitTarget="secondList" waitEvent="dragDrop" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_rejectCursor" description="Test that a custom rejectCursor works." keywords="[DragManager, rejectCursor, List]">
+ <setup>
+ <ResetComponent target="firstList" className="mx.controls.List" waitTarget="firstList" waitEvent="updateComplete" />
+ <SetProperty propertyName="dragEnabled" value="true" target="firstList" />
+ <SetProperty propertyName="width" value="250" target="firstList" />
+ <SetProperty propertyName="dragMoveEnabled" value="true" target="firstList" />
+ <RunCode code="addData(application.firstList)" waitTarget="firstList" waitEvent="updateComplete" />
+ <ResetComponent target="secondList" className="mx.controls.List" waitTarget="secondList" waitEvent="updateComplete" />
+ <SetProperty propertyName="width" value="250" target="secondList" />
+ </setup>
+ <body>
+ <DispatchMouseEvent target="firstList.mx_internal:rendererArray.0.0" type="mouseOver" localX="5" localY="5" />
+ <DispatchMouseEvent target="firstList.mx_internal:rendererArray.0.0" type="mouseDown" localX="5" localY="5" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="100" localY="75" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" />
+ <WaitForEffectsToEnd />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="190" localY="75" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <WaitForEffectsToEnd />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="250" localY="75" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <WaitForEffectsToEnd />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="340" localY="75" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <WaitForEffectsToEnd />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="450" localY="70" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="secondList" url="../Spark/baselines/rejectCursor_custom.png" timeout="2500" />
+ <DispatchMouseEvent target="stage" type="mouseUp" localX="450" localY="70" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_CustomTests_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_CustomTests_spark.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_CustomTests_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_CustomTests_spark.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ 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.
+
+-->
+<UnitTester testDir="Managers/DragManager/Spark/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="DragManager_Custom_spark.mxml">
+
+ <mx:Script>
+ <![CDATA[
+
+ import mx.styles.StyleManager;
+
+ public static function init(o:DisplayObject):void
+ {
+
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Metadata>
+ <![CDATA[
+ [Mixin]
+ ]]>
+ </mx:Metadata>
+
+ <testCases>
+<!-- custom drag of an Image -->
+ <TestCase testID="DragManager_custom_image" description="Test that you can drag an image by creating a DragSource." keywords="[DragManager, DragSource]">
+ <body>
+ <DispatchMouseEvent target="myImage" type="mouseOver" localX="15" localY="15" />
+ <DispatchMouseEvent target="myImage" type="mouseDown" localX="15" localY="15" buttonDown="true" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="20" localY="30" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="50" localY="60" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="100" localY="75" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseUp" localX="100" localY="75" buttonDown="true"
+ waitTarget="myImage" waitEvent="dragComplete" />
+ <AssertPropertyValue target="myImage" propertyName="x" value="85" />
+ <AssertPropertyValue target="myImage" propertyName="y" value="60" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_custom_mxmlComp" description="Test that you can drag an mxml component by creating a DragSource." keywords="[DragManager, DragSource]">
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchMouseEvent target="comp" type="mouseOver" localX="15" localY="15" />
+ <DispatchMouseEvent target="comp" type="mouseDown" localX="15" localY="15" buttonDown="true" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="20" localY="280" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="50" localY="310" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="100" localY="325" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseUp" localX="100" localY="325" buttonDown="true"
+ waitTarget="comp" waitEvent="dragComplete" />
+ <AssertPropertyValue target="comp" propertyName="x" value="85" />
+ <AssertPropertyValue target="comp" propertyName="y" value="310" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_custom_dragOffset" description="Test that your dragProxy is correct when setting a dragOffset." keywords="[DragManager, dragOffset, DragSource]">
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchMouseEvent target="myImage2" type="mouseOver" localX="15" localY="15" />
+ <DispatchMouseEvent target="myImage2" type="mouseDown" localX="15" localY="15" buttonDown="true" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="240" localY="180" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="200" localY="160" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="150" localY="130" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <AssertPropertyValue target="mx.managers::DragManager.mx_internal:dragProxy" propertyName="x" value="35" />
+ <AssertPropertyValue target="mx.managers::DragManager.mx_internal:dragProxy" propertyName="y" value="15" />
+ <DispatchMouseEvent target="v1" type="mouseUp" localX="150" localY="130" buttonDown="true"
+ waitTarget="myImage2" waitEvent="dragComplete" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_custom_defaultDragImageSkin" description="Test that your custom defaultDragImageSkin is correct." keywords="[DragManager, defaultDragImageSkin, DragSource]">
+ <setup>
+ <WaitForEffectsToEnd />
+ <ResetComponent target="myImage2" className="mx.controls.Image" waitTarget="myImage2" waitEvent="updateComplete" />
+ <ResetComponent target="myImage" className="mx.controls.Image" waitTarget="myImage" waitEvent="updateComplete" />
+ <RunCode code="application.myImage.addEventListener('mouseDown', application.callDrag)" />
+ <SetProperty target="myImage" propertyName="source" valueExpression="value='../../../../Assets/Images/unknown.jpg'" waitEvent="complete" waitTarget="myImage" />
+ </setup>
+ <body>
+ <DispatchMouseEvent target="myImage" type="mouseOver" localX="15" localY="15" />
+ <DispatchMouseEvent target="myImage" type="mouseDown" localX="15" localY="15" buttonDown="true" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="20" localY="30" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="50" localY="60" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="100" localY="75" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="v1" url="../Spark/baselines/customDragProxy.png" timeout="2500" numColorVariances="3" ignoreMaxColorVariance="true"/>
+ <DispatchMouseEvent target="v1" type="mouseUp" localX="100" localY="75" buttonDown="true"
+ waitTarget="myImage" waitEvent="dragComplete" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_CustomTests_spark_RTL.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_CustomTests_spark_RTL.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_CustomTests_spark_RTL.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_CustomTests_spark_RTL.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ 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.
+
+-->
+<UnitTester testDir="Managers/DragManager/Spark/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="DragManager_Custom_spark_RTL.mxml">
+
+ <mx:Script>
+ <![CDATA[
+
+ import mx.styles.StyleManager;
+
+ public static function init(o:DisplayObject):void
+ {
+
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Metadata>
+ <![CDATA[
+ [Mixin]
+ ]]>
+ </mx:Metadata>
+
+ <testCases>
+<!-- custom drag of an Image -->
+ <TestCase testID="DragManager_Mirroring_image" description="Test that you can drag an image by creating a DragSource." keywords="[DragManager, Mirroring, DragSource]">
+ <body>
+ <DispatchMouseEvent target="myImage" type="mouseOver" localX="15" localY="15" />
+ <DispatchMouseEvent target="myImage" type="mouseDown" localX="15" localY="15" buttonDown="true" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="20" localY="30" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="50" localY="60" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="100" localY="75" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseUp" localX="100" localY="75" buttonDown="true"
+ waitTarget="myImage" waitEvent="dragComplete" />
+ <AssertPropertyValue target="myImage" propertyName="x" value="85" />
+ <AssertPropertyValue target="myImage" propertyName="y" value="60" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_Mirroring_mxmlComp" description="Test that you can drag an mxml component by creating a DragSource." keywords="[DragManager, Mirroring, DragSource]">
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchMouseEvent target="comp" type="mouseOver" localX="15" localY="15" />
+ <DispatchMouseEvent target="comp" type="mouseDown" localX="15" localY="15" buttonDown="true" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="20" localY="280" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="50" localY="310" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="100" localY="325" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseUp" localX="100" localY="325" buttonDown="true"
+ waitTarget="comp" waitEvent="dragComplete" />
+ <AssertPropertyValue target="comp" propertyName="x" value="85" />
+ <AssertPropertyValue target="comp" propertyName="y" value="310" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_Mirroring_dragOffset" description="Test that your dragProxy is correct when setting a dragOffset." keywords="[DragManager, Mirroring, dragOffset, DragSource]">
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchMouseEvent target="myImage2" type="mouseOver" localX="15" localY="15" />
+ <DispatchMouseEvent target="myImage2" type="mouseDown" localX="15" localY="15" buttonDown="true" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="240" localY="180" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="200" localY="160" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="150" localY="130" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <AssertPropertyValue target="mx.managers::DragManager.mx_internal:dragProxy" propertyName="x" value="535" />
+ <AssertPropertyValue target="mx.managers::DragManager.mx_internal:dragProxy" propertyName="y" value="15" />
+ <DispatchMouseEvent target="v1" type="mouseUp" localX="150" localY="130" buttonDown="true"
+ waitTarget="myImage2" waitEvent="dragComplete" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_Mirroring_defaultDragImageSkin" description="Test that your custom defaultDragImageSkin is correct." keywords="[DragManager, Mirroring, defaultDragImageSkin, DragSource]">
+ <setup>
+ <WaitForEffectsToEnd />
+ <ResetComponent target="myImage2" className="mx.controls.Image" waitTarget="myImage2" waitEvent="updateComplete" />
+ <ResetComponent target="myImage" className="mx.controls.Image" waitTarget="myImage" waitEvent="updateComplete" />
+ <RunCode code="application.myImage.addEventListener('mouseDown', application.callDrag)" />
+ <SetProperty target="myImage" propertyName="source" valueExpression="value='../../../../Assets/Images/unknown.jpg'" waitEvent="complete" waitTarget="myImage" />
+ </setup>
+ <body>
+ <DispatchMouseEvent target="myImage" type="mouseOver" localX="15" localY="15" />
+ <DispatchMouseEvent target="myImage" type="mouseDown" localX="15" localY="15" buttonDown="true" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="20" localY="30" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="50" localY="60" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="v1" type="mouseMove" localX="100" localY="75" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="v1" url="../Spark/baselines/$testID.png" timeout="2500" numColorVariances="3" ignoreMaxColorVariance="true"/>
+ <DispatchMouseEvent target="v1" type="mouseUp" localX="100" localY="75" buttonDown="true"
+ waitTarget="myImage" waitEvent="dragComplete" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_Squares_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_Squares_spark.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_Squares_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_Squares_spark.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ 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.
+
+-->
+<UnitTester testDir="Managers/DragManager/Spark/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="Drag_Custom_Squares_spark.mxml">
+
+ <mx:Script>
+ <![CDATA[
+
+ import mx.events.DragEvent;
+ import mx.controls.List;
+
+ public static function init(o:DisplayObject):void
+ {
+
+ }
+
+ public var accepted:Array;
+ public function addListenersToList(myList:List, acceptedValues:Array): void
+ {
+ myList.addEventListener('dragEnter', callDragEnter);
+ myList.addEventListener('dragOver', application.doDragOver);
+ myList.addEventListener('dragDrop', callDragDrop);
+ accepted = acceptedValues;
+ }
+
+ public function callDragEnter(event:DragEvent): void
+ {
+ if(accepted.length == 1)
+ {
+ application.doDragEnter(event, accepted[0]);
+ }
+ else
+ {
+ application.doDragEnter(event, 'any');
+ }
+ }
+
+ public function callDragDrop(event:DragEvent): void
+ {
+ application.doDragDrop(event, event.target, accepted);
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Metadata>
+ <![CDATA[
+ [Mixin]
+ ]]>
+ </mx:Metadata>
+
+ <testCases>
+ <TestCase testID="DragManager_dragCanvasRed" description="Test that a custom drag object that is a Canvas" keywords="[DragManager, Custom, List]">
+ <body>
+ <DispatchMouseEvent target="canvas1" type="mouseOver" localX="5" localY="5" />
+ <DispatchMouseEvent target="canvas1" type="mouseDown" localX="5" localY="5" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="110" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="135" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="170" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="200" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="220" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="stage" type="mouseUp" localX="215" localY="220" waitTarget="firstList" waitEvent="dragDrop" />
+ <AssertPropertyValue propertyName="length" value="1" target="firstList.dataProvider" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_dragCanvasRedReject" description="Test that a custom drag object that is a Canvas" keywords="[DragManager, Custom, List]">
+ <setup>
+ <ResetComponent target="firstList" className="mx.controls.List" waitTarget="firstList" waitEvent="updateComplete" />
+ <SetProperty target="firstList" propertyName="dataProvider" valueExpression="value=[]" />
+ <RunCode code="addListenersToList(application.firstList, ['red'])" />
+ <SetProperty target="firstList" propertyName="dropEnabled" value="true" />
+ <SetProperty target="firstList" propertyName="width" value="250" waitEvent="updateComplete" waitTarget="firstList"/>
+ </setup>
+ <body>
+ <DispatchMouseEvent target="canvas6" type="mouseOver" localX="5" localY="5" />
+ <DispatchMouseEvent target="canvas6" type="mouseDown" localX="5" localY="5" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="110" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="135" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="170" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="200" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="220" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseUp" localX="215" localY="220" />
+ <WaitForEffectsToEnd />
+ <AssertPropertyValue propertyName="length" value="0" target="firstList.dataProvider" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_dragCanvasBlue" description="Test that a custom drag object that is a Canvas" keywords="[DragManager, Custom, List]">
+ <body>
+ <DispatchMouseEvent target="canvas6" type="mouseOver" localX="5" localY="5" />
+ <DispatchMouseEvent target="canvas6" type="mouseDown" localX="5" localY="5" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="110" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="135" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="170" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="200" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="230" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="260" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="320" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="350" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="390" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseUp" localX="215" localY="390" waitEvent="dragDrop" waitTarget="secondList" />
+ <AssertPropertyValue propertyName="length" value="0" target="firstList.dataProvider" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_dragCanvasBlue_afterScrolling" description="Test dropTargets after Scrolling" keywords="[DragManager, dropTarget, Scrolling, List]">
+ <setup>
+ <ResetComponent target="secondList" className="mx.controls.List" waitTarget="secondList" waitEvent="updateComplete" />
+ <SetProperty target="secondList" propertyName="dataProvider" valueExpression="value=[]" />
+ <RunCode code="addListenersToList(application.secondList, ['blue'])" />
+ <SetProperty target="secondList" propertyName="dropEnabled" value="true" />
+ <SetProperty target="secondList" propertyName="width" value="250" waitEvent="updateComplete" waitTarget="secondList"/>
+ </setup>
+ <body>
+ <DispatchMouseEvent type="rollOver" target="skin.scroller.verticalScrollBar.incrementButton" localX="2" localY="2" />
+ <DispatchMouseEvent type="mouseDown" target="skin.scroller.verticalScrollBar.incrementButton" localX="5" localY="5" waitEvent="buttonDown" />
+ <DispatchMouseEvent type="mouseUp" target="skin.scroller.verticalScrollBar.incrementButton" localX="5" localY="5" waitEvent="updateComplete" />
+ <DispatchMouseEvent target="canvas7" type="mouseOver" localX="5" localY="5" />
+ <DispatchMouseEvent target="canvas7" type="mouseDown" localX="5" localY="5" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="110" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="135" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="170" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="200" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="230" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="260" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="320" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="350" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="366" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseUp" localX="215" localY="366" waitEvent="dragDrop" waitTarget="secondList" />
+ <AssertPropertyValue propertyName="length" value="1" target="secondList.dataProvider" />
+ </body>
+ </TestCase>
+ <TestCase testID="DragManager_dragCanvasGreen_afterScrolling" description="Test dropTargets after Scrolling" keywords="[DragManager, dropTarget, Scrolling, List]">
+ <setup>
+ <DispatchMouseEvent type="rollOver" target="skin.scroller.verticalScrollBar.decrementButton" localX="2" localY="2" />
+ <DispatchMouseEvent type="mouseDown" target="skin.scroller.verticalScrollBar.decrementButton" localX="5" localY="5" waitEvent="buttonDown" />
+ <DispatchMouseEvent type="mouseUp" target="skin.scroller.verticalScrollBar.decrementButton" localX="5" localY="5" waitEvent="updateComplete" />
+ </setup>
+ <body>
+ <DispatchMouseEvent type="rollOver" target="skin.scroller.verticalScrollBar.incrementButton" localX="2" localY="2" />
+ <DispatchMouseEvent type="mouseDown" target="skin.scroller.verticalScrollBar.incrementButton" localX="5" localY="5" waitEvent="buttonDown" />
+ <DispatchMouseEvent type="mouseUp" target="skin.scroller.verticalScrollBar.incrementButton" localX="5" localY="5" waitEvent="updateComplete" />
+ <DispatchMouseEvent target="canvas11" type="mouseOver" localX="5" localY="5" />
+ <DispatchMouseEvent target="canvas11" type="mouseDown" localX="5" localY="5" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="110" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="135" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="170" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="200" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="230" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="260" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="330" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="370" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="420" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="470" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="510" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="215" localY="550" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseUp" localX="215" localY="550" waitEvent="dragDrop" waitTarget="thirdList" />
+ <AssertPropertyValue propertyName="length" value="1" target="thirdList.dataProvider" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_TileListToTree_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_TileListToTree_spark.mxml?rev=1369970&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_TileListToTree_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Managers/DragManager/Spark/DragManager_TileListToTree_spark.mxml Mon Aug 6 20:17:09 2012
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ 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.
+
+-->
+<UnitTester testDir="Managers/DragManager/Spark/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="DragManager_Tree_spark.mxml">
+
+ <mx:Script>
+ <![CDATA[
+ import data.ListDataAS;
+ import comps.DragList;
+ import comps.DragDataGrid;
+ import comps.CustomComp;
+ import mx.collections.XMLListCollection;
+
+ public static function init(o:DisplayObject):void
+ {
+
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Metadata>
+ <![CDATA[
+ [Mixin]
+ ]]>
+ </mx:Metadata>
+
+ <testCases>
+ <!--- drag from Tree to TileList -->
+ <TestCase testID="DragManager_TileList2Tree" description="Test that a drag from Tree to TileList works." keywords="[DragManager, TileList, Tree]">
+ <body>
+ <DispatchMouseEvent target="destTree.mx_internal:rendererArray.1.0" type="mouseOver" localX="15" localY="15" />
+ <DispatchMouseEvent target="destTree.mx_internal:rendererArray.1.0" type="mouseDown" localX="15" localY="15" buttonDown="true" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="214" localY="360" buttonDown="true"
+ waitTarget="mx.managers::DragManager.mx_internal:dragProxy" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="214" localY="345" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="214" localY="325" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="214" localY="315" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" />
+ <DispatchMouseEvent target="stage" type="mouseMove" localX="214" localY="275" buttonDown="true" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" />
+ <DispatchMouseEvent target="stage" type="mouseUp" localX="214" localY="275" waitTarget="srcTileList" waitEvent="dragDrop" />
+ <WaitForEffectsToEnd />
+ <AssertPropertyValue propertyName="length" target="srcTileList.dataProvider" value="2" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>