|
|||||||
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
faraday.Faraday
Simulates the Faraday effect using a sliding wire.
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 |
addObject(java.lang.String name,
java.lang.String parList)
Creates an object and add it to the Physlet. |
void |
cyclingClock()
|
void |
forward()
Starts the animation. |
int |
getGraphID()
Gets the ID for the graph. |
void |
reset()
Stops the applet, clears the graph, and puts the applet into a predfined state. |
void |
reverse()
Resumes the simulation with a negative time step. |
boolean |
setAnimationSlave(int masterID,
int slaveID)
Force an object to follow another object on the screen. |
void |
setAutoRefresh(boolean auto)
Sets the autoRefresh property. |
void |
setBScale(double min,
double max)
Sets the range corresponding to blue and red for the B field color. |
boolean |
setConstraint(int id,
int constraintID)
Sets a motion constraint on an object. |
void |
setDefault()
Stops the applet, clears the graph, and puts the applet into a predfined state. |
boolean |
setDisplayOffset(int id,
int xOff,
int yOff)
Offset the object's position on the screen from its default drawing position. |
boolean |
setDragable(int id,
boolean canDrag)
Make the object with the given id dragable. |
void |
setDragMode(boolean dm)
Sets the drag mode on the wire. |
void |
setFieldFunction(java.lang.String str)
Sets the magnetic field, B(x,t), into or out of the wire loop. |
boolean |
setFont(int id,
java.lang.String family,
int style,
int size)
Sets the object's font. |
boolean |
setFormat(int id,
java.lang.String fstr)
Change the object's format for the display of numeric data. |
void |
setMaxTime(double tm)
Sets the maximum time for the graph and for cycle mode. |
void |
setMeterMinMax(double min,
double max)
Sets the range on the meter and the graph. |
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 |
setPixPerUnit(int ppu)
Sets the scale. |
boolean |
setPosFunction(java.lang.String str)
Sets the slider postion as a function of time. |
boolean |
setRGB(int id,
int r,
int g,
int b)
Sets the color of an object. |
void |
setShowBOnDrag(boolean show)
Show the Magnetic field on mouse drag. |
void |
setShowColor(boolean show)
Show a color corresponding to the local magnetic field on the schematic. |
boolean |
setShowCoordinates(int id,
boolean show)
Have the object show its coordinates on screen. |
void |
setShowCurrentArrow(int id,
boolean show)
Show the current arrow on the schematic. |
void |
setShowGraph(boolean sg)
Display the graph, V(t). |
void |
setShowGrid(boolean show)
Show a dot or an x corresponding to the local magnetic field on the schematic. |
void |
setShowMeter(int id,
boolean show)
Show the meter on the UWire schematic. |
void |
setTimeContinuous()
Let the animation time increase indefinitely. |
void |
setTimeCycle(double max)
Sets a time loop for the animation from 0 to max. |
void |
setTimeInterval(double min,
double max)
Sets a time loop for the animation. |
void |
setTimeOneShot(double max,
java.lang.String msg)
Run the simulation one time. |
boolean |
setTrajectory(int id,
java.lang.String xStr)
Sets the trajectory of an object on the screen. |
boolean |
setVisibility(int id,
boolean show)
Show the visibility of the object. |
void |
step(double dt,
double time)
|
void |
stepBack()
|
void |
stepForward()
Steps forward one time step. |
void |
stepTimeBack()
Steps the simulation one negative time step. |
void |
stepTimeForward()
Steps one positive 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 forward()
forward
in class SApplet
public void reverse()
reverse
in class SApplet
public void stepTimeForward()
stepTimeForward
in class SApplet
public void stepForward()
public void stepTimeBack()
stepTimeBack
in class SApplet
public void stepBack()
public void step(double dt, double time)
step
in interface edu.davidson.tools.SStepable
public void cyclingClock()
public int getGraphID()
public void setDefault()
setDefault
in class SApplet
public void reset()
reset
in class SApplet
public int addObject(java.lang.String name, java.lang.String parList)
addObject ("circle", "x = 0, y = -1.0, r = 10");
name
- the type of object to be created.parList
- a list of parameters to be set
public boolean setConstraint(int id, int constraintID)
id
- the ID of the object.constraintID
- the ID of the constraint.
true
if successful.public void setAutoRefresh(boolean auto)
setAutoRefresh
in class SApplet
auto
- AutoRefresh the graph?public void setShowColor(boolean show)
show
- Show the color.public void setShowGrid(boolean show)
show
- Show the grid.public void setShowBOnDrag(boolean show)
show
- Show B.public void setShowCurrentArrow(int id, boolean show)
id
- the object identifiershow
- true to show the current arrow.public boolean setShowCoordinates(int id, boolean show)
id
- The id of the object.show
- Show the coordinates?
public void setShowMeter(int id, boolean show)
id
- the object identifier of the UWireshow
- true to show the meter.public void setDragMode(boolean dm)
dm
- Boolean drag mode.public void setMeterMinMax(double min, double max)
min
- The minimum value.max
- The maximum value.public void setPixPerUnit(int ppu)
ppu
- pPxels per unit.public void setShowGraph(boolean sg)
sg
- True will display V(t).public boolean setPosFunction(java.lang.String str)
str
- The position of the slider, x(t).
Faraday.setDragMode(boolean)
public boolean setTrajectory(int id, java.lang.String xStr)
id
- the id of the thingxStr
- the function x(t)
public void setFieldFunction(java.lang.String str)
str
- The magnetic field, B(x,t).public void setBScale(double min, double max)
min
- the bfield minimum.max
- the bfield maximum.public void setMaxTime(double tm)
tm
- maximum timeFaraday.setTimeContinuous()
,
Faraday.setTimeCycle(double)
public void setTimeCycle(double max)
setTimeCycle
in class SApplet
max
- The ending time for the loop.Faraday.setTimeContinuous()
,
Faraday.setTimeInterval(double, double)
public void setTimeInterval(double min, double max)
min
- The starting time value for the loopmax
- The ending time for the loop.Faraday.setTimeContinuous()
public void setTimeContinuous()
setTimeContinuous
in class SApplet
Faraday.setTimeOneShot(double, java.lang.String)
,
Faraday.setTimeInterval(double, double)
public void setTimeOneShot(double max, java.lang.String msg)
setTimeOneShot
in class SApplet
max
- Reset the simulation to t=0 when t>=max and stop the simulation.msg
- public boolean setFont(int id, java.lang.String family, int style, int size)
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 boolean setDisplayOffset(int id, int xOff, int yOff)
id
- The id of the object.
public boolean setDragable(int id, boolean canDrag)
id
- of the object.canDrag
- Is the object dragable?
true
if successful false
otherwisepublic boolean setVisibility(int id, boolean show)
show
- true
will show object on screen
true
if successful false
otherwisepublic boolean setAnimationSlave(int masterID, int slaveID)
masterID
- The id of the master object.slaveID
- The id of the slave object.
public boolean setRGB(int id, int r, int g, int b)
id
- The id of the object.r
- redg
- greenb
- blue
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |