Public Methods in Poisson
This documentation is machine generated from the Java source file. All methods in
the applet are listed as a reference for the JavaScript programmer. Caution is
advised. Not all methods are useful for JavaScript to Java communication. Please
refer to the sample scripts to see how various methods are used.
Index
Class poisson.Poisson
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----poisson.Poisson
- public class Poisson
- extends Applet
Poisson()
-
addCircle(double,
double, int, double)
- Add a circular conductor with a fixed voltage.
addCircleCharge(double,
double, int, double)
- Add a circular charge distribution.
addRectangle(double,
double, int, int, double)
- Add a rectangular conductor with a fixed voltage.
addRectangleCharge(double,
double, int, int, double)
- Add a rectangular charge distribution.
destroy()
-
getAppletInfo()
-
getParameter(String,
String)
-
getParameterInfo()
-
init()
-
setBtnOff()
-
setCaption(String)
- Set the caption.
setConductorRGB(int,
int, int)
- Set the color for all subsequent drawing.
setDefault()
- Set the default values: grid=false, fild vectors=false,contours=true, drag=false, no E
and no V on mouse drag.
setDrawChargeDensity(int)
-
setNoDrag(int)
- No drag for all subsequent objects.
setShowContours(int)
- Turn contours off and on.
setShowEOnDrag(int)
- Show the magnitude of the electric field when the mouse is dragged.
setShowFieldVectors(int)
- Turn field vectors off and on.
setShowGrid(int)
- Turn grid off and on.
setShowRhoOnDrag(int)
- Show the charge density when the mouse is dragged.
setShowVOnDrag(int)
- Show the charge voltage when the mouse is dragged.
setXRange(double, double)
- Set the scale using the horizontal axis.
setYRange(double, double)
-
start()
-
stop()
-

Poisson
public Poisson()

getParameter
public String getParameter(String key,
String def)

init
public void init()
- Overrides:
- init in class Applet

start
public void start()
- Overrides:
- start in class Applet

stop
public void stop()
- Overrides:
- stop in class Applet

destroy
public void destroy()
- Overrides:
- destroy in class Applet

addCircle
public void addCircle(double x,
double y,
int r,
double v)
- Add a circular conductor with a fixed voltage.
- Parameters:
- x - x postion of center
- y - y postion of center
- r - radius in pixels
- v - voltage of conductor

addCircleCharge
public void addCircleCharge(double x,
double y,
int r,
double q)
- Add a circular charge distribution.
- Parameters:
- x - x postion of center
- y - y postion of center
- r - radius in pixels
- q - charge

addRectangle
public void addRectangle(double x,
double y,
int w,
int h,
double q)
- Add a rectangular conductor with a fixed voltage.
- Parameters:
- x - x postion of center
- y - y postion of center
- w - width in pixels
- h - height in pixels
- v - voltage of conductor

addRectangleCharge
public void addRectangleCharge(double x,
double y,
int w,
int h,
double v)
- Add a rectangular charge distribution.
- Parameters:
- x - x postion of center
- y - y postion of center
- w - width in pixels
- h - height in pixels
- q - charge

getAppletInfo
public String getAppletInfo()
- Overrides:
- getAppletInfo in class Applet

setBtnOff
public void setBtnOff()

setCaption
public void setCaption(String caption)
- Set the caption.
- Parameters:
- caption - The applet caption.

setConductorRGB
public void setConductorRGB(int r,
int g,
int b)
- Set the color for all subsequent drawing.
- Parameters:
- r - 0
g - 0
b - 0
setDefault
public void setDefault()
- Set the default values: grid=false, fild vectors=false,contours=true, drag=false, no E
and no V on mouse drag.
setNoDrag
public void setNoDrag(int nd)
- No drag for all subsequent objects.
- Parameters:
- nd - NoDrag parameter; nd=0 turns drag off, nd=1 turns drag on.
setShowFieldVectors
public void setShowFieldVectors(int sfv)
- Turn field vectors off and on.
- Parameters:
- sfv - ShowFieldVector parameter; sfv=0 turns field vectors off, sfv=1 turns field
vectors on.
setShowContours
public void setShowContours(int sc)
- Turn contours off and on.
- Parameters:
- sc - Show contours parameter; sc=0 turns contours off, sc=1 turns contours on.
setShowGrid
public void setShowGrid(int sg)
- Turn grid off and on.
- Parameters:
- sg - Show grid parameter; sg=0 turns grid off, sg=1 turns grid on.
setDrawChargeDensity
public void setDrawChargeDensity(int scd)
setXRange
public void setXRange(double xmin,
double xmax)
- Set the scale using the horizontal axis. The leftmost pixel will be xmin. The rightmost
pixel will be xmax. The vertical axis will be rescaled to maintian an aspect ratio of one.
- Parameters:
- xmin - Minimuum value on x axis.
- xmax - Maximum value on x axis.
setYRange
public void setYRange(double ymin,
double ymax)
setShowEOnDrag
public void setShowEOnDrag(int se)
- Show the magnitude of the electric field when the mouse is dragged.
- Parameters:
- se - Show electric field on drag; se=0 turns it off, se=1 turns it on.
setShowRhoOnDrag
public void setShowRhoOnDrag(int sr)
- Show the charge density when the mouse is dragged.
- Parameters:
- sr - Show charge density on drag; sr=0 turns it off, sr=1 turns it on.
setShowVOnDrag
public void setShowVOnDrag(int sv)
- Show the charge voltage when the mouse is dragged.
- Parameters:
- sv - Show voltage on drag; sv=0 turns it off, sv=1 turns it on.
getParameterInfo
public String[][] getParameterInfo()
- Overrides:
- getParameterInfo in class
Applet
Index