|
From: <tre...@us...> - 2007-09-02 17:22:52
|
Revision: 331
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=331&view=rev
Author: trevorolio
Date: 2007-09-02 10:22:46 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
Changed the name of ContextMenuInfo to ContextMenuItemInfo (for some reason) which required changes in: Java classes which are used in the script contexts, all of the javascripts that create said objects, and the ContextMenu[Item]Info classes themselves.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/SpaceScriptEngine.java
maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js
maven/trunk/ogoglio-server/src/main/resources/populate/template-42/TV.js
maven/trunk/ogoglio-server/src/test/resources/templates/TestCube.js
Added Paths:
-----------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptContextMenuItemInfo.java
Removed Paths:
-------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptContextMenuInfo.java
Deleted: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptContextMenuInfo.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptContextMenuInfo.java 2007-09-02 17:22:42 UTC (rev 330)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptContextMenuInfo.java 2007-09-02 17:22:46 UTC (rev 331)
@@ -1,41 +0,0 @@
-package com.ogoglio.sim.script;
-
-import org.mozilla.javascript.ScriptableObject;
-
-import com.ogoglio.util.ContextMenuInfo;
-
-public class ScriptContextMenuInfo extends ScriptableObject {
-
- public static final String JS_CLASS_NAME="ContextMenuInfo";
-
- //required by superclass
- public String getClassName() {
- return JS_CLASS_NAME;
- }
-
- //this object has to be here (aggregation) b/c it is used on the client side of the wire and we don't
- //want the client linked against JS machinery
- private ContextMenuInfo info;
-
-
- public void jsConstructor(String textToShow, boolean notGrayedOut, String forCallback) {
-
- info=new ContextMenuInfo();
- info.setValues(textToShow, notGrayedOut, forCallback);
- }
-
-
- public String getUserVisibleString() {
- return info.getUserVisibleString();
- }
-
-
- public boolean getEnabled() {
- return info.getEnabled();
- }
-
-
- public String getId() {
- return info.getId();
- }
-}
Copied: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptContextMenuItemInfo.java (from rev 317, maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptContextMenuInfo.java)
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptContextMenuItemInfo.java (rev 0)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptContextMenuItemInfo.java 2007-09-02 17:22:46 UTC (rev 331)
@@ -0,0 +1,41 @@
+package com.ogoglio.sim.script;
+
+import org.mozilla.javascript.ScriptableObject;
+
+import com.ogoglio.util.ContextMenuItemInfo;
+
+public class ScriptContextMenuItemInfo extends ScriptableObject {
+
+ public static final String JS_CLASS_NAME="ContextMenuItemInfo";
+
+ //required by superclass
+ public String getClassName() {
+ return JS_CLASS_NAME;
+ }
+
+ //this object has to be here (aggregation) b/c it is used on the client side of the wire and we don't
+ //want the client linked against JS machinery
+ private ContextMenuItemInfo info;
+
+
+ public void jsConstructor(String textToShow, boolean notGrayedOut, String forCallback) {
+
+ info=new ContextMenuItemInfo();
+ info.setValues(textToShow, notGrayedOut, forCallback);
+ }
+
+
+ public String getUserVisibleString() {
+ return info.getUserVisibleString();
+ }
+
+
+ public boolean getEnabled() {
+ return info.getEnabled();
+ }
+
+
+ public String getId() {
+ return info.getId();
+ }
+}
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/SpaceScriptEngine.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/SpaceScriptEngine.java 2007-09-02 17:22:42 UTC (rev 330)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/SpaceScriptEngine.java 2007-09-02 17:22:46 UTC (rev 331)
@@ -36,7 +36,7 @@
import com.ogoglio.client.model.User;
import com.ogoglio.sim.SpaceSimulator;
import com.ogoglio.util.ArgumentUtils;
-import com.ogoglio.util.ContextMenuInfo;
+import com.ogoglio.util.ContextMenuItemInfo;
import com.ogoglio.util.TwoWayMap;
import com.ogoglio.xml.SpaceEvent;
@@ -76,7 +76,7 @@
ScriptableObject.defineClass(globalScope, ScriptMath.class);
ScriptableObject.defineClass(globalScope, ScriptHTTPRequest.class);
ScriptableObject.defineClass(globalScope, ScriptHTTPResponse.class);
- ScriptableObject.defineClass(globalScope, ScriptContextMenuInfo.class);
+ ScriptableObject.defineClass(globalScope, ScriptContextMenuItemInfo.class);
scriptSpace = (ScriptSpace) constructorContext.newObject(globalScope, "Space", new Object[0]);
scriptSpace.setSpaceSimulator(spaceSimulator);
@@ -203,8 +203,8 @@
for (int i = 0; i < resultArray.length; ++i) {
ScriptableObject candidate = (ScriptableObject) resultArray[i];
- if (!(candidate.getClassName().equals(ScriptContextMenuInfo.JS_CLASS_NAME))) {
- spaceSimulator.log("Javascript Error: onContextClick(...) returned an array with things other than ContextMenuInfos: " + thingID);
+ if (!(candidate.getClassName().equals(ScriptContextMenuItemInfo.JS_CLASS_NAME))) {
+ spaceSimulator.log("Javascript Error: onContextClick(...) returned an array with things other than ContextMenuItemInfos: " + thingID);
spaceSimulator.getListener().generatedSpaceEventForUser(username, resultEvent, spaceSimulator);
return;
}
@@ -213,8 +213,8 @@
//this is so we can use the same types on the client side
Vector changedTypeObjects = new Vector();
for (int i = 0; i < resultArray.length; ++i) {
- ScriptContextMenuInfo infoWithJSBaggage = (ScriptContextMenuInfo) resultArray[i];
- ContextMenuInfo infoNoJS = new ContextMenuInfo();
+ ScriptContextMenuItemInfo infoWithJSBaggage = (ScriptContextMenuItemInfo) resultArray[i];
+ ContextMenuItemInfo infoNoJS = new ContextMenuItemInfo();
infoNoJS.setValues(infoWithJSBaggage.getUserVisibleString(), infoWithJSBaggage.getEnabled(), infoWithJSBaggage.getId());
changedTypeObjects.add(infoNoJS);
}
Modified: maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js 2007-09-02 17:22:42 UTC (rev 330)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js 2007-09-02 17:22:46 UTC (rev 331)
@@ -54,7 +54,7 @@
function onContextClick(username, shapeName){
var items = new Array();
for(var i=0; i < actions.length; i++){
- items[items.length] = new ContextMenuInfo(actions[i].displayName, true, actions[i].nonce);
+ items[items.length] = new ContextMenuItemInfo(actions[i].displayName, true, actions[i].nonce);
}
return items;
}
Modified: maven/trunk/ogoglio-server/src/main/resources/populate/template-42/TV.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-42/TV.js 2007-09-02 17:22:42 UTC (rev 330)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-42/TV.js 2007-09-02 17:22:46 UTC (rev 331)
@@ -36,7 +36,7 @@
function onContextClick(person, shapeName){
var items = new Array();
for(var i=0; i < channels.length; i++){
- items[items.length] = new ContextMenuInfo(channels[i].displayName, true, channels[i].nonce);
+ items[items.length] = new ContextMenuItemInfo(channels[i].displayName, true, channels[i].nonce);
}
return items;
}
Modified: maven/trunk/ogoglio-server/src/test/resources/templates/TestCube.js
===================================================================
--- maven/trunk/ogoglio-server/src/test/resources/templates/TestCube.js 2007-09-02 17:22:42 UTC (rev 330)
+++ maven/trunk/ogoglio-server/src/test/resources/templates/TestCube.js 2007-09-02 17:22:46 UTC (rev 331)
@@ -18,8 +18,8 @@
}
function onContextClick(person, shapeName){
- var monkeyItem = new ContextMenuInfo("Monkey", true, "monkey");
- var deadItem = new ContextMenuInfo("Groove", false, "groove");
+ var monkeyItem = new ContextMenuItemInfo("Monkey", true, "monkey");
+ var deadItem = new ContextMenuItemInfo("Groove", false, "groove");
return new Array(monkeyItem, deadItem);
}
@@ -35,4 +35,4 @@
function onService(method, parameterNames, parameterValues){
var html = "<html><body><h1>I am a test cube:</h1><img src='/og/icons/32x32/face-monkey.png' /></body></html>";
return new HTTPResponse(200, html, "text/html");
-}
\ No newline at end of file
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|