All Packages Class Hierarchy This Package Previous Next Index
Class DopplerProgram.Doppler
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----DopplerProgram.Doppler
- public class Doppler
- extends Frame
- implements Runnable, WindowListener, ActionListener
An applet that demonstrates Doppler properties. This java
program has been written to run in both an applet and as
a program. To run in an applet, create a "window opener"
that will instantiate a new Frame class using Doppler as
that class. Or simply run the program from the prompt
using $java Doppler
-
inApplet
-
-
percentage
-
-
Doppler(Image, Image, boolean)
- Creates a new Doppler object with its buttons and stuff.
-
actionPerformed(ActionEvent)
- Method to implement ActionListener.
-
main(String[])
- Method to invoke as a program.
-
paint(Graphics)
- Calls update to eliminate flashing
-
run()
- starts the animation of applet and starts the Radiator thread.
-
start()
- Overrides start to implement Runnable interface since it's an animation.
-
update(Graphics)
- Overrides update method to eliminate flashing
-
windowActivated(WindowEvent)
- Method to implement WindowListener.
-
windowClosed(WindowEvent)
- Method to implement WindowListener.
-
windowClosing(WindowEvent)
- Method to implement WindowListener to close window
-
windowDeactivated(WindowEvent)
- Method to implement WindowListener.
-
windowDeiconified(WindowEvent)
- Method to implement WindowListener.
-
windowIconified(WindowEvent)
- Method to implement WindowListener.
-
windowOpened(WindowEvent)
- Method to implement WindowListener.
-
writeName(Graphics, Dimension)
- Writes my name and current speed for galaxy
inApplet
public boolean inApplet
percentage
public int percentage
Doppler
public Doppler(Image _earthImage,
Image _galaxyImage,
boolean _inApplet)
- Creates a new Doppler object with its buttons and stuff.
start
public void start()
- Overrides start to implement Runnable interface since it's an animation.
You know... if the universe extends a big bang object then the 4th dimension
implements runnable too. Then it must have a start.
run
public void run()
- starts the animation of applet and starts the Radiator thread.
update
public void update(Graphics g)
- Overrides update method to eliminate flashing
- Overrides:
- update in class Container
writeName
public void writeName(Graphics g,
Dimension d)
- Writes my name and current speed for galaxy
paint
public void paint(Graphics g)
- Calls update to eliminate flashing
- Overrides:
- paint in class Container
actionPerformed
public void actionPerformed(ActionEvent e)
- Method to implement ActionListener. Listens for buttons and menu.
windowClosing
public void windowClosing(WindowEvent e)
- Method to implement WindowListener to close window
windowClosed
public void windowClosed(WindowEvent e)
- Method to implement WindowListener. Does nothing.
windowDeiconified
public void windowDeiconified(WindowEvent e)
- Method to implement WindowListener. Does nothing.
windowActivated
public void windowActivated(WindowEvent e)
- Method to implement WindowListener. Does nothing.
windowIconified
public void windowIconified(WindowEvent e)
- Method to implement WindowListener. Does nothing.
windowOpened
public void windowOpened(WindowEvent e)
- Method to implement WindowListener. Does nothing.
windowDeactivated
public void windowDeactivated(WindowEvent e)
- Method to implement WindowListener. Does nothing.
main
public static void main(String args[])
- Method to invoke as a program.
All Packages Class Hierarchy This Package Previous Next Index