Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.vrspace.vrmlclient
Class VRSpace  view VRSpace download VRSpace.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended byorg.vrspace.vrmlclient.VRSpace
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, vrml.external.field.EventOutObserver, java.awt.image.ImageObserver, java.awt.MenuContainer, java.util.Observer, java.io.Serializable, java.awt.event.WindowListener

public class VRSpace
extends java.applet.Applet
implements java.util.Observer, vrml.external.field.EventOutObserver, java.awt.event.ActionListener, java.awt.event.WindowListener

VRSpace applet
Parameters:
host - hostname, default origin host
port - port to connect to
username - username to login with
password - password to login with
logInfo - true/false
logDebug - true/false
logError - true/false
logWarning - true/false
intro - class imlementing Intro intefrace, started after init. Default: org.vrspace.vrmlclient.VRSpaceIntro


Nested Class Summary
 class VRSpace.ConsoleThread
           
 
Nested classes inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 vrml.external.Node bg
           
 vrml.external.Browser browser
           
 vrml.external.Node busy
           
private  vrml.external.field.EventOutSFString clientMsg
           
(package private)  vrml.external.field.EventInSFBool conHide
           
 org.vrspace.util.Connection connection
           
 ConnectionManager connMgr
           
(package private)  vrml.external.field.EventInSFVec2f conPos
           
 vrml.external.Node console
           
(package private)  vrml.external.field.EventInMFString conText
           
(package private)  int curCol
           
(package private)  int curRow
           
 Dispatcher dispatcher
           
 vrml.external.Node dispatcherScript
           
(package private)  java.lang.String errorMsg
           
 vrml.external.Node fog
           
private  java.lang.String host
           
 vrml.external.Node HUD
           
 vrml.external.field.EventOutMFNode hudChildren
           
 vrml.external.field.EventInMFNode HUDLoad
           
 vrml.external.Node HUDLoader
           
(package private)  Intro intro
           
(package private)  java.lang.String introClass
           
private  Keyboard keyboard
           
private  long lastWrite
           
 vrml.external.field.EventInMFNode loadChildren
           
 URLLoader loader
           
 vrml.external.Node loadTarget
           
private  boolean locked
           
private  java.awt.Button logButton
           
private  java.awt.Frame logFrame
           
(package private)  org.vrspace.util.Logger logger
           
 java.lang.String login
           
private  boolean loginDisplayed
           
(package private)  int maxLength
           
 vrml.external.Node movement
           
(package private)  vrml.external.field.EventInSFBool movementEnabled
           
 MovementManager movementMgr
           
(package private)  java.lang.String myClass
           
(package private)  long myId
           
(package private)  vrml.external.field.EventInMFString navigation
           
(package private)  vrml.external.field.EventOutSFBool navigationBound
           
 vrml.external.Node navigationInfo
           
(package private)  boolean navigationOn
           
private  boolean nothingTyped
           
 java.lang.String password
           
private  int port
           
private  boolean readlogin
           
 vrml.external.field.EventInSFRotation rotation
           
(package private)  vrml.external.field.EventOutSFRotation rotation_changed
           
 vrml.external.Node scene
           
 vrml.external.field.EventOutMFNode sceneChildren
           
 SceneManager sceneMgr
           
 vrml.external.field.EventInSFString serverMsg
           
(package private)  java.lang.String[] text
           
private  java.awt.TextArea textArea
           
private  java.awt.TextField textField
           
 vrml.external.field.EventInSFVec3f translation
           
(package private)  vrml.external.field.EventOutSFVec3f translation_changed
           
 vrml.external.field.EventInMFNode unloadChildren
           
 vrml.external.Node unloadTarget
           
(package private)  boolean useJava
           
private  vrml.external.field.EventOutSFString userMsg
           
 vrml.external.Node viewpoint
           
(package private)  vrml.external.field.EventInSFFloat visibility
           
 
Fields inherited from class java.applet.Applet
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
VRSpace()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This method is invoked when an action occurs.
(package private)  void addLine(java.lang.String s)
           
 void callback(vrml.external.field.EventOut ev, double timestamp, java.lang.Object userdata)
           
 void clear()
           
 void cursor(int row, int col)
           
 void destroy()
          This method is called when the applet is being unloaded.
private  void displayLogin()
           
(package private)  boolean findBrowser()
           
 java.lang.String getInfo()
           
 Keyboard getInput()
           
(package private)  vrml.external.Node getNode(java.lang.String name)
          Calls Browser.getNode(), but sets errormsg to node name
 java.awt.TextField getOutput()
           
 void init()
          This method is called when the applet is first loaded, before start().
 void initiateLogin()
           
private  void lock()
           
 boolean lock(long wait)
           
private  void login()
           
 void pos(int row, int col)
           
private  void readLogin(java.lang.String arg)
          Login & password input, connect to server, start Connection and MovmementManager
 java.lang.String rewriteURL(java.lang.String url)
           
 void say(NodeManager who, java.lang.String what)
           
 void setBusy(boolean busy)
           
 void start()
          This method is called when the applet should start running.
 void stop()
          This method is called when the applet should stop running.
 void unlock()
           
 void update(java.util.Observable o, java.lang.Object argument)
          This method is called whenever the observable object changes, and has called notifyObservers.
 void windowActivated(java.awt.event.WindowEvent e)
          This method is called when a window is activated.
 void windowClosed(java.awt.event.WindowEvent e)
          This method is called when the window is closed.
 void windowClosing(java.awt.event.WindowEvent e)
          This method is called when the user calls the system menu close function, giving the program a chance to cancel the close.
 void windowDeactivated(java.awt.event.WindowEvent e)
          This method is called when the window is deactivated.
 void windowDeiconified(java.awt.event.WindowEvent e)
          This method is called when the window is deiconified.
 void windowIconified(java.awt.event.WindowEvent e)
          This method is called when the window is iconified.
 void windowOpened(java.awt.event.WindowEvent e)
          This method is called when the window is made visible.
 void write(java.lang.String s)
           
 void writeat(int row, int col, java.lang.String s)
           
 void writeln(java.lang.String s)
           
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, swapComponents, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

browser

public vrml.external.Browser browser

host

private java.lang.String host

port

private int port

login

public java.lang.String login

password

public java.lang.String password

myClass

java.lang.String myClass

myId

long myId

locked

private boolean locked

loginDisplayed

private boolean loginDisplayed

readlogin

private boolean readlogin

nothingTyped

private boolean nothingTyped

console

public vrml.external.Node console

conText

vrml.external.field.EventInMFString conText

conPos

vrml.external.field.EventInSFVec2f conPos

conHide

vrml.external.field.EventInSFBool conHide

HUD

public vrml.external.Node HUD

HUDLoader

public vrml.external.Node HUDLoader

HUDLoad

public vrml.external.field.EventInMFNode HUDLoad

lastWrite

private long lastWrite

busy

public vrml.external.Node busy

serverMsg

public vrml.external.field.EventInSFString serverMsg

clientMsg

private vrml.external.field.EventOutSFString clientMsg

userMsg

private vrml.external.field.EventOutSFString userMsg

scene

public vrml.external.Node scene

bg

public vrml.external.Node bg

sceneChildren

public vrml.external.field.EventOutMFNode sceneChildren

hudChildren

public vrml.external.field.EventOutMFNode hudChildren

dispatcherScript

public vrml.external.Node dispatcherScript

loadTarget

public vrml.external.Node loadTarget

loadChildren

public vrml.external.field.EventInMFNode loadChildren

unloadChildren

public vrml.external.field.EventInMFNode unloadChildren

unloadTarget

public vrml.external.Node unloadTarget

movement

public vrml.external.Node movement

translation_changed

vrml.external.field.EventOutSFVec3f translation_changed

rotation_changed

vrml.external.field.EventOutSFRotation rotation_changed

movementEnabled

vrml.external.field.EventInSFBool movementEnabled

fog

public vrml.external.Node fog

visibility

vrml.external.field.EventInSFFloat visibility

