dla
Class DLA

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

public class DLA
extends SApplet

Diffusion Limited Aggregation A program that models the construction of a snowflake. It uses a random walker to attaches particles to the snowflake. Data connections added by W. Chrsitian.

See Also:
Serialized Form

Field Summary
 dla.Dlamodel drawingPanel
           
 
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
DLA()
           
 
Method Summary
 void destroy()
          Destroy the paint thread.
 void forward()
          Start clock.
 java.lang.String getAppletInfo()
           
 int getHistogramID()
          Returns the id of the mass histogram.
 java.lang.String getParameter(java.lang.String key, java.lang.String def)
           
 java.lang.String[][] getParameterInfo()
           
 void init()
           
 void initFrame()
          This method creates a new SGraph and SGraphFrame.
 void pause()
          Pause the clock.
 void reset()
          Reset the clock to time=0.
 void setDefault()
          Reset the clock to time=0.
 void setShowGraph(boolean show)
          Returns the id of the mass histogram.
 void stepForward()
           
 
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, start, stop
 
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
 

Field Detail

drawingPanel

public dla.Dlamodel drawingPanel
Constructor Detail

DLA

public DLA()
Method Detail

destroy

public void destroy()
Destroy the paint thread. Added by W. Christian
Overrides:
destroy in class SApplet

forward

public void forward()
Description copied from class: SApplet
Start clock.
Overrides:
forward in class SApplet

getAppletInfo

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

getHistogramID

public int getHistogramID()
Returns the id of the mass histogram. This id can be used to make data connections.
Returns:
int The id.

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

init

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

initFrame

public void initFrame()
This method creates a new SGraph and SGraphFrame. This is needed because when the user closes the SGraphFrame with the exit button (upper right hand corner of window), the drawing thread for the SGraph is stopped. So, to keep the SGraphFrame updated with new SGraph data, we need to make a new SGraph (and of course, a new SGraphFrame). public void createFrame_old() { graph=new SGraph() ; graph.setAutoReplaceData(1,true); drawingPanel.setGraph(graph); //set the SGraph in our model, to the new SGraph (with a new drawing thread) graphFrame = new SGraphFrame(graph); graphFrame.addWindowListener(new java.awt.event.WindowAdapter() { //make it listen to events with the new SGraphFrame public void windowClosed(WindowEvent e) { graphFrame_windowClosing(e); } }); graphFrame.setSize(250,300); graph.setSeriesStyle(1,true, 3); graph.setMarkerSize(1,.5); graph.setLabelX("Ln of Distance"); graph.setLabelY("Ln of Mass"); graphCheck.setState(false); //uncheck the check box }

pause

public void pause()
Description copied from class: SApplet
Pause the clock.
Overrides:
pause in class SApplet

reset

public void reset()
Description copied from class: SApplet
Reset the clock to time=0.
Overrides:
reset in class SApplet

setDefault

public void setDefault()
Description copied from class: SApplet
Reset the clock to time=0.
Overrides:
setDefault in class SApplet

setShowGraph

public void setShowGraph(boolean show)
Returns the id of the mass histogram. This id can be used to make data connections.
Parameters:
show - Show the graph if true; otherwise, hide the graph.

stepForward

public void stepForward()

Copyright Wolfgang Christian

Visit the Davidson CollegePhyslets Page