|
From: <tre...@us...> - 2007-08-28 23:53:34
|
Revision: 288
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=288&view=rev
Author: trevorolio
Date: 2007-08-28 16:53:35 -0700 (Tue, 28 Aug 2007)
Log Message:
-----------
Removed the test window and moved it into the integration tests module.
Removed Paths:
-------------
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/AppletTestWindow.java
Deleted: maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/AppletTestWindow.java
===================================================================
--- maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/AppletTestWindow.java 2007-08-28 23:53:00 UTC (rev 287)
+++ maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/AppletTestWindow.java 2007-08-28 23:53:35 UTC (rev 288)
@@ -1,151 +0,0 @@
-/* Copyright 2007 Transmutable (http://transmutable.com/)
-
- Licensed 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. */
-
-package com.ogoglio.viewer.applet;
-
-import java.applet.Applet;
-import java.applet.AppletContext;
-import java.applet.AppletStub;
-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.URL;
-import java.util.HashMap;
-
-import com.ogoglio.client.WebAPIAuthenticator;
-import com.ogoglio.client.WebAPIClientWire;
-import com.ogoglio.client.WebAPIDescriptor;
-import com.ogoglio.util.WebConstants;
-
-public class AppletTestWindow extends Frame {
-
- //static Dimension appDimension = new Dimension(640, 500);
- //static Dimension appDimension = new Dimension(500, 522);
- static Dimension appDimension = new Dimension(1000, 640);
-
- Applet applet = null;
-
- EnvironmentStub clientStub1 = null;
-
- String host = "127.0.0.1:8080";
-
- String serviceURI = "http://" + host + "/og/";
-
- URL codeBase = getURL(serviceURI);
-
- static boolean fullScreen = false;
-
- public AppletTestWindow() {
- setLayout(new BorderLayout());
- setSize(appDimension);
- setLocation(30, 50);
- setResizable(false);
- if (fullScreen) {
- this.setUndecorated(true);
- }
-
- HashMap parameters1 = new HashMap();
- System.out.println("HERE FART:"+WebConstants.getBootstrapUsername());
- try {
- WebAPIAuthenticator authenticator = new WebAPIAuthenticator(new WebAPIClientWire(), new WebAPIDescriptor(new URI(serviceURI)), WebConstants.getBootstrapUsername(), WebConstants.getBootstrapUserPW());
- parameters1.put("loginCookie", authenticator.getAuthCookie());
- } catch (Exception e) {
- e.printStackTrace();
- }
- //parameters1.put("loginCookie", "guestApplet_Test_Window2");
-
- parameters1.put("spaceID", "" + 4);
- parameters1.put("serviceURI", serviceURI);
-
- //parameters1.put("x", "0");
- //parameters1.put("y", "1000");
- //parameters1.put("z", "0");
- //parameters1.put("rx", "-1.6");
- //parameters1.put("ry", "0");
- //parameters1.put("rz", "0");
-
- //parameters1.put("movable", "false");
-
- clientStub1 = new EnvironmentStub(parameters1);
- applet = new ViewerApplet();
- //applet = new BodyEditorApplet();
- applet.setStub(clientStub1);
- add(applet, BorderLayout.CENTER);
- }
-
- private class EnvironmentStub implements AppletStub {
-
- HashMap parameters = null;
-
- public EnvironmentStub(HashMap parameters) {
- this.parameters = parameters;
- }
-
- public void appletResize(int width, int height) {
- }
-
- public AppletContext getAppletContext() {
- return null;
- }
-
- public URL getCodeBase() {
- return codeBase;
- }
-
- public URL getDocumentBase() {
- return codeBase;
- }
-
- public String getParameter(String name) {
- return (String) parameters.get(name);
- }
-
- public boolean isActive() {
- return true;
- }
-
- }
-
- public void start() {
- applet.init();
- applet.start();
- }
-
- private static URL getURL(String url) {
- try {
- return new URL(url);
- } catch (MalformedURLException e) {
- throw new IllegalStateException("Bad url: " + url);
- }
- }
-
- public static void main(String[] args) {
- GraphicsEnvironment graphicsEnv = GraphicsEnvironment.getLocalGraphicsEnvironment();
- GraphicsDevice device = graphicsEnv.getDefaultScreenDevice();
- if (fullScreen) {
- appDimension = new Dimension(device.getDisplayMode().getWidth(), device.getDisplayMode().getWidth());
- }
- AppletTestWindow test = new AppletTestWindow();
- test.setVisible(true);
- if (fullScreen) {
- device.setFullScreenWindow(test);
- }
- test.start();
- }
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|