You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2019/12/02 11:44:03 UTC

[royale-asjs] branch develop updated: Added multi drag and drop example

This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new f07bb2f  Added multi drag and drop example
f07bb2f is described below

commit f07bb2f8a506d9bec65120634c54bc96bc81589e
Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
AuthorDate: Mon Dec 2 13:42:52 2019 +0200

    Added multi drag and drop example
---
 .../DragAndDropExample.as3proj                     | 91 ++++++++++++++++++++++
 examples/royale/MultiDragDropExample/asconfig.json | 31 ++++++++
 examples/royale/MultiDragDropExample/build.xml     | 54 +++++++++++++
 examples/royale/MultiDragDropExample/pom.xml       | 85 ++++++++++++++++++++
 .../src/main/royale/MultiDragAndDropExample.mxml   | 80 +++++++++++++++++++
 5 files changed, 341 insertions(+)

diff --git a/examples/royale/MultiDragDropExample/DragAndDropExample.as3proj b/examples/royale/MultiDragDropExample/DragAndDropExample.as3proj
new file mode 100644
index 0000000..743b2bb
--- /dev/null
+++ b/examples/royale/MultiDragDropExample/DragAndDropExample.as3proj
@@ -0,0 +1,91 @@
+<?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.
+
+-->
+<project>
+  <output>
+    <movie version="11"/>
+    <movie disabled="False"/>
+    <movie height="600"/>
+    <movie fps="60"/>
+    <movie background="#FFFFFF"/>
+    <movie path="bin-debug/DragAndDropExample.swf"/>
+    <movie width="800"/>
+    <movie input=""/>
+  </output>
+  &lt;!-- Other classes to be compiled into your SWF --&gt;
+  <classpaths>
+    <class path="src/main/royale"/>
+  </classpaths>
+  <moonshineResourcePaths>
+    <class path="src/main/resources/assets"/>
+  </moonshineResourcePaths>
+  <build>
+    <option customSDK=""/>
+    <option strict="True"/>
+    <option accessible="False"/>
+    <option useNetwork="True"/>
+    <option allowSourcePathOverlap="False"/>
+    <option useResourceBundleMetadata="True"/>
+    <option benchmark="False"/>
+    <option warnings="True"/>
+    <option additional=""/>
+    <option es="False"/>
+    <option locale=""/>
+    <option loadConfig=""/>
+    <option linkReport=""/>
+    <option optimize="False"/>
+    <option verboseStackTraces="False"/>
+    <option staticLinkRSL="False"/>
+    <option showBindingWarnings="True"/>
+    <option compilerConstants=""/>
+    <option showDeprecationWarnings="True"/>
+    <option antBuildPath="build/build.xml"/>
+    <option showActionScriptWarnings="True"/>
+    <option showUnusedTypeSelectorWarnings="True"/>
+  </build>
+  <includeLibraries></includeLibraries>
+  <libraryPaths></libraryPaths>
+  <externalLibraryPaths></externalLibraryPaths>
+  <rslPaths></rslPaths>
+  <intrinsics></intrinsics>
+  <library></library>
+  <compileTargets>
+    <compile path="src/main/royale/DragAndDropExample.mxml"/>
+  </compileTargets>
+  <hiddenPaths></hiddenPaths>
+  <preBuildCommand>null</preBuildCommand>
+  <postBuildCommand alwaysRun="False">null</postBuildCommand>
+  <options>
+    <option defaultBuildTargets=""/>
+    <option testMovie=""/>
+    <option testMovieCommand=""/>
+    <option showHiddenPaths="False"/>
+  </options>
+  <moonshineRunCustomization>
+    <option deviceSimulator="null"/>
+    <option targetPlatform="2"/>
+    <option projectType="2"/>
+    <option launchMethod="Simulator"/>
+    <option urlToLaunch=""/>
+    <deviceSimulator>null</deviceSimulator>
+    <certAndroid>null</certAndroid>
+    <certIos>null</certIos>
+    <certIosProvisioning>null</certIosProvisioning>
+  </moonshineRunCustomization>
+</project>
\ No newline at end of file
diff --git a/examples/royale/MultiDragDropExample/asconfig.json b/examples/royale/MultiDragDropExample/asconfig.json
new file mode 100644
index 0000000..e5f97e9
--- /dev/null
+++ b/examples/royale/MultiDragDropExample/asconfig.json
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+{
+    "config": "royale",
+    "compilerOptions": {
+        "debug": false,
+        "targets": ["JSRoyale","SWF"],
+        "source-map": true
+    },
+    "additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions",
+    "files":
+    [
+        "src/main/royale/MultiDragAndDropExample.mxml"
+    ]
+}
diff --git a/examples/royale/MultiDragDropExample/build.xml b/examples/royale/MultiDragDropExample/build.xml
new file mode 100644
index 0000000..a716aa1
--- /dev/null
+++ b/examples/royale/MultiDragDropExample/build.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="multidraganddropexample" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../.."/>
+    <property name="example" value="MultiDragAndDropExample" />
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${ROYALE_HOME}/build.properties"/>
+    <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+    
+    <include file="${basedir}/../../build_example.xml" />
+
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+        <delete dir="${basedir}/target" failonerror="false" />
+    </target>
+
+    <target name="examine" depends="build_example.get.browser">
+        <property name="which" value="debug" />
+        <echo message="Make sure list appears."/>
+        <exec executable="${browser}" dir="${basedir}/bin-${which}" failonerror="true">
+            <arg value="${basedir}/bin-${which}/${example}.html"/>
+        </exec>
+        <exec executable="${browser}" dir="${basedir}/bin/js-${which}" failonerror="true">
+            <arg value="${basedir}/bin/js-${which}/index.html"/>
+        </exec>
+    </target>
+
+</project>
diff --git a/examples/royale/MultiDragDropExample/pom.xml b/examples/royale/MultiDragDropExample/pom.xml
new file mode 100644
index 0000000..a45ba30
--- /dev/null
+++ b/examples/royale/MultiDragDropExample/pom.xml
@@ -0,0 +1,85 @@
+<?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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <!--
+        Flash Version: CSS problems
+  -->
+
+  <parent>
+    <groupId>org.apache.royale.examples</groupId>
+    <artifactId>examples-royale</artifactId>
+    <version>0.9.7-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>MultiDragAndDropExample</artifactId>
+  <version>0.9.7-SNAPSHOT</version>
+  <packaging>swf</packaging>
+
+  <name>Apache Royale: Examples: Royale: MultiDragAndDropExample</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.royale.compiler</groupId>
+        <artifactId>royale-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <mainClass>MultiDragAndDropExample.mxml</mainClass>
+          <targets>${royale.targets}</targets>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>DragDrop</artifactId>
+      <version>0.9.7-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>BasicTheme</artifactId>
+      <version>0.9.7-SNAPSHOT</version>
+      <type>swc</type>
+      <scope>theme</scope>
+    </dependency>
+  </dependencies>
+
+  <profiles>
+    <profile>
+      <id>option-with-swf</id>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.royale.framework</groupId>
+          <artifactId>DragDrop</artifactId>
+          <version>0.9.7-SNAPSHOT</version>
+          <type>swc</type>
+          <classifier>swf</classifier>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
+
+</project>
diff --git a/examples/royale/MultiDragDropExample/src/main/royale/MultiDragAndDropExample.mxml b/examples/royale/MultiDragDropExample/src/main/royale/MultiDragAndDropExample.mxml
new file mode 100644
index 0000000..7879704
--- /dev/null
+++ b/examples/royale/MultiDragDropExample/src/main/royale/MultiDragAndDropExample.mxml
@@ -0,0 +1,80 @@
+<?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.
+//
+////////////////////////////////////////////////////////////////////////////////
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+	xmlns:js="library://ns.apache.org/royale/basic"
+	applicationComplete="applicationCompleteHandler()"
+	>
+
+	<fx:Script>
+		<![CDATA[
+		import org.apache.royale.collections.ArrayList;
+		private function applicationCompleteHandler():void
+		{
+			var dp:Array = [];
+			dp.push("Item 1");
+			dp.push("Item 2");
+			dp.push("Item 3");
+			dp.push("Item 4");
+			dp.push("Item 5");
+			dp.push("Item 6");
+			dp.push("Item 7");
+			dp.push("Item 8");
+			dp.push("Item 9");
+			dp.push("Item 10");
+			dp.push("Item 11");
+			dp.push("Item 12");
+			dp.push("Item 13");
+			dp.push("Item 14");
+			dp.push("Item 15");
+			dp.push("Item 16");
+			dp.push("Item 17");
+			dp.push("Item 18");
+			dp.push("Item 19");
+			dp.push("Item 20");
+			dp.push("Item 21");
+			dp.push("Item 22");
+			myList1.dataProvider = dp;
+			myList2.dataProvider = [];
+		}
+		]]>
+	</fx:Script>
+	<js:valuesImpl>
+		<js:SimpleCSSValuesImpl />
+	</js:valuesImpl>
+	<js:initialView>
+		<js:View>
+			<js:HContainer width="1200">
+				<js:MultiSelectionList id="myList1" width="600" height="400">
+					<js:beads>
+						<js:MultiSelectionDragSourceBead dragType="move" />
+						<js:MultiSelectionDragImageBead />
+					</js:beads>
+				</js:MultiSelectionList>
+				<js:MultiSelectionList id="myList2" width="600" height="400">
+					<js:beads>
+						<js:SensitiveMultiSelectionDropTargetBead />
+						<js:SingleSelectionDropIndicatorBead />
+					</js:beads>
+				</js:MultiSelectionList>
+			</js:HContainer>
+		</js:View>
+	</js:initialView>
+</js:Application>