All Packages Class Hierarchy This Package Previous Next Index
Class figPac.fResistor
java.lang.Object

+figPac.fResistor
 public class fResistor
 extends Object
 implements fElement, fInteractive, MouseListener, MouseMotionListener
Each instance of the class fResistor represents a resistor.

centerfrac
 The fraction of the way along the wire of the center of the resistor.

from
 The starting point of the wire in user coordinates.

height
 The height of the resistor (maximum distance from the straight line segment
joining the ends) in usr coordinates.

length
 The length of the resistor in usr coordinates.

nobumps
 The number of half periods in the resistor.

to
 The end point of the wire in user coordinates.

fResistor()


fResistor(double, double, double, double)
 Creates a resistor line with initial point (x1,y1)
and final point (x2,y2), both in user coordinates.

fResistor(double, double, double, double, double, double, double, int)
 Creates a resistor with initial point (x1,y1)
and final point (x2,y2), both in user coordinates.

fResistor(double, double, double, double, double, int)
 Creates a resistor with initial point (x1,y1)
and final point (x2,y2), both in user coordinates.

fResistor(double[], double[])
 Creates a resistor with initial point from[]
and final point to[], both in user coordinates.

fResistor(double[], double[], double, double, double, int)
 Creates a resistor line with initial point from[]
and final point to[], both in user coordinates.

fResistor(double[], double[], double, int)
 Creates a resistor line with initial point from[]
and final point to[], both in user coordinates.

configure(String, double)


configure(String, double[])


configure(String, String)


drawgfx(Figure, Hashtable, V2V)


drawps(Figure, Hashtable, V2V)


endEdit()


endEditAndDelete()


mouseClicked(MouseEvent)


mouseDragged(MouseEvent)


mouseEntered(MouseEvent)


mouseExited(MouseEvent)


mouseMoved(MouseEvent)


mousePressed(MouseEvent)


mouseReleased(MouseEvent)


startEdit(figEdit)


toString()

from
public double from[]
 The starting point of the wire in user coordinates.
to
public double to[]
 The end point of the wire in user coordinates.
height
public double height
 The height of the resistor (maximum distance from the straight line segment
joining the ends) in usr coordinates.
length
public double length
 The length of the resistor in usr coordinates.
centerfrac
public double centerfrac
 The fraction of the way along the wire of the center of the resistor.
nobumps
public int nobumps
 The number of half periods in the resistor.
fResistor
public fResistor()
fResistor
public fResistor(double from[],
double to[])
 Creates a resistor with initial point from[]
and final point to[], both in user coordinates.
fResistor
public fResistor(double x1,
double y1,
double x2,
double y2)
 Creates a resistor line with initial point (x1,y1)
and final point (x2,y2), both in user coordinates.
fResistor
public fResistor(double from[],
double to[],
double height,
int nobumps)
 Creates a resistor line with initial point from[]
and final point to[], both in user coordinates. The height and number of bumps
are given by the last two arguments.
fResistor
public fResistor(double x1,
double y1,
double x2,
double y2,
double height,
int nobumps)
 Creates a resistor with initial point (x1,y1)
and final point (x2,y2), both in user coordinates. The height and number of bumps
are given by the last two arguments.
fResistor
public fResistor(double from[],
double to[],
double length,
double height,
double centerfrac,
int nobumps)
 Creates a resistor line with initial point from[]
and final point to[], both in user coordinates. The length, height, centerfrac
and number of bumps of the resistor are given by the last four arguments.
 Parameters:
 from  The intial point of the wire containing the resistor.
 to  The final point of the wire containing the resistor.
 length  The length of the resistor, in usr units.
 height  The height of the resistor (maximum distance from the straight
line segment joining the ends) in usr coordinates.
 centerfrac  The center of the resistor is this fraction of the way
along the wire.
 nobumps  The number of half periods in the resistor.
fResistor
public fResistor(double x1,
double y1,
double x2,
double y2,
double length,
double height,
double centerfrac,
int nobumps)
 Creates a resistor with initial point (x1,y1)
and final point (x2,y2), both in user coordinates. The height and number of bumps
are given by the last two arguments.
 Parameters:
 x1  The xcoordinate of the intial point of the wire containing the resistor.
 y1  The ycoordinate of the intial point of the wire containing the resistor.
 x2  The xcoordinate of the final point of the wire containing the resistor.
 y2  The ycoordinate of the final point of the wire containing the resistor.
 length  The length of the resistor, in usr units.
 height  The height of the resistor (maximum distance from the straight
line segment joining the ends) in usr coordinates.
 centerfrac  The center of the resistor is this fraction of the way
along the wire.
 nobumps  The number of half periods in the resistor.
drawgfx
public void drawgfx(Figure fig,
Hashtable env,
V2V usr2pxl)
drawps
public String drawps(Figure fig,
Hashtable env,
V2V usr2ps)
startEdit
public void startEdit(figEdit applet)
endEdit
public void endEdit()
endEditAndDelete
public void endEditAndDelete()
mouseClicked
public void mouseClicked(MouseEvent evt)
mousePressed
public void mousePressed(MouseEvent evt)
mouseDragged
public void mouseDragged(MouseEvent evt)
mouseReleased
public void mouseReleased(MouseEvent evt)
mouseEntered
public void mouseEntered(MouseEvent evt)
mouseExited
public void mouseExited(MouseEvent evt)
mouseMoved
public void mouseMoved(MouseEvent evt)
configure
public void configure(String name,
String Value)
configure
public void configure(String name,
double Value)
configure
public void configure(String name,
double Value[])
toString
public String toString()
 Overrides:
 toString in class Object
All Packages Class Hierarchy This Package Previous Next Index