DE.purple_sunshine.bigbro
Class CountdownCanvas

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

public class CountdownCanvas
extends java.awt.Canvas
implements java.awt.image.ImageObserver

Shows the CountdownDigits when animation is switched on, or the current date and the remaining days if it is switched off. This canvas also knows all the colors for the fade (which may save some time on creating and using colors that are usually repeatedly used).

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

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
CountdownCanvas(java.util.Vector cd, CountdownApplet applet)
           
 
Method Summary
 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.
 void newFrame()
           
 void paint(java.awt.Graphics g)
          If animation is on, paints all the CountdownDigits, if animation is off, paints a message with the current date and remaining days.
 void update(java.awt.Graphics g)
           
 
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, mouseUp, 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, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CountdownCanvas

public CountdownCanvas(java.util.Vector cd,
                       CountdownApplet applet)
Method Detail

imageUpdate

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

newFrame

public void newFrame()

update

public void update(java.awt.Graphics g)
Overrides:
update in class java.awt.Component

paint

public void paint(java.awt.Graphics g)
If animation is on, paints all the CountdownDigits, if animation is off, paints a message with the current date and remaining days.
Overrides:
paint in class java.awt.Canvas

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


© 2000, Holger Wagner, Purple Sunshine Productions.