DE.purple_sunshine.bigbro
Class Smily

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--DE.purple_sunshine.bigbro.SuspendableThread
              |
              +--DE.purple_sunshine.bigbro.Smily
All Implemented Interfaces:
java.lang.Runnable

public class Smily
extends SuspendableThread

Gets the locations of the Persons and moves their pixels so that they form a Smily.

Since:
JDK1.1
Version:
1.0
Author:
Holger Wagner

Field Summary
static java.awt.Dimension absoluteSize
           
static int[][][] absoluteSmily
          The positions of the points of the smily.
static long COLORREPEATTIME
           
static long MAXKEEPTIME
           
static long MINKEEPTIME
           
static long PIXELMOVETIME
           
static int X
           
static int Y
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Smily(SpyCanvas canvas, java.util.Vector persons, java.awt.Rectangle bounds)
          Constructs a new Smily.
 
Method Summary
 void paintInto(java.awt.Graphics g)
           
 void run()
          Moves points from each person towards their correct positions within the Smily, keeps it for a while and does some color animation, and then moves everything to its initial state.
 void setBounds(java.awt.Rectangle bounds)
           
 
Methods inherited from class DE.purple_sunshine.bigbro.SuspendableThread
finish, isFinished, resume_, suspend_
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PIXELMOVETIME

public static final long PIXELMOVETIME

MINKEEPTIME

public static final long MINKEEPTIME

MAXKEEPTIME

public static final long MAXKEEPTIME

COLORREPEATTIME

public static final long COLORREPEATTIME

X

public static final int X

Y

public static final int Y

absoluteSize

public static final java.awt.Dimension absoluteSize

absoluteSmily

public static final int[][][] absoluteSmily
The positions of the points of the smily.
Constructor Detail

Smily

public Smily(SpyCanvas canvas,
             java.util.Vector persons,
             java.awt.Rectangle bounds)
Constructs a new Smily.
Parameters:
canvas - the SpyCanvas the smily should be painted into
persons - the Persons of which the smily points get the colors
bounds - the location of the smily within canvas
Method Detail

setBounds

public void setBounds(java.awt.Rectangle bounds)

paintInto

public void paintInto(java.awt.Graphics g)

run

public void run()
Moves points from each person towards their correct positions within the Smily, keeps it for a while and does some color animation, and then moves everything to its initial state.
Overrides:
run in class java.lang.Thread


© 2000, Holger Wagner, Purple Sunshine Productions.