|
From: <tre...@us...> - 2007-09-18 16:03:59
|
Revision: 419
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=419&view=rev
Author: trevorolio
Date: 2007-09-18 09:03:54 -0700 (Tue, 18 Sep 2007)
Log Message:
-----------
Added the ability to choose a male or female avatar.
Both avatar models still need work.
Consolidated the two UIConstants classes into one.
Modified Paths:
--------------
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/BodyAppletTestWindow.java
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/BodyAppletTestWindow.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/BodyAppletTestWindow.java 2007-09-18 16:03:36 UTC (rev 418)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/BodyAppletTestWindow.java 2007-09-18 16:03:54 UTC (rev 419)
@@ -19,8 +19,6 @@
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Frame;
-import java.awt.GraphicsDevice;
-import java.awt.GraphicsEnvironment;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
@@ -36,7 +34,7 @@
public class BodyAppletTestWindow extends Frame {
- Dimension appDimension = new Dimension(500, 500);
+ Dimension appDimension = new Dimension(500, 520);
public BodyEditorApplet applet = null;
@@ -44,19 +42,17 @@
URI serviceURI = null;
- public BodyAppletTestWindow(URI serviceURI, String authCookie, Dimension appDimension, boolean decorated) {
- ArgumentUtils.assertNotNull(appDimension);
- this.appDimension = appDimension;
+ public BodyAppletTestWindow(URI serviceURI, String authCookie) {
+ setTitle("Body Editor");
+
ArgumentUtils.assertNotNull(serviceURI);
this.serviceURI = serviceURI;
-
+
setLayout(new BorderLayout());
setSize(appDimension);
setLocation(30, 50);
setResizable(false);
- if (!decorated) {
- this.setUndecorated(true);
- }
+
HashMap parameters1 = new HashMap();
parameters1.put("loginCookie", authCookie);
parameters1.put("serviceURI", serviceURI.toString());
@@ -118,13 +114,6 @@
}
public static void main(String[] args) {
- GraphicsEnvironment graphicsEnv = GraphicsEnvironment.getLocalGraphicsEnvironment();
- GraphicsDevice device = graphicsEnv.getDefaultScreenDevice();
- Dimension dim = new Dimension(1024, 800);
- boolean fullScreen = args.length > 0 && "fullscreen".equals(args[0]);
- if (fullScreen) {
- dim = new Dimension(device.getDisplayMode().getWidth(), device.getDisplayMode().getWidth());
- }
String serviceURI=null;
String loginCookie=null;
try {
@@ -140,11 +129,8 @@
}
try {
- BodyAppletTestWindow test = new BodyAppletTestWindow(new URI(serviceURI), loginCookie, dim, fullScreen);
+ BodyAppletTestWindow test = new BodyAppletTestWindow(new URI(serviceURI), loginCookie);
test.setVisible(true);
- if (fullScreen) {
- device.setFullScreenWindow(test);
- }
test.start();
} catch (URISyntaxException e) {
e.printStackTrace();
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-09-18 16:03:36 UTC (rev 418)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-09-18 16:03:54 UTC (rev 419)
@@ -49,8 +49,8 @@
import com.ogoglio.util.Log;
import com.ogoglio.util.PropStorage;
import com.ogoglio.util.StreamUtils;
+import com.ogoglio.util.UIConstants;
import com.ogoglio.util.WebConstants;
-import com.ogoglio.viewer.render.UIConstants;
import com.ogoglio.xml.AccountDocument;
import com.ogoglio.xml.AuthDocument;
import com.ogoglio.xml.BodyDocument;
@@ -315,9 +315,28 @@
assertEquals(basicAuthenticator.getAuthDocument(true).getUsername(), testWindow.applet.getUsername());
testWindow.cleanup();
+ BodyAppletTestWindow bodyWindow = openBodyAppletTestWindow(basicAuthenticator);
+ bodyWindow.cleanup();
+
basicWebClient.deleteSpace(spaceDocument.getSpaceID());
}
+ private BodyAppletTestWindow openBodyAppletTestWindow(WebAPIAuthenticator authenticator) {
+ BodyAppletTestWindow bodyWindow = new BodyAppletTestWindow(descriptor1.getServiceURI(), authenticator.getAuthCookie());
+ bodyWindow.setVisible(true);
+ bodyWindow.start();
+
+ long startTime = System.currentTimeMillis();
+ while (!bodyWindow.applet.completedInitialLoad() && System.currentTimeMillis() < startTime + 10000) {
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ }
+ }
+ assertTrue(bodyWindow.applet.completedInitialLoad());
+ return bodyWindow;
+ }
+
private AppletTestWindow openAppletTestWindow(SpaceDocument spaceDocument, WebAPIAuthenticator authenticator) {
AppletTestWindow testWindow = new AppletTestWindow(descriptor1.getServiceURI(), spaceDocument.getSpaceID(), authenticator.getAuthCookie(), new Dimension(500, 500), true);
testWindow.setVisible(true);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|