|
|||||||
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
reflection.ReflectionApplet
Class ReflectionApplet
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 | |
int |
addMedium(double n,
double w)
Deprecated. Replaced by the addObject(String String) method. |
int |
addObject(java.lang.String name,
java.lang.String parList)
Create an object and add it to the Physlet. |
void |
forward()
Starts the animation. |
double |
getQMEnergy()
Gets the energy of the QM state. |
double |
getReflection()
Gets the reflection coef. |
double |
getTransmission()
Gets the tranmission coef. |
int |
getWaveID()
Gets the object identifier for the wave data source. |
void |
pause()
Pauses the animation. |
void |
recalculate()
Method recalculates waves. |
void |
removeAllMedia()
Method removes all objects from animation |
void |
removeObject(int id)
Remove an object from the applet. |
void |
reverse()
Reverses the animation. |
void |
setAmpDisplay(boolean show)
Enable the amplitude display on with click-drag. |
void |
setAutoRefresh(boolean autoRefresh)
Turns auto-refresh feature on and off. |
void |
setCoordDisplay(boolean show)
Enable the coordinate display on with click-drag. |
void |
setDefault()
Method sets default parameters for this applet. |
boolean |
setDragable(int id,
boolean drag)
Make the object with the given id dragable. |
void |
setDragEnergy(int id,
boolean drag)
Allows the user to adjust the energy or index of refraction by dragging up and down inside an element. |
void |
setEnergyDisplay(boolean show)
Enable the energy display in the applet window. |
boolean |
setFont(int id,
java.lang.String family,
int style,
int size)
Change the object's font for any text that is displayed. |
boolean |
setFormat(int id,
java.lang.String fstr)
Change the object's format for the display of numeric data. |
void |
setIndexN(int id,
double n)
Method sets index of refraction of a medium |
void |
setLabel(int id,
java.lang.String label)
Add a small label at bottom center of a medium |
void |
setMagMax(double max)
Method sets Max amplitude in units. |
void |
setMediaWidth(int id,
double w)
Method sets the width of a given medium |
void |
setMessage(java.lang.String msg)
Method adds small text box in lower right hand corner of screen Turned off by setDefault(); |
void |
setMode(java.lang.String m)
Sets applet in EM or QM mode |
boolean |
setObjectFont(int id,
java.lang.String family,
int style,
int size)
Sets the object's font if the object has text that can be displayed. |
void |
setPhaseDisplay(boolean show)
Enable the phase display on with click-drag. |
void |
setPPU(double ppu)
Method sets pixels per unit |
void |
setQMEnergy(double en)
Sets the energy of the QM state. |
void |
setQMPotential(int id,
double v)
Sets the potential energy of the layer. |
void |
setRGB(int id,
int r,
int g,
int b)
Method sets color of a medium |
void |
setShowControls(boolean s)
Method setShowControls |
void |
setShowLWave(boolean show,
int pixOffset)
Enable the display of the left traveling wave or the imaginary part of the wavefunction. |
void |
setShowPhaseColor(boolean show)
Method enables the display of color for phase in QM mode. |
void |
setShowRWave(boolean show,
int pixOffset)
Enable the display of the right traveling wave or the real part of the wavefunction. |
boolean |
setShowValue(int id,
boolean tf)
Enable the display of either the index of refraction or the potential |
void |
setShowWave(boolean show)
Enable the display of the total wave. |
void |
setTimeDisplay(boolean show)
Enable the time display in the applet window. |
void |
setTitle(java.lang.String str)
Set the title. |
boolean |
setVisibility(int id,
boolean vis)
Show the visibility of the object. |
void |
setWavelength(double lambda)
method sets wavelength of incident wave in free space |
void |
setWaveVelocity(double v)
Method sets velocity of animated wave in units per time Positive velocity moves wave to right. |
void |
step()
Steps the animation. |
void |
stepBack()
Method stepBack |
void |
stepForward()
Method stepForward |
void |
stepTimeBack()
Step the time backward by dt. |
void |
stepTimeForward()
Step the time by dt. |
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
- public void setDefault()
setDefault
in class SApplet
public void setMessage(java.lang.String msg)
msg
- String to be displayedpublic void setIndexN(int id, double n)
id
- the object identifiern
- the index of refractionpublic void setDragEnergy(int id, boolean drag)
id
- the object identifierdrag
- booleanpublic void setPPU(double ppu)
ppu
- doublepublic void setQMEnergy(double en)
en
- the energypublic double getQMEnergy()
public void setQMPotential(int id, double v)
id
- the object identifier for the layerv
- the potential energypublic void setMode(java.lang.String m)
m
- String "EM" or "QM"public void pause()
pause
in class SApplet
public void forward()
forward
in class SApplet
public void reverse()
reverse
in class SApplet
public void step()
public void stepTimeForward()
stepTimeForward
in class SApplet
SApplet.setDt(double)
public void stepForward()
public void stepTimeBack()
stepTimeBack
in class SApplet
SApplet.setDt(double)
public void stepBack()
public void setWaveVelocity(double v)
v
- doublepublic int addObject(java.lang.String name, java.lang.String parList)
addObject ("layer", "w=1.5, n=2.4");
name
- the type of object to be created.parList
- a list of parameters to be set
public void removeObject(int id)
id
- public int addMedium(double n, double w)
n
- double index of refractionw
- double width of medium in units
public int getWaveID()
public double getReflection()
public double getTransmission()
public void removeAllMedia()
public boolean setDragable(int id, boolean drag)
id
- The id of the object.drag
- Dragable?
public void setRGB(int id, int r, int g, int b)
id
- the object identifierr
- red value 0 <= r <= 255g
- green value 0 <= g <= 255b
- blue value 0 <= b <= 255public void setMagMax(double max)
max
- doublepublic void setWavelength(double lambda)
lambda
- wavelength in unitspublic void setMediaWidth(int id, double w)
id
- int hashcode id of mediumw
- public void recalculate()
public void setAutoRefresh(boolean autoRefresh)
setAutoRefresh
in class SApplet
autoRefresh
- booleanpublic boolean setFont(int id, java.lang.String family, int style, int size)
id
- The id of the object.family
- The font family: Helvetica, Times.style
- The style, 0=plain, 1=bold.size
- The size of the font;
public boolean setObjectFont(int id, java.lang.String family, int style, int size)
id
- The id of the object.family
- The font family: Helvetica, Times.style
- The style, 0=plain, 1=bold.size
- The size of the font;
public boolean setFormat(int id, java.lang.String fstr)
id
- The id of the object.fstr
- the format string.
public void setLabel(int id, java.lang.String label)
id
- the object identifierlabel
- the labelpublic void setTitle(java.lang.String str)
str
- Title string.public void setEnergyDisplay(boolean show)
show
- true will display energypublic void setTimeDisplay(boolean show)
show
- true will display timepublic void setAmpDisplay(boolean show)
show
- true will display amplitudepublic void setCoordDisplay(boolean show)
show
- true will display coordinatespublic void setPhaseDisplay(boolean show)
show
- true will display phasepublic boolean setShowValue(int id, boolean tf)
id
- the object identifiertf
- boolean enable or disable
public boolean setVisibility(int id, boolean vis)
id
- vis
- show object on screen?
public void setShowWave(boolean show)
show
- the wavepublic void setShowLWave(boolean show, int pixOffset)
show
- the L wavepixOffset
- public void setShowPhaseColor(boolean show)
show
- the colorpublic void setShowRWave(boolean show, int pixOffset)
show
- the R wavepixOffset
-
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |