pipes
Class PipeApplet

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

public class PipeApplet
extends SApplet

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
PipeApplet()
           
 
Method Summary
 int addDetector(double x, double y)
          Set pixels per unit
 void destroy()
           
 void forward()
          Start the animation
 java.lang.String getAppletInfo()
           
 java.lang.String getParameter(java.lang.String key, java.lang.String def)
           
 java.lang.String[][] getParameterInfo()
           
 int getPipeID()
          Get the id of the pipe for use as a data source.
 void go()
           
 void init()
           
 void pause()
          Stop the animation
 void removeAllDetectors()
          Removes all detectors from plot
 void removeDetector(int id)
          removes one detector
 void reset()
          Reset to time t=0;
 void setAPaintScale(boolean dfault, double asf)
          Sets contrast factor for painting in Anayltic Mode.
 void setDefault()
          Set the default conditions.
 void setDelt(double dt)
          Set time step dt
 boolean setDragable(int id, boolean drag)
          Make the object with the given id dragable.
 void setFPS(int fps)
          Set frames per second
 void setMode(java.lang.String m, java.lang.String s)
          Set mode
 void setMouseSensitivity(double ms)
          MouseSensitivity relates to U-Drag-It mode High sensitivity means piston moves farther relative to mouse movements
 void setParse(java.lang.String s)
          Sets parser string
 void setPoints(int pperunit)
          Set pixels per unit
 void setPPaintScale(boolean dfault, double psf)
          Sets contrast factor for painting in Piston Mode.
 void setShowControls(boolean b)
          Show/hide control panel
 void setSpeed(double s)
          Sets wave speed
 void setTimeDisplay(boolean show)
          Enable the time display in the applet window.
 void setUPaintScale(boolean dfault, double usf)
          Sets contrast factor for painting in U-Drag Mode.
 void setWallW(int w)
          Mathod sets pixel width of pipe walls
 void start()
           
 void stepBack()
          Step back by dt.
 void stepForward()
          Advances wave by one step
 void stop()
           
 void stoppingClock()
          Reset the buttons to let user know the clock is stopped.
 
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, 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
action, 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, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, 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

PipeApplet

public PipeApplet()
Method Detail

addDetector

public int addDetector(double x,
                       double y)
Set pixels per unit
Parameters:
x - double The x position of the detector.
y - double The y position of the detector.
Returns:
int the id of new detector

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

getParameter

public java.lang.String getParameter(java.lang.String key,
                                     java.lang.String def)

getParameterInfo

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

getPipeID

public int getPipeID()
Get the id of the pipe for use as a data source.

go

public void go()

init

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

pause

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

removeAllDetectors

public void removeAllDetectors()
Removes all detectors from plot

removeDetector

public void removeDetector(int id)
removes one detector
Parameters:
id - hashcode of detector to remove

reset

public void reset()
Reset to time t=0;
Overrides:
reset in class SApplet

setAPaintScale

public void setAPaintScale(boolean dfault,
                           double asf)
Sets contrast factor for painting in Anayltic Mode. High factor yeilds high contrast in wave.
Parameters:
dfault - boolean use default
usf - double Manually-set scale factor for Analytic Mode

setDefault

public void setDefault()
Set the default conditions.
Overrides:
setDefault in class SApplet

setDelt

public void setDelt(double dt)
Set time step dt
Parameters:
d - double

setDragable

public boolean setDragable(int id,
                           boolean drag)
Make the object with the given id dragable.
Parameters:
id - The id of the object.
drag - Dragable?

setFPS

public void setFPS(int fps)
Set frames per second
Parameters:
fps - int

setMode

public void setMode(java.lang.String m,
                    java.lang.String s)
Set mode
Parameters:
m - String mode "a" "s" or "u"
s - String evaluated by parser

setMouseSensitivity

public void setMouseSensitivity(double ms)
MouseSensitivity relates to U-Drag-It mode High sensitivity means piston moves farther relative to mouse movements
Parameters:
ms - double

setParse

public void setParse(java.lang.String s)
Sets parser string
Parameters:
s - string

setPoints

public void setPoints(int pperunit)
Set pixels per unit
Parameters:
pperunit - int

setPPaintScale

public void setPPaintScale(boolean dfault,
                           double psf)
Sets contrast factor for painting in Piston Mode. High factor yeilds high contrast in wave.
Parameters:
dfault - boolean use default
usf - double Manually-set scale factor for Piston Mode

setShowControls

public void setShowControls(boolean b)
Show/hide control panel
Parameters:
b - boolean

setSpeed

public void setSpeed(double s)
Sets wave speed
Parameters:
s - double

setTimeDisplay

public void setTimeDisplay(boolean show)
Enable the time display in the applet window.
Parameters:
show - boolean Show the time?

setUPaintScale

public void setUPaintScale(boolean dfault,
                           double usf)
Sets contrast factor for painting in U-Drag Mode. High factor yeilds high contrast in wave.
Parameters:
dfault - boolean use default
usf - double Manually-set scale factor for U-Drag Mode

setWallW

public void setWallW(int w)
Mathod sets pixel width of pipe walls
Parameters:
w - int

start

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

stepBack

public void stepBack()
Step back by dt.

stepForward

public void stepForward()
Advances wave by one step

stop

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

stoppingClock

public void stoppingClock()
Reset the buttons to let user know the clock is stopped.

Copyright Wolfgang Christian

Visit the Davidson CollegePhyslets Page