|
|||||||
| 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
|
+--bfield.BField
| 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 | |
BField()
|
|
| Method Summary | |
int |
addCoil(double x,
double y,
double current)
Add add a single coil. |
int |
addObject(java.lang.String name,
java.lang.String parList)
Create an object and add it to the Physlet. |
int |
addWire(double x,
double y,
double current)
Add add a Wire. |
void |
destroy()
Destroy all threads and cleanup the applet. |
java.lang.String |
getAppletInfo()
|
java.lang.String |
getParameter(java.lang.String key,
java.lang.String def)
|
java.lang.String[][] |
getParameterInfo()
|
void |
init()
|
boolean |
setAnimationSlave(int masterID,
int slaveID)
Force an object to follow another object on the screen. |
void |
setAutoRefresh(boolean ar)
Repaint every time the system parameters are changed. |
void |
setBFunctions(java.lang.String bx,
java.lang.String by,
double xmin,
double xmax,
double ymin,
double ymax)
Set an external magnetic field. |
boolean |
setCurrent(int id,
double c)
Change the current of a wire or loop after it has been created. |
void |
setDefault()
Clear all the wires and coils and set the applet into a predfined state. |
void |
setDefaultLabel(java.lang.String str)
Set the default label that will be drawn inside a wire. |
void |
setDefaultRGB(int r,
int g,
int b)
Set the default red, green, and blue color values for all subsequent wires and coils. |
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 drag)
Change the drag property of a wire or loop after it has been created. |
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 |
setHideWire(boolean hw)
wires and coils will be created as hidden objects by default. |
boolean |
setLabel(int id,
java.lang.String str)
Change the label property of a wire or loop after it has been created. |
boolean |
setRadius(int id,
double r)
Change the radius of a loop after it has been created. |
boolean |
setResizable(int id,
boolean isResizable)
Make an object resizable. |
boolean |
setRGB(int id,
int r,
int g,
int b)
Set the red, green, and blue color values for a wire or coil that has already been created. |
void |
setShowBOnDrag(boolean sb)
Enable a the user to read the magnetic field magnitude by click-dragging the mouse. |
void |
setShowControls(boolean sc)
Enable interactive controls. |
void |
setShowCoordOnDrag(boolean sc)
Enable a the user to read coordinates by click-dragging the mouse. |
boolean |
setShowFComponents(int id,
boolean showComponents)
Enable a wire to show the force vector components. |
void |
setShowFieldLineOnClick(boolean sfl)
Enable the user to click in order to draw a magnetic field line. |
void |
setShowFieldLineOnDoubleClick(boolean sfl)
Enable the user to double click in order to draw a magnetic field line. |
void |
setShowFieldVectors(boolean sfv)
Show the direction field. |
boolean |
setShowForce(int id,
boolean showForce)
|
boolean |
setShowFVector(int id,
boolean showForce)
Enable a wire to show the net force vector. |
boolean |
setShowInfo(int id,
boolean showInfo)
Enable an object to show information such as the current. |
boolean |
setVisibility(int id,
boolean v)
Hide an object from the user. |
void |
start()
Start the applet. |
| 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 BField()
| 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 int addWire(double x,
double y,
double current)
x - The x position.y - The y position.current - The current.addCoil(double, double, double),
setBFunctions(java.lang.String, java.lang.String, double, double, double, double)
public int addCoil(double x,
double y,
double current)
x - The x position.y - The y position.current - The current.addWire(double, double, double),
setBFunctions(java.lang.String, java.lang.String, double, double, double, double)
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 setAnimationSlave(int masterID,
int slaveID)
masterID - The id of the master object.slaveID - The id of the slave object.public void setAutoRefresh(boolean ar)
ar - Automatic repaint?
public void setBFunctions(java.lang.String bx,
java.lang.String by,
double xmin,
double xmax,
double ymin,
double ymax)
bx - Bx(x,y)by - By(x,y)xmin - The x minimum value.xmax - The x maximum value.ymin - The y minimum value.ymax - The y maximum value.addWire(double, double, double),
addCoil(double, double, double)public void setDefault()
public void setShowFieldLineOnClick(boolean sfl)
sfl - Boolean value.public void setShowFieldLineOnDoubleClick(boolean sfl)
sfl - Boolean value.public void setShowFieldVectors(boolean sfv)
sfv - Boolean value.
public boolean setRGB(int id,
int r,
int g,
int b)
id - The id for the wire or loop.r - red.g - green.b - blue.
public boolean setLabel(int id,
java.lang.String str)
id - The id for the wire or loop.str - The new label.
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 drag)
id - the object identifierdrag - true if dragable
public boolean setFormat(int id,
java.lang.String fstr)
id - The id of the object.fstr - the format string.
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 setResizable(int id,
boolean isResizable)
id - the object identifier.resizable - propertytrue if successful.
public boolean setCurrent(int id,
double c)
id - The id for the wire or loop.c - The new current.
public boolean setRadius(int id,
double r)
id - The id for the wire or loop.r - The new radius.
public boolean setShowFVector(int id,
boolean showForce)
id - The id for the wire or loop.showForce - Boolean value.
public boolean setShowForce(int id,
boolean showForce)
public boolean setShowFComponents(int id,
boolean showComponents)
id - The id for the wire or loop.showComponents - Boolean value.
public boolean setShowInfo(int id,
boolean showInfo)
id - The id for the wire or loop.showInfo - Boolean value.
public boolean setVisibility(int id,
boolean v)
id - the id for the wire or loop.v - true if visiblepublic void setShowCoordOnDrag(boolean sc)
sc - Boolean value.public void setShowBOnDrag(boolean sb)
sb - Boolean value.public void setShowControls(boolean sc)
sc - Boolean value.public void setHideWire(boolean hw)
hw - Boolean value.
public void setDefaultRGB(int r,
int g,
int b)
r - red.g - green.b - blue.public void setDefaultLabel(java.lang.String str)
str - The labelpublic void start()
public void destroy()
|
Copyright Wolfgang Christian | ||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||