DE.purple_sunshine.bigbro
Class SpyCanvas

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--DE.purple_sunshine.bigbro.SpyCanvas
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class SpyCanvas
extends java.awt.Canvas

The SpyCanvas is where all the stuff is painted. This also displays error messages, if necessary. When started the first time, a little animation is shown... this also checks the events for switching the animation on and off and the smily animation.

Since:
JDK1.1
Version:
1.0
Author:
Holger Wagner
See Also:
Serialized Form

Field Summary
static boolean criticalError
           
static boolean macError
           
static boolean noServerConnection
           
 
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
SpyCanvas(java.util.Vector persons, House house, SpyApplet applet)
           
 
Method Summary
static void criticalErrorOccured(java.lang.String msg)
          If this method is called, an error message will be shown in the canvas, and msg will be writtin to standard out (console).
 boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)
           
 boolean mouseDown(java.awt.Event e, int x, int y)
          JDK1.0 for: if the mouse button has been pressed, start or stop the animation.
 boolean mouseUp(java.awt.Event e, int x, int y)
           
 void newFrame()
          Paints a new frame.
 void paint(java.awt.Graphics g)
          Paints everything ;-)
 void smilyAnim()
          Starts the smily animation.
 
Methods inherited from class java.awt.Canvas
addNotify, getAccessibleContext
 
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, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDrag, mouseEnter, mouseExit, mouseMove, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

criticalError

public static boolean criticalError

noServerConnection

public static boolean noServerConnection

macError

public static boolean macError
Constructor Detail

SpyCanvas

public SpyCanvas(java.util.Vector persons,
                 House house,
                 SpyApplet applet)
Method Detail

newFrame

public void newFrame()
Paints a new frame.

criticalErrorOccured

public static void criticalErrorOccured(java.lang.String msg)
If this method is called, an error message will be shown in the canvas, and msg will be writtin to standard out (console).
Parameters:
msg - the message to be writtin to standard out

paint

public void paint(java.awt.Graphics g)
Paints everything ;-)
Overrides:
paint in class java.awt.Canvas

imageUpdate

public boolean imageUpdate(java.awt.Image img,
                           int infoflags,
                           int x,
                           int y,
                           int width,
                           int height)
Overrides:
imageUpdate in class java.awt.Component

mouseDown

public boolean mouseDown(java.awt.Event e,
                         int x,
                         int y)
JDK1.0 for: if the mouse button has been pressed, start or stop the animation.
Overrides:
mouseDown in class java.awt.Component

mouseUp

public boolean mouseUp(java.awt.Event e,
                       int x,
                       int y)
Overrides:
mouseUp in class java.awt.Component

smilyAnim

public void smilyAnim()
Starts the smily animation.


© 2000, Holger Wagner, Purple Sunshine Productions.