All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class crw.circuit.symbol.DiodeSymbol

java.lang.Object
   |
   +----crw.circuit.symbol.CktElement
           |
           +----crw.circuit.symbol.Symbol
                   |
                   +----crw.circuit.symbol.Active
                           |
                           +----crw.circuit.symbol.DiodeSymbol

public class DiodeSymbol
extends Active
Class to draw diode symbol in a circuit diagram. It is prepared to be used in a SPICE-like circuit simulator.


Variable Index

 o total

Constructor Index

 o DiodeSymbol(int, int, int, int)
Constructor is supplied with the bounding rectangle of this symbol.

Method Index

 o draw(Graphics)
Draws the symbol using a hollow triangle for the arrow.
 o fill(Graphics)
Draws the symbol with a filled triangle.
 o getMinus()
Returns the coordinate of the Minus (tip of arrow).
 o getPlus()
Returns the coordinate of the Plus side (the middle of the base of triangle).
 o initNodes()
Called by constructor or other public methods to init the Node objects associated with this symbol.
 o initWires()
Called by constructor or other public methods to init the Wire objects associated with this symbol.
 o prepare()
Called by constructor or other public methods to init the attributes of this symbol obj.
 o setNameAt(FontMetrics)
Called by constructor or other public methods to init the Point object where to draw the name of this symbol.

Variables

 o total
 public static int total

Constructors

 o DiodeSymbol
 public DiodeSymbol(int x,
                    int y,
                    int w,
                    int h)
Constructor is supplied with the bounding rectangle of this symbol.

Methods

 o draw
 public void draw(Graphics g)
Draws the symbol using a hollow triangle for the arrow.

Overrides:
draw in class CktElement
 o fill
 public void fill(Graphics g)
Draws the symbol with a filled triangle.

 o getPlus
 public Point getPlus()
Returns the coordinate of the Plus side (the middle of the base of triangle).

 o getMinus
 public Point getMinus()
Returns the coordinate of the Minus (tip of arrow).

 o initNodes
 protected void initNodes()
Called by constructor or other public methods to init the Node objects associated with this symbol.

Overrides:
initNodes in class Symbol
 o initWires
 protected void initWires()
Called by constructor or other public methods to init the Wire objects associated with this symbol.

Overrides:
initWires in class Symbol
 o prepare
 protected void prepare()
Called by constructor or other public methods to init the attributes of this symbol obj.

Overrides:
prepare in class Symbol
 o setNameAt
 protected void setNameAt(FontMetrics fm)
Called by constructor or other public methods to init the Point object where to draw the name of this symbol.

Overrides:
setNameAt in class CktElement

All Packages  Class Hierarchy  This Package  Previous  Next  Index