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
-
BJTSymbol(int, int, int, int)
- Constructor provides the Bounding Rectangle of this symbol.
-
draw(Graphics)
- Draws the symbol.
-
getBase()
- Returns the Point of Base contact.
-
getCollector()
- Returns the Collector coordinate
-
getEmitter()
- Returns the Emitter coordinate.
-
initNodes()
- Called by constructor and other public methods to init the
Node objects for this symbol.
-
initWires()
- Called by constructor and other public methods to
initialize the wire objects to be attached to this symbol.
-
prepare()
- Called by constructor and other public methods to
prepare the attributes of this symbol object.
-
setBase(Point)
- Sets the Base coordinate to a new Point.
-
setNameAt(FontMetrics)
- This method is called by other public methods to reset the
location where to put the name of this symbol.
-
setNPN(boolean)
- Sets whether npn or pnp.
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
draw
public void draw(Graphics g)
- Draws the symbol.
- Parameters:
- g - the surface onto which to draw.
- Overrides:
- draw in class CktElement
setNPN
public void setNPN(boolean npn)
- Sets whether npn or pnp.
- Parameters:
- npn - true if npn.
getBase
public Point getBase()
- Returns the Point of Base contact.
- Returns:
- Base coordinate
setBase
public void setBase(Point p)
- Sets the Base coordinate to a new Point.
- Parameters:
- new - Base coordinate
getEmitter
public Point getEmitter()
- Returns the Emitter coordinate.
- Returns:
- the Emitter coordinate
getCollector
public Point getCollector()
- Returns the Collector coordinate
- Returns:
- the Collector coordinate
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
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
initNodes
protected void initNodes()
- Called by constructor and other public methods to init the
Node objects for this symbol.
- Overrides:
- initNodes in class Symbol
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