doppler
Class Doppler

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--edu.davidson.tools.SApplet
                                |
                                +--doppler.Doppler
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.lang.Runnable, java.io.Serializable

public class Doppler
extends SApplet
implements java.lang.Runnable

Dopple demonstrates the classical and relativistic Doppler effect.

See Also:
Serialized Form

Fields inherited from class edu.davidson.tools.SApplet
clock, dataConnections, dataListeners, dataSources, lock
 
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
Doppler()
           
 
Method Summary
 boolean action(java.awt.Event ev, java.lang.Object arg)
           
 void destroy()
           
 void forward()
          Start the animation.
 java.lang.String getAppletInfo()
           
 java.lang.String[][] getParameterInfo()
           
 boolean handleEvent(java.awt.Event evt)
           
 void init()
           
static void main(java.lang.String[] args)
           
 boolean mouseDown(java.awt.Event evt, int x, int y)
           
 void pause()
          Pause the animation.
 void reset()
          Reset the applet to time=0.
 void run()
          Start the applet thread.
 void setCaption(java.lang.String s)
          Set the applet caption.
 void setClassical()
          Display the clasical Doppler effect.
 void setRelativistic()
          Display the clasical Doppler effect.
 void setSourceX(double x)
          Set the position of the source.
 void setSpeed(double v)
          Set the speed of the source.
 void start()
          Start the applet thread.
 void step()
          Step the time.
 void stop()
          Stop the applet thread.
 
Methods inherited from class edu.davidson.tools.SApplet
addDataListener, addDataSource, cleanupDataConnections, clearAllData, clearData, deleteDataConnection, deleteDataConnections, getClockID, getClockTime, getDataConnectionFromDL, getDataConnectionFromDS, getDataFromDS, getDataListener, getDataListener, getDataSource, getDataSource, getID, getRunningID, getSourceData, getSourceVariables, isAutoRefresh, isClockRunning, makeDataConnection, removeDataListener, removeDataSource, reverse, setAutoRefresh, setClockContinous, setClockCycle, setClockOneShot, setClockTime, setConnectionBlock, setConnectionListener, setConnectionSmoothing, setConnectionSource, setConnectionStride, setDefault, setDt, setExternalClock, setFPS, setRunningID, setRunningID, setTimeContinuous, setTimeCycle, setTimeOneShot, startClock, stepClock, stepTime, stepTimeBack, stepTimeForward, stopClock, updateDataConnection, updateDataConnections
 
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
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, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, 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
 

Constructor Detail

Doppler

public Doppler()
Method Detail

action

public boolean action(java.awt.Event ev,
                      java.lang.Object arg)
Overrides:
action in class java.awt.Component

destroy

public void destroy()
Overrides:
destroy in class SApplet

forward

public void forward()
Start the animation.
Overrides:
forward in class SApplet

getAppletInfo

public java.lang.String getAppletInfo()
Overrides:
getAppletInfo in class java.applet.Applet

getParameterInfo

public java.lang.String[][] getParameterInfo()
Overrides:
getParameterInfo in class java.applet.Applet

handleEvent

public boolean handleEvent(java.awt.Event evt)
Overrides:
handleEvent in class java.awt.Component

init

public void init()
Overrides:
init in class java.applet.Applet

main

public static void main(java.lang.String[] args)

mouseDown

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

pause

public void pause()
Pause the animation.
Overrides:
pause in class SApplet

reset

public void reset()
Reset the applet to time=0.
Overrides:
reset in class SApplet

run

public void run()
Start the applet thread. Should not be called from JavaScript.
Specified by:
run in interface java.lang.Runnable
See Also:
forward(), step()

setCaption

public void setCaption(java.lang.String s)
Set the applet caption.
Parameters:
s - The caption string.

setClassical

public void setClassical()
Display the clasical Doppler effect.

setRelativistic

public void setRelativistic()
Display the clasical Doppler effect.

setSourceX

public void setSourceX(double x)
Set the position of the source. The source position is given in pixels.
Parameters:
x - The position of the source in pixels.

setSpeed

public void setSpeed(double v)
Set the speed of the source.
Parameters:
v - The speed of the source.

start

public void start()
Start the applet thread. Should not be called from JavaScript.
Overrides:
start in class java.applet.Applet
See Also:
forward()

step

public void step()
Step the time.

stop

public void stop()
Stop the applet thread. Should not be called from JavaScript.
Overrides:
stop in class java.applet.Applet
See Also:
pause()

Copyright Wolfgang Christian

Visit the Davidson CollegePhyslets Page