|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--java.applet.Applet | +--edu.davidson.tools.SApplet | +--molecular.TwoEnsembles
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 |
Constructor Summary | |
TwoEnsembles()
|
Method Summary | |
void |
addCaption(java.lang.String cap)
Adds a title to ensemble in top-center |
int |
addParticleDataSource(int i)
|
int |
addParticleL(double xin,
double yin,
double xvel,
double yvel,
double r)
Adds one particle to the ensemble |
int |
addParticleR(double xin,
double yin,
double xvel,
double yvel,
double r)
Adds one particle to the ensemble |
void |
createParticlesL(int n)
|
void |
createParticlesR(int n)
|
void |
forward()
Start the animation |
java.lang.String |
getAppletInfo()
|
double |
getBWPos()
Returns the bottom wall position |
int |
getEnsembleLeftID()
Returns the id of the left ensemble. |
int |
getEnsembleRightID()
Returns the id of the right ensemble. |
int |
getHistogramLeftID(int nbins,
double vmin,
double vmax)
Returns the id of the velocity histogram of the left ensemble. |
int |
getHistogramRightID(int nbins,
double vmin,
double vmax)
Returns the id of the velocity histogram of the right ensemble. |
double |
getLWPos()
Returns the left wall position |
java.lang.String |
getParameter(java.lang.String key,
java.lang.String def)
|
java.lang.String[][] |
getParameterInfo()
|
int |
getParticleLeftID(int i)
Returns the object identifier of the particle. |
int |
getParticleRightID(int i)
Returns the object identifier of the particle. |
double |
getRWPos()
Returns the right wall position |
double |
getTWPos()
Returns the top wall position |
void |
init()
|
void |
pause()
Stop the animation |
void |
removeParticle(int i)
Removes ith particle from ensemble |
void |
removeWallTemp(java.lang.String wall)
|
void |
setAutoRefresh(boolean ar)
Repaint whenevers the system parameters are changed. |
void |
setBackgroundRGBL(int r,
int g,
int b)
Sets Background color inside left ensemble |
void |
setBackgroundRGBR(int r,
int g,
int b)
Sets Background color inside right ensemble |
void |
setBoltzmann(double kb)
|
void |
setDefault()
Reset the clock to time=0. |
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 |
setDefaultSize(double r)
Sets default size when adding new particles. |
void |
setDefaultTemp(double t)
|
void |
setDisplayOffset(int xoff,
int yoff)
Sets offsets for title |
void |
setDt(double dt)
Sets calculation time step |
void |
setFPS(int f)
Sets frames per second of animation |
void |
setMaxParticles(int p)
Sets maximum number of particles that can be stored in arrays of each ensemble |
void |
setMessage(java.lang.String msg)
Adds a message to small yellow box opposite coordinate display. |
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 |
setParticleRGBL(int i,
int rd,
int gr,
int bl)
Sets color of particles in Right ensemble |
void |
setParticleRGBR(int i,
int rd,
int gr,
int bl)
Sets color of particles in left ensemble |
void |
setParticleSize(int i,
double s)
Sets size of particle default value is 1 in world units. |
void |
setParticlesL(int n)
|
void |
setParticlesR(int n)
|
void |
setParticleVel(int i,
double xvel,
double yvel)
Sets Velocity of particle |
void |
setPeriodicH(boolean p)
Sets Periodic periodic boundary conditions in horizontal direction |
void |
setPeriodicV(boolean p)
Sets Periodic periodic boundary conditions ion vertical direction |
void |
setPistonMass(double m)
Sets mass of piston between two ensembles |
void |
setPistonPosition(double ppos)
Sets initian position of piston between two ensembles 0 is all the way to the left wall. |
void |
setPistonWidth(double w)
Sets width of piston between two ensembles |
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 |
setTemperatureL(double temp,
int steps)
Set the temperature of the ensemble in n steps. |
void |
setTemperatureR(double temp,
int steps)
Set the temperature of the right ensemble in n steps. |
void |
setTempL(double temp)
Set the temperature of the ensemble in one step. |
void |
setTempR(double temp)
Set the temperature of the ensemble in one step. |
void |
setWallTempL(java.lang.String wall,
double t)
Sets wall temperature for walls in left ensemble |
void |
setWallTempR(java.lang.String wall,
double t)
Sets wall temperature for walls in right ensemble |
void |
start()
|
void |
stepForward()
Steps simulation forward one time step |
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,
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,
setCursor,
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,
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 |
public TwoEnsembles()
Method Detail |
public java.lang.String getParameter(java.lang.String key, java.lang.String def)
public void init()
public java.lang.String getAppletInfo()
public java.lang.String[][] getParameterInfo()
public void start()
public void setShowControls(boolean s)
s
- booleanpublic void setMessage(java.lang.String msg)
msg
- Stringpublic void setDisplayOffset(int xoff, int yoff)
int
- xoffint
- yoffpublic void setRGB(int r, int g, int b)
r
- int redg
- int greenb
- int bluepublic void addCaption(java.lang.String cap)
cap
- Stringpublic void setDefault()
public void pause()
public void forward()
public void stepForward()
public int addParticleL(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 radiuspublic int addParticleR(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 radiuspublic void createParticlesL(int n)
public void createParticlesR(int n)
public void removeParticle(int i)
i
- int particle numberpublic void setParticlesL(int n)
public void setParticlesR(int n)
public void setMaxParticles(int p)
p
- max particlespublic void setPistonWidth(double w)
w
- double default is 3.public void setPistonPosition(double ppos)
ppos
- double default is 0.5public void setPistonMass(double m)
m
- double default is 100.public void setBackgroundRGBL(int r, int g, int b)
r
- int redg
- int greenb
- int bluepublic void setBackgroundRGBR(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 setTempL(double temp)
temp
- double The new temperature.public void setTemperatureL(double temp, int steps)
temp
- double The new temperature.steps
- int The number of steps.public void setTempR(double temp)
temp
- double The new temperature.public void setTemperatureR(double temp, int steps)
temp
- double The new temperature.steps
- int The number of steps.public void setDefaultTemp(double t)
public void setParticleRGBR(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 setParticleRGBL(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 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 setParticleSize(int i, double s)
i
- int particle numbers
- double size.public int addParticleDataSource(int i)
public void setFPS(int f)
f
- intpublic void setAutoRefresh(boolean ar)
autoRefresh
- Automatic repaint?public void setDt(double dt)
dt
- double timesteppublic void setBoltzmann(double kb)
public void setWallTempR(java.lang.String wall, double t)
public void setWallTempL(java.lang.String wall, double t)
public void removeWallTemp(java.lang.String wall)
public void setPpu(int p)
p
- intpublic void setPeriodicH(boolean p)
p
- booleanpublic void setPeriodicV(boolean p)
p
- booleanpublic double getRWPos()
public double getLWPos()
public double getTWPos()
public double getBWPos()
public int getEnsembleLeftID()
public int getEnsembleRightID()
public int getHistogramLeftID(int nbins, double vmin, double vmax)
nbins
- int The number of bins in the histogram.min
- double The minimum velocitymax
- double The maximum velocitypublic int getHistogramRightID(int nbins, double vmin, double vmax)
nbins
- int The number of bins in the histogram.min
- double The minimum velocitymax
- double The maximum velocitypublic int getParticleLeftID(int i)
i
- int the particle index.public int getParticleRightID(int i)
i
- int the particle index.
|
Copyright Wolfgang Christian | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |