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.
-
total
-
-
DiodeSymbol(int, int, int, int)
- Constructor is supplied with the bounding rectangle of this symbol.
-
draw(Graphics)
- Draws the symbol using a hollow triangle for the arrow.
-
fill(Graphics)
- Draws the symbol with a filled triangle.
-
getMinus()
- Returns the coordinate of the Minus (tip of arrow).
-
getPlus()
- Returns the coordinate of the Plus side (the
middle of the base of triangle).
-
initNodes()
- Called by constructor or other public methods to init
the Node objects associated with this symbol.
-
initWires()
- Called by constructor or other public methods to init
the Wire objects associated with this symbol.
-
prepare()
- Called by constructor or other public methods to init
the attributes of this symbol obj.
-
setNameAt(FontMetrics)
- Called by constructor or other public methods to init
the Point object where to draw the name of this symbol.
total
public static int total
DiodeSymbol
public DiodeSymbol(int x,
int y,
int w,
int h)
- Constructor is supplied with the bounding rectangle of this symbol.
draw
public void draw(Graphics g)
- Draws the symbol using a hollow triangle for the arrow.
- Overrides:
- draw in class CktElement
fill
public void fill(Graphics g)
- Draws the symbol with a filled triangle.
getPlus
public Point getPlus()
- Returns the coordinate of the Plus side (the
middle of the base of triangle).
getMinus
public Point getMinus()
- Returns the coordinate of the Minus (tip of arrow).
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
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
prepare
protected void prepare()
- Called by constructor or other public methods to init
the attributes of this symbol obj.
- Overrides:
- prepare in class Symbol
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