|
From: <tre...@us...> - 2007-09-02 20:04:49
|
Revision: 338
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=338&view=rev
Author: trevorolio
Date: 2007-09-02 13:04:48 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
Added a basic sanity check with the viewer applet during the integration tests.
It doesn't do much more than load a space with a test cube for the moment.
This test does not check that the applet will load properly from the server, but simply that the java code will actually open a space client, load a thing via the web api, and render it once.
Modified Paths:
--------------
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
Modified: maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
===================================================================
--- maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2007-09-02 20:04:44 UTC (rev 337)
+++ maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2007-09-02 20:04:48 UTC (rev 338)
@@ -43,7 +43,7 @@
import com.ogoglio.viewer.render.Renderer;
public class ViewerApplet extends Applet {
-
+
public static final String MOVE_NONCE = "move";
private SplashPanel splashPanel = new SplashPanel();
@@ -130,6 +130,31 @@
validate();
}
+ public void destroy() {
+ if (renderer != null) {
+ renderer.stopRenderer();
+ }
+ if (spaceClient != null) {
+ spaceClient.cleanup();
+ }
+ }
+
+ public void stop() {
+ if (renderer != null) {
+ renderer.stopRenderer();
+ }
+ if (spaceClient != null) {
+ spaceClient.cleanup();
+ }
+ }
+
+ public boolean completedInitialLoad(){
+ if(renderer == null){
+ return false;
+ }
+ return renderer.completedInitialLoad();
+ }
+
private float getFloatParameter(String name, float defaultValue) {
String stringValue = getParameter(name);
if (stringValue == null || stringValue.trim().length() == 0) {
@@ -183,7 +208,7 @@
spaceClient.mouseContextItemChosen(thing, nonce, id);
}
- public void populatePopup(long nonce, String errorIfAny, Vector contextMenu) {
+ private void populatePopup(long nonce, String errorIfAny, Vector contextMenu) {
if (!popupMap.containsKey(new Long(nonce))) {
System.err.println("[Internal Error] context menu data (" + nonce + ") couldn't be matched to a menu!");
return;
@@ -272,16 +297,6 @@
return spaceClient.getUsername();
}
- public void destroy() {
- renderer.stopRenderer();
- spaceClient.cleanup();
- }
-
- public void stop() {
- renderer.stopRenderer();
- spaceClient.cleanup();
- }
-
private class SpaceClientListener implements SpaceClient.Listener {
public void disconnected() {
@@ -359,7 +374,7 @@
}
});
addSeparator();
-
+
waitingItem = add("Retreiving menu...");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|