|
|||||||
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 | +--faraday.Faraday
Simulate the Faraday effect using a sliding wire.
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 | |
Faraday()
|
Method Summary | |
int |
addObject(java.lang.String name,
java.lang.String parList)
Create an object and add it to the Physlet. |
void |
cyclingClock()
|
void |
destroy()
Destroy all threads and cleanup the applet. |
void |
forward()
start the animation. |
java.lang.String |
getAppletInfo()
|
int |
getGraphID()
Get the ID for the graph. |
java.lang.String |
getParameter(java.lang.String key,
java.lang.String def)
|
java.lang.String[][] |
getParameterInfo()
|
void |
init()
|
void |
reset()
Stop the applet, clear the graph, and put the applet into a predfined state. |
void |
reverse()
Resume 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)
Set the autoRefresh property. |
void |
setBScale(double min,
double max)
Set the range corresponding to blue and red for the B field color. |
boolean |
setConstraint(int id,
int constraintID)
Set a motion constraint on an object. |
void |
setDefault()
Stop the applet, clear the graph, and put 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)
Set the drag mode on the wire. |
void |
setFieldFunction(java.lang.String str)
Set 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)
change the object's font for any text4 that is displayed. |
boolean |
setFormat(int id,
java.lang.String fstr)
Change the object's format for the display of numeric data. |
void |
setMaxTime(double tm)
Set the maximum time for the graph and for cycle mode. |
void |
setMeterMinMax(double min,
double max)
Set the range on the meter and the graph. |
void |
setPixPerUnit(int ppu)
Set the scale. |
boolean |
setPosFunction(java.lang.String str)
Set the slider postion as a function of time. |
boolean |
setRGB(int id,
int r,
int g,
int b)
Set 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)
Set a time loop for the animation from 0 to max. |
void |
setTimeInterval(double min,
double max)
Set a time loop for the animation. |
void |
setTimeOneShot(double max,
java.lang.String msg)
Run the simulaiton one time. |
boolean |
setTrajectory(int id,
java.lang.String xStr)
Set the trajectory of an object on the screen. |
boolean |
setVisibility(int id,
boolean show)
Show the visibility of the object. |
void |
start()
|
void |
step(double dt,
double time)
|
void |
stepBack()
|
void |
stepForward()
|
void |
stepTimeBack()
Step the simulation one negative time step. |
void |
stepTimeForward()
Step the simulation one positive time step. |
void |
stop()
Stop the animation. |
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 |
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 Faraday()
Method Detail |
public java.lang.String getParameter(java.lang.String key, java.lang.String def)
public void init()
public void forward()
public void reverse()
public void stepTimeForward()
public void stepForward()
public void stepTimeBack()
public void stepBack()
public void destroy()
public void start()
public void stop()
public void step(double dt, double time)
public void cyclingClock()
public java.lang.String getAppletInfo()
public int getGraphID()
public java.lang.String[][] getParameterInfo()
public void setDefault()
public void reset()
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 setpublic 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)
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).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 timesetTimeContinuous()
,
setTimeCycle(double)
public void setTimeCycle(double max)
max
- The ending time for the loop.setTimeContinuous()
,
setTimeInterval(double, double)
public void setTimeInterval(double min, double max)
min
- The starting time value for the loopmax
- The ending time for the loop.setTimeContinuous()
public void setTimeContinuous()
setTimeOneShot(double, java.lang.String)
,
setTimeInterval(double, double)
public void setTimeOneShot(double max, java.lang.String msg)
max
- Reset the simulation to t=0 when t>=max and stop the simulation.string
- the message to be displayed on the screen when the max time is reached.public 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 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.xoff
- The x offset.yoff
- The y offset.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 screentrue
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
|
Copyright Wolfgang Christian | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |