[openwonderland-modules] r2017 committed - merged patches

1 view
Skip to first unread message

openwonderl...@googlecode.com

unread,
Jul 19, 2013, 7:31:22 AM7/19/13
to openwonder...@googlegroups.com
Revision: 2017
Author: vdju...@gmail.com
Date: Fri Jul 19 04:30:48 2013
Log: merged patches
http://code.google.com/p/openwonderland-modules/source/detail?r=2017

Added:

/trunk/0.5/stable/poster/src/classes/org/jdesktop/wonderland/modules/poster/client/resources/Poster-icon.png

/trunk/0.5/unstable/EZScript/src/classes/org/jdesktop/wonderland/modules/ezscript/client/animation/PlayFrameRange.java

/trunk/0.5/unstable/programming-demo/src/classes/org/jdesktop/wonderland/modules/programmingdemo/client/resources/Programming-demo-icon.png
Modified:
/trunk/0.5/stable/admin-tools/my.module.properties

/trunk/0.5/stable/image-viewer/src/classes/org/jdesktop/wonderland/modules/imageviewer/client/cell/ImageViewerCellFactory.java
/trunk/0.5/stable/modules-stable.properties
/trunk/0.5/stable/movierecorder-module/lib/jmf.jar
/trunk/0.5/stable/poster/build.xml

/trunk/0.5/stable/poster/src/classes/org/jdesktop/wonderland/modules/poster/client/PosterCellFactory.java
/trunk/0.5/stable/quick-reference/my.module.properties

/trunk/0.5/unstable/EZScript/src/classes/org/jdesktop/wonderland/modules/ezscript/client/EZScriptComponent.java

/trunk/0.5/unstable/EZScript/src/classes/org/jdesktop/wonderland/modules/ezscript/client/ScriptedObjectDataSource.java

/trunk/0.5/unstable/programming-demo/src/classes/org/jdesktop/wonderland/modules/programmingdemo/client/SortCellFactory.java

=======================================
--- /dev/null
+++
/trunk/0.5/stable/poster/src/classes/org/jdesktop/wonderland/modules/poster/client/resources/Poster-icon.png
Fri Jul 19 04:30:48 2013
Binary file, no diff available.
=======================================
--- /dev/null
+++
/trunk/0.5/unstable/EZScript/src/classes/org/jdesktop/wonderland/modules/ezscript/client/animation/PlayFrameRange.java
Fri Jul 19 04:30:48 2013
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) 2013, WonderBuilders, Inc., All Rights Reserved
+ */
+
+
+package org.jdesktop.wonderland.modules.ezscript.client.animation;
+
+import com.wonderbuilders.modules.animation.client.AnimationComponent;
+import org.jdesktop.wonderland.client.cell.Cell;
+import org.jdesktop.wonderland.modules.ezscript.client.SPI.ScriptMethodSPI;
+import
org.jdesktop.wonderland.modules.ezscript.client.annotation.ScriptMethod;
+
+/**
+ * This method will play frame range of Collada animation in model. Frame
range is identified
+ * by name assigned to it in Animation capability.
+ *
+ * @author Vladimir Djurovic
+ */
+@ScriptMethod
+public class PlayFrameRange implements ScriptMethodSPI {
+
+ /**
+ * Function name as used in EZScript.
+ */
+ private static final String FUNCTION_NAME = "playFrameRange";
+
+ /**
+ * Object cell.
+ */
+ private Cell cell;
+
+ /**
+ * Name of the frame range to play.
+ */
+ private String frameRangeName;
+
+ /**
+ * Returns function name as used in EZScript.
+ *
+ * @return function name
+ */
+ public String getFunctionName() {
+ return FUNCTION_NAME;
+ }
+
+ /**
+ * Set arguments for function. Two arguments are required: cell and
name
+ * of the frame range.
+ *
+ * @param args function arguments
+ */
+ public void setArguments(Object[] args) {
+ cell = (Cell)args[0];
+ frameRangeName = (String)args[1];
+ }
+
+ public String getDescription() {
+ StringBuilder sb = new StringBuilder("Usage:
playFrameRange(cell,ranegName)\n");
+ sb.append("- plays frame range defined with Animation capability");
+ return sb.toString();
+ }
+
+ public String getCategory() {
+ return "Object Movement";
+ }
+
+ /**
+ * Execute function within script context.
+ */
+ public void run() {
+ AnimationComponent animationComp =
cell.getComponent(AnimationComponent.class);
+ if(animationComp == null){
+ throw new IllegalStateException("Animation capability not
present. Please add Animation capability to cell.");
+ }
+ animationComp.executeAnimationCommand(frameRangeName);
+ }
+
+}
=======================================
--- /dev/null
+++
/trunk/0.5/unstable/programming-demo/src/classes/org/jdesktop/wonderland/modules/programmingdemo/client/resources/Programming-demo-icon.png
Fri Jul 19 04:30:48 2013
Binary file, no diff available.
=======================================
--- /trunk/0.5/stable/admin-tools/my.module.properties Sun Aug 22 18:47:58
2010
+++ /trunk/0.5/stable/admin-tools/my.module.properties Fri Jul 19 04:30:48
2013
@@ -22,7 +22,7 @@
# Property: wonderland.dir (required)
# The location of the Wonderland source
#
-wonderland.dir=${current.dir}/../wonderland
+wonderland.dir=${current.dir}/../../../../../wonderland

#
# Property: module.plugin.src (optional)
=======================================
---
/trunk/0.5/stable/image-viewer/src/classes/org/jdesktop/wonderland/modules/imageviewer/client/cell/ImageViewerCellFactory.java
Tue Sep 29 07:08:15 2009
+++
/trunk/0.5/stable/image-viewer/src/classes/org/jdesktop/wonderland/modules/imageviewer/client/cell/ImageViewerCellFactory.java
Fri Jul 19 04:30:48 2013
@@ -49,7 +49,7 @@
private static Logger logger =
Logger.getLogger(ImageViewerCellFactory.class.getName());

public String[] getExtensions() {
- return new String[] { "png", "jpg", "jpeg", "gif" };
+ return new String[] { "png", "jpg", "jpeg", "gif","bmp" };
}

public <T extends CellServerState> T
getDefaultCellServerState(Properties props) {
=======================================
--- /trunk/0.5/stable/modules-stable.properties Mon Apr 27 16:16:08 2009
+++ /trunk/0.5/stable/modules-stable.properties Fri Jul 19 04:30:48 2013
@@ -1,4 +1,4 @@
# properties file used to override values when the entire modules directory
# is checked out (as opposed to just a single module)

-wonderland.dir=${current.dir}/../../../wonderland
+wonderland.dir=${current.dir}/../../../../wonderland
=======================================
--- /trunk/0.5/stable/movierecorder-module/lib/jmf.jar Mon Jan 25 12:13:32
2010
+++ /trunk/0.5/stable/movierecorder-module/lib/jmf.jar Fri Jul 19 04:30:48
2013
File is too large to display a diff.
=======================================
--- /trunk/0.5/stable/poster/build.xml Thu Mar 29 10:59:40 2012
+++ /trunk/0.5/stable/poster/build.xml Fri Jul 19 04:30:48 2013
@@ -59,6 +59,7 @@
<include name="${module.src}/common/**"/>
<fileset dir="${current.dir}/src/classes">
<include
name="${module.src}/client/resources/**/*.properties"/>
+ <include
name="${module.src}/client/resources/**/*.png"/>
</fileset>
</clientjar>
</client>
=======================================
---
/trunk/0.5/stable/poster/src/classes/org/jdesktop/wonderland/modules/poster/client/PosterCellFactory.java
Wed Jan 26 01:43:53 2011
+++
/trunk/0.5/stable/poster/src/classes/org/jdesktop/wonderland/modules/poster/client/PosterCellFactory.java
Fri Jul 19 04:30:48 2013
@@ -38,6 +38,8 @@
import com.jme.bounding.BoundingSphere;
import com.jme.math.Vector3f;
import java.awt.Image;
+import java.awt.Toolkit;
+import java.net.URL;
import java.util.Properties;
import java.util.ResourceBundle;
import org.jdesktop.wonderland.client.cell.registry.annotation.CellFactory;
@@ -76,6 +78,7 @@
}

public Image getPreviewImage() {
- return null;
+ URL url =
PosterCellFactory.class.getResource("resources/Poster-icon.png");
+ return Toolkit.getDefaultToolkit().getImage(url);
}
}
=======================================
--- /trunk/0.5/stable/quick-reference/my.module.properties Wed Oct 21
13:54:17 2009
+++ /trunk/0.5/stable/quick-reference/my.module.properties Fri Jul 19
04:30:48 2013
@@ -22,7 +22,7 @@
# Property: wonderland.dir (required)
# The location of the Wonderland source
#
-wonderland.dir=${current.dir}/../../../wonderland
+wonderland.dir=${current.dir}/../../../../wonderland

#
# Property: module.plugin.src (optional)
=======================================
---
/trunk/0.5/unstable/EZScript/src/classes/org/jdesktop/wonderland/modules/ezscript/client/EZScriptComponent.java
Mon Aug 20 13:31:52 2012
+++
/trunk/0.5/unstable/EZScript/src/classes/org/jdesktop/wonderland/modules/ezscript/client/EZScriptComponent.java
Fri Jul 19 04:30:48 2013
@@ -1162,6 +1162,32 @@
}
}
}
+
+ public void executeScript(final String script) {
+ try {
+ //execute script typed in Scripting Editor
+ System.out.println("executing script externally...");
+ //scriptEngine.eval(script.getValue(), scriptBindings);
+ //Need to add this script to the script editor panel.
+ clearCallbacks();
+
+ executor.submit(new Runnable() {
+ public void run() {
+// evaluateScript(script);
+ synchronized (scriptEngine) {
+ try {
+ scriptEngine.eval(script, scriptBindings);
+ } catch (Exception e) {
+ processException(e);
+ }
+ }
+ }
+ });
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }

class ProximityListenerImpl implements ProximityListener {

=======================================
---
/trunk/0.5/unstable/EZScript/src/classes/org/jdesktop/wonderland/modules/ezscript/client/ScriptedObjectDataSource.java
Mon Aug 20 13:31:52 2012
+++
/trunk/0.5/unstable/EZScript/src/classes/org/jdesktop/wonderland/modules/ezscript/client/ScriptedObjectDataSource.java
Fri Jul 19 04:30:48 2013
@@ -12,7 +12,6 @@
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
-import javax.swing.SwingUtilities;
import org.jdesktop.wonderland.client.cell.registry.annotation.CellFactory;
import org.jdesktop.wonderland.client.cell.registry.spi.CellFactorySPI;
import org.jdesktop.wonderland.client.login.LoginManager;
@@ -24,7 +23,6 @@
import org.jdesktop.wonderland.modules.ezscript.client.annotation.*;
import
org.jdesktop.wonderland.modules.ezscript.client.generators.GeneratedCellMethod;
import
org.jdesktop.wonderland.modules.ezscript.client.generators.javascript.*;
-import
org.jdesktop.wonderland.modules.ezscript.client.virtuals.VirtualObjectFactorySPI;

/**
*
=======================================
---
/trunk/0.5/unstable/programming-demo/src/classes/org/jdesktop/wonderland/modules/programmingdemo/client/SortCellFactory.java
Sat Aug 7 08:58:26 2010
+++
/trunk/0.5/unstable/programming-demo/src/classes/org/jdesktop/wonderland/modules/programmingdemo/client/SortCellFactory.java
Fri Jul 19 04:30:48 2013
@@ -18,6 +18,8 @@
package org.jdesktop.wonderland.modules.programmingdemo.client;

import java.awt.Image;
+import java.awt.Toolkit;
+import java.net.URL;
import java.util.Properties;
import org.jdesktop.wonderland.client.cell.registry.annotation.CellFactory;
import org.jdesktop.wonderland.client.cell.registry.spi.CellFactorySPI;
@@ -50,6 +52,7 @@
}

public Image getPreviewImage() {
- return null;
+ URL url =
SortCellFactory.class.getResource("resources/Programming-demo-icon.png");
+ return Toolkit.getDefaultToolkit().getImage(url);
}
}
Reply all
Reply to author
Forward
0 new messages