All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class crw.circuit.symbol.TransistorSymbol

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

public abstract class TransistorSymbol
extends Active
Class to represent all Transistor symbols.

Version:
1.0
Author:
C.Wie

Constructor Index

 o TransistorSymbol(int, int, int, int)
Constructor is supplied with the bounding rectangle.

Method Index

 o drawArrow(Graphics, int, int, int, int, int)
Draws arrow head for the Tr symbol.
 o fillArrow(Graphics, int, int, int, int, int)
Draws a filled arrow head for the Tr symbol.
 o getTopLeftES()
Returns whether S (or E) is at top (if hori) or left (if vert)
 o setTopLeftES(boolean)
Specifies that Source (Emitter) is at top (if horizontal) or at left (if vertical).

Constructors

 o TransistorSymbol
 public TransistorSymbol(int x,
                         int y,
                         int w,
                         int h)
Constructor is supplied with the bounding rectangle.

Methods

 o setTopLeftES
 public void setTopLeftES(boolean top)
Specifies that Source (Emitter) is at top (if horizontal) or at left (if vertical).

 o getTopLeftES
 protected boolean getTopLeftES()
Returns whether S (or E) is at top (if hori) or left (if vert)

 o drawArrow
 protected void drawArrow(Graphics g,
                          int x0,
                          int y0,
                          int xTip,
                          int yTip,
                          int arrowLength)
Draws arrow head for the Tr symbol.

Parameters:
x0 - initial x-coor.
y0 - initial y-coor.
xTip - x-coor at the tip.
yTip - y-coor at the tip.
arrowLength - the length of the arrow head.
 o fillArrow
 public void fillArrow(Graphics g,
                       int x0,
                       int y0,
                       int xTip,
                       int yTip,
                       int arrowLength)
Draws a filled arrow head for the Tr symbol.

Parameters:
x0 - initial x-coor.
y0 - initial y-coor.
xTip - x-coor at the tip.
yTip - y-coor at the tip.
arrowLength - the length of the arrow head.

All Packages  Class Hierarchy  This Package  Previous  Next  Index