navigationInfo

public vrml.external.Node navigationInfo

navigationBound

vrml.external.field.EventOutSFBool navigationBound

navigationOn

boolean navigationOn

navigation

vrml.external.field.EventInMFString navigation

viewpoint

public vrml.external.Node viewpoint

translation

public vrml.external.field.EventInSFVec3f translation

rotation

public vrml.external.field.EventInSFRotation rotation

connection

public org.vrspace.util.Connection connection

connMgr

public ConnectionManager connMgr

loader

public URLLoader loader

dispatcher

public Dispatcher dispatcher

sceneMgr

public SceneManager sceneMgr

movementMgr

public MovementManager movementMgr

errorMsg

java.lang.String errorMsg

logger

org.vrspace.util.Logger logger

useJava

boolean useJava

introClass

java.lang.String introClass

intro

Intro intro

keyboard

private Keyboard keyboard

textArea

private java.awt.TextArea textArea

textField

private java.awt.TextField textField

logFrame

private java.awt.Frame logFrame

logButton

private java.awt.Button logButton

curRow

int curRow

curCol

int curCol

text

java.lang.String[] text

maxLength

int maxLength
Constructor Detail

VRSpace

public VRSpace()
Method Detail

init

public void init()
Description copied from class: java.applet.Applet
This method is called when the applet is first loaded, before start(). The default implementation does nothing; override to do any one-time initialization.


findBrowser

boolean findBrowser()

getNode

vrml.external.Node getNode(java.lang.String name)
Calls Browser.getNode(), but sets errormsg to node name


start

public void start()
Description copied from class: java.applet.Applet
This method is called when the applet should start running. This is normally each time a web page containing it is loaded. The default implemention does nothing; override for your applet to be useful.


stop

public void stop()
Description copied from class: java.applet.Applet
This method is called when the applet should stop running. This is normally when the next web page is loaded. The default implementation does nothing; override for your applet to stop using resources when it is no longer visible, but may be restarted soon.


destroy

public void destroy()
Description copied from class: java.applet.Applet
This method is called when the applet is being unloaded. The default implementation does nothing; override for your applet to clean up resources on exit.


initiateLogin

public void initiateLogin()

displayLogin

private void displayLogin()

readLogin

private void readLogin(java.lang.String arg)
Login & password input, connect to server, start Connection and MovmementManager


login

private void login()

update

public void update(java.util.Observable o,
                   java.lang.Object argument)
Description copied from interface: java.util.Observer
This method is called whenever the observable object changes, and has called notifyObservers. The Observable object can pass arbitrary information in the second parameter.

Specified by:
update in interface java.util.Observer

clear

public void clear()

writeat

public void writeat(int row,
                    int col,
                    java.lang.String s)

write

public void write(java.lang.String s)

pos

public void pos(int row,
                int col)

writeln

public void writeln(java.lang.String s)

addLine

void addLine(java.lang.String s)

cursor

public void cursor(int row,
                   int col)

say

public void say(NodeManager who,
                java.lang.String what)

getOutput

public java.awt.TextField getOutput()

getInput

public Keyboard getInput()

callback

public void callback(vrml.external.field.EventOut ev,
                     double timestamp,
                     java.lang.Object userdata)
Specified by:
callback in interface vrml.external.field.EventOutObserver

lock

private void lock()

unlock

public void unlock()

lock

public boolean lock(long wait)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from interface: java.awt.event.ActionListener
This method is invoked when an action occurs.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

getInfo

public java.lang.String getInfo()

setBusy

public void setBusy(boolean busy)

rewriteURL

public java.lang.String rewriteURL(java.lang.String url)

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when a window is activated. Only Frames and Dialogs can be active, and the active window always contains the component with focus.

Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is closed.

Specified by:
windowClosed in interface java.awt.event.WindowListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the user calls the system menu close function, giving the program a chance to cancel the close.

Specified by:
windowClosing in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is deactivated.

Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is deiconified.

Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is iconified.

Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is made visible.

Specified by:
windowOpened in interface java.awt.event.WindowListener