DE.purple_sunshine.bigbro
Class SpyApplet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--DE.purple_sunshine.bigbro.ParameterApplet
                                |
                                +--DE.purple_sunshine.bigbro.SpyApplet
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class SpyApplet
extends ParameterApplet

The actual Locator-Applet (this must be called in the applet-tag). Handles all the parameters, puts everything up and is responsible for starting and stopping of the Threads. For a quick overview of all involved classes, see the UML Class Diagram. Documentation on how to use this applet in a website is available here.

Since:
JDK1.1
Version:
1.0
Author:
Holger Wagner
See Also:
SpyCanvas, Animator, PositionLoader, Person, House, Area, PathArea, PathElement, Smily, Serialized Form

Field Summary
static boolean KEEP_PAINTED
           
static boolean PAINT_AREAS
           
static boolean PAINT_PATH
           
static boolean PAINT_PATHAREAS
           
static boolean PAINT_PATHLINE
           
static boolean PAINT_TRAILS
           
 
Fields inherited from class DE.purple_sunshine.bigbro.ParameterApplet
runsInMac, runsInMacNetscape, VERBOSITY
 
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
SpyApplet()
           
 
Method Summary
 void destroy()
          Finishes the Threads and frees image resources.
 java.lang.String getAppletInfo()
          Shows information about this applet.
 java.lang.String[][] getParameterInfo()
          Shows which parameters are allowed.
 void init()
          Initializes the Applet.
 void start()
          When called the first time, the Animator and the PositionLoader are started.
 void stop()
          Suspends Animator and PositionLoader.
 
Methods inherited from class DE.purple_sunshine.bigbro.ParameterApplet
offButtonURL, onButtonURL, runsInMac, runsInMacNetscape
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, 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, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PAINT_PATH

public static final boolean PAINT_PATH

PAINT_AREAS

public static final boolean PAINT_AREAS

PAINT_PATHAREAS

public static final boolean PAINT_PATHAREAS

PAINT_TRAILS

public static final boolean PAINT_TRAILS

PAINT_PATHLINE

public static final boolean PAINT_PATHLINE

KEEP_PAINTED

public static final boolean KEEP_PAINTED
Constructor Detail

SpyApplet

public SpyApplet()
Method Detail

init

public void init()
Initializes the Applet. The Persons are created with the colors defined by the parameters, then an initial position file is loaded synchronously. Finally an Animator and SpyCanvas are constructed.
Overrides:
init in class ParameterApplet

start

public void start()
When called the first time, the Animator and the PositionLoader are started. If that had already happened before, they are only resumed.
Overrides:
start in class java.applet.Applet

stop

public void stop()
Suspends Animator and PositionLoader. Note that the original Thread methods suspend() and resume() are not used since they are quite unsafe.
Overrides:
stop in class java.applet.Applet

destroy

public void destroy()
Finishes the Threads and frees image resources.
Overrides:
destroy in class java.applet.Applet

getAppletInfo

public java.lang.String getAppletInfo()
Shows information about this applet.
Overrides:
getAppletInfo in class ParameterApplet
Returns:
name
(c) 2000 Holger Wagner, Purple Sunshine Productions
http://www.purple-sunshine.de/
mailto:holger [at] purple-sunshine [dot] de
See Also:
Component.getName()

getParameterInfo

public java.lang.String[][] getParameterInfo()
Shows which parameters are allowed. These parameters are always available, for more parameters override this and handleParams().
Overrides:
getParameterInfo in class ParameterApplet
Returns:
foreground -- RGB-Value -- foreground color, e.g. 0 0 0
background -- RGB-Value -- background color, e.g. 255 255 255
person_x_color -- RGB-Value -- the color of person x
person_x_id -- String -- the id of person x, as used in the position file
positionfile -- String -- the file with the position information including path from docbase
pathareafile -- String -- the file with PathAreas including path from docbase
areafile -- String -- the file with Areas including path from docbase
housebgimg -- String -- an image - gif or jpg - including its path from the document base
fps -- integer -- the framerate of the animation in frames per second


© 2000, Holger Wagner, Purple Sunshine Productions.