|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
edu.davidson.tools.SApplet
molecular.MolecularPiston
Class MolecularPiston
Field Summary |
Fields inherited from class edu.davidson.tools.SApplet |
destroyed |
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 |
Method Summary | |
void |
addCaption(java.lang.String cap)
Adds a title to ensemble in top-center |
int |
addParticle(double xin,
double yin,
double xvel,
double yvel,
double r)
Adds one particle to the ensemble |
int |
addParticleDataSource(int i)
Method addParticleDataSource |
void |
createParticles(int n)
Method createParticles |
void |
forward()
Start the animation |
double |
getBWPos()
Returns the bottom wall position |
int |
getEnsembleID()
Returns the id of the ensemble. |
int |
getHistogramID(int nbins,
double vmin,
double vmax)
Returns the id of the velocity histogram. |
double |
getLWPos()
Returns the left wall position |
int |
getParticleID(int i)
Returns the object identifier of the particle. |
double |
getPistonPos()
Method getPistonPos |
double |
getRWPos()
Returns the right wall position |
double |
getTWPos()
Returns the top wall position |
void |
pause()
Stop the animation |
void |
removeParticle(int i)
Removes ith particle from ensemble |
void |
removeWallTemp(java.lang.String wall)
Method removeWallTemp |
void |
setAutoRefresh(boolean ar)
Method setAutoRefresh |
void |
setBackgroundRGB(int r,
int g,
int b)
Sets Background color inside piston |
void |
setBG2Color(int r,
int g,
int b)
Sets Background color above piston head |
void |
setBoltzmann(double kb)
Method setBoltzmann |
void |
setBorderWidth(int w)
Method setBorderWidth |
void |
setConstrainIsothermal(boolean tf)
Method constrains the temperature of the ensemble to a fixed value. |
void |
setDefault()
Method setDefault |
void |
setDefaultColor(int r,
int g,
int b)
Sets default color when adding new particles. |
void |
setDefaultMass(double m)
Sets default mass when adding new particles. |
void |
setDefaultPiston()
Method setDefaultPiston |
void |
setDefaultSize(double r)
Sets default size when adding new particles. |
void |
setDefaultTemp(double t)
Method setDefaultTemp |
void |
setDelay(int delay)
Sets calculation time delay |
void |
setDisplayOffset(int xoff,
int yoff)
Sets offsets for title |
void |
setDragable(boolean d)
Method allows the piston to be dragable |
void |
setDt(double dt)
Sets calculation time step |
void |
setFPS(int fps)
Sets frames per second of animation |
void |
setGravity(double gr)
Sets Gravitational constant that acts on piston |
void |
setInitialPistonPos(double h)
Method setInitialPistonPos |
void |
setKE(double k)
Puts value in kinetic energy field |
void |
setMaxParticles(int p)
Sets maximum number of particles that can be stored in arrays |
void |
setMessage(java.lang.String msg)
Adds a message to small yellow box opposite coordinate display. |
void |
setMinPistonHeight(double h)
Method sets minimum piston height for piston when dragging. |
void |
setOrientation(java.lang.String or)
Method setOrientation |
void |
setParticleMass(int i,
double m)
Sets mass of particle default value is 1 unit. |
void |
setParticlePos(int i,
double xin,
double yin)
Sets Position of particle |
void |
setParticleRGB(int i,
int rd,
int gr,
int bl)
Sets color of particle |
void |
setParticles(int n)
Method setParticles |
void |
setParticleVel(int i,
double xvel,
double yvel)
Sets Velocity of particle |
void |
setPeriodicH(boolean p)
Sets Periodic periodic boundary conditions |
void |
setPeriodicV(boolean p)
Sets Periodic periodic boundary conditions |
void |
setPiston(java.lang.String str,
boolean parsemode)
Method setPiston |
void |
setPistonMass(double m)
Sets Mass of piston |
void |
setPistonWidth(int pw)
Sets width of piston |
void |
setPpu(int p)
Sets pixels per unit of ensemble |
void |
setRGB(int r,
int g,
int b)
Sets color of title |
void |
setShowControls(boolean s)
Shows or hides control panel |
void |
setTemp(double temp)
Set the temperature of the ensemble in 1 step. |
void |
setTemperature(double temp,
int steps)
Set the temperature of the ensemble in n steps. |
void |
setVolume(double vol,
int steps)
Move the piston to set the volume for the ensemble. |
void |
setVolumeIsothermal(double vol,
int steps)
Move the piston to set the volume for the ensemble. |
void |
setWallTemp(java.lang.String wall,
double t)
Sets Velocity of particle |
void |
stepForward()
Steps simulation forward one time step |
Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public void setShowControls(boolean s)
s
- booleanpublic void pause()
pause
in class SApplet
public void forward()
forward
in class SApplet
public void stepForward()
public int addParticle(double xin, double yin, double xvel, double yvel, double r)
xin
- double initial xpositionyin
- double initial ypositionxvel
- double initial x-velocityyvel
- double initial y-velocityr
- double particle radius
public void createParticles(int n)
n
- public int addParticleDataSource(int i)
i
-
public void setParticleRGB(int i, int rd, int gr, int bl)
i
- int particle numberrd
- int red value (<256)gr
- int green value (<256)bl
- int blue value (<256)public void setParticleMass(int i, double m)
i
- int particle numberm
- double mass.public void setDefault()
setDefault
in class SApplet
public void setMaxParticles(int p)
p
- max particlespublic void setAutoRefresh(boolean ar)
setAutoRefresh
in class SApplet
ar
- public void setBorderWidth(int w)
w
- public void setBackgroundRGB(int r, int g, int b)
r
- int redg
- int greenb
- int bluepublic void setBG2Color(int r, int g, int b)
r
- int redg
- int greenb
- int bluepublic void setDefaultMass(double m)
m
- double masspublic void setDefaultSize(double r)
r
- double radiuspublic void setDefaultColor(int r, int g, int b)
r
- int redg
- int greenb
- int bluepublic void setDefaultPiston()
public void setDefaultTemp(double t)
t
- public void setParticlePos(int i, double xin, double yin)
i
- int particle numberxin
- double initial x-positionyin
- double initial y-positionpublic void setParticleVel(int i, double xvel, double yvel)
i
- int particle numberxvel
- double initial x-velocityyvel
- double initial y-velocitypublic void setInitialPistonPos(double h)
h
- public void setBoltzmann(double kb)
kb
- public void setWallTemp(java.lang.String wall, double t)
wall
- string Which wall? [top, bottom, right, left]t
- double The wall temperaturepublic void removeWallTemp(java.lang.String wall)
wall
- public void setFPS(int fps)
fps
- intpublic void setDt(double dt)
setDt
in class SApplet
dt
- double timesteppublic void setDelay(int delay)
delay
- int delay millisecondspublic void removeParticle(int i)
i
- int particle numberpublic void setParticles(int n)
n
- public void setTemp(double temp)
temp
- double The new temperature.public void setTemperature(double temp, int steps)
temp
- double The new temperature.steps
- int The number of steps.public void setPpu(int p)
p
- intpublic void setPeriodicH(boolean p)
p
- booleanpublic void setPeriodicV(boolean p)
p
- booleanpublic void setKE(double k)
k
- double value to be inserted in fieldpublic void setOrientation(java.lang.String or)
or
- public void setVolume(double vol, int steps)
vol
- The new volume.steps
- public void setVolumeIsothermal(double vol, int steps)
vol
- The new volume.steps
- public void setConstrainIsothermal(boolean tf)
tf
- booleanpublic void setMessage(java.lang.String msg)
msg
- Stringpublic void setDisplayOffset(int xoff, int yoff)
xoff
- yoff
- public void setRGB(int r, int g, int b)
r
- int redg
- int greenb
- int bluepublic void addCaption(java.lang.String cap)
cap
- Stringpublic void setDragable(boolean d)
d
- booleanpublic void setMinPistonHeight(double h)
h
- double height in units. (usually around 3 to 7)public void setPiston(java.lang.String str, boolean parsemode)
str
- parsemode
- public double getPistonPos()
public double getRWPos()
public double getLWPos()
public double getTWPos()
public double getBWPos()
public int getEnsembleID()
public int getHistogramID(int nbins, double vmin, double vmax)
nbins
- int The number of bins in the histogram.vmin
- vmax
-
public int getParticleID(int i)
i
- int the particle index.
public void setPistonMass(double m)
m
- double new mass of pistonpublic void setPistonWidth(int pw)
pw
- double new mass of pistonpublic void setGravity(double gr)
gr
- double
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |