All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class crw.circuit.symbol.BJTSymbol

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

public class BJTSymbol
extends TransistorSymbol
Class to draw the BJT symbol in a circuit diagram, provide get methods for various positions, etc.

Version:
1.0
Author:
C.Wie

Constructor Index

 o BJTSymbol(int, int, int, int)
Constructor provides the Bounding Rectangle of this symbol.

Method Index

 o draw(Graphics)
Draws the symbol.
 o getBase()
Returns the Point of Base contact.
 o getCollector()
Returns the Collector coordinate
 o getEmitter()
Returns the Emitter coordinate.
 o initNodes()
Called by constructor and other public methods to init the Node objects for this symbol.
 o initWires()
Called by constructor and other public methods to initialize the wire objects to be attached to this symbol.
 o prepare()
Called by constructor and other public methods to prepare the attributes of this symbol object.
 o setBase(Point)
Sets the Base coordinate to a new Point.
 o setNameAt(FontMetrics)
This method is called by other public methods to reset the location where to put the name of this symbol.
 o setNPN(boolean)
Sets whether npn or pnp.

Constructors

 o BJTSymbol
 public BJTSymbol(int x,
                  int y,
                  int w,
                  int h)
Constructor provides the Bounding Rectangle of this symbol.

Parameters:
x - x-coor of the bounding rectangle
y - y-coor of the bounding rectangle
w - width of the bounding rectangle
h - height of the bounding rectangle

Methods

 o draw
 public void draw(Graphics g)
Draws the symbol.

Parameters:
g - the surface onto which to draw.
Overrides:
draw in class CktElement
 o setNPN
 public void setNPN(boolean npn)
Sets whether npn or pnp.

Parameters:
npn - true if npn.
 o getBase
 public Point getBase()
Returns the Point of Base contact.

Returns:
Base coordinate
 o setBase
 public void setBase(Point p)
Sets the Base coordinate to a new Point.

Parameters:
new - Base coordinate
 o getEmitter
 public Point getEmitter()
Returns the Emitter coordinate.

Returns:
the Emitter coordinate
 o getCollector
 public Point getCollector()
Returns the Collector coordinate

Returns:
the Collector coordinate
 o setNameAt
 protected void setNameAt(FontMetrics fm)
This method is called by other public methods to reset the location where to put the name of this symbol.

Parameters:
fm - the FontMetrics of the graphics object used.
Overrides:
setNameAt in class CktElement
 o initWires
 protected void initWires()
Called by constructor and other public methods to initialize the wire objects to be attached to this symbol.

Overrides:
initWires in class Symbol
 o initNodes
 protected void initNodes()
Called by constructor and other public methods to init the Node objects for this symbol.

Overrides:
initNodes in class Symbol
 o prepare
 protected void prepare()
Called by constructor and other public methods to prepare the attributes of this symbol object.

Overrides:
prepare in class Symbol

All Packages  Class Hierarchy  This Package  Previous  Next  Index