All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class crw.device.JFET

java.lang.Object
   |
   +----crw.device.JFET

public class JFET
extends Object
Class draws a schematic JFET diagram using a Graphics context which is to be passed in as an argument. Class sets the drawing size, location of the diagram, and channel type (N or P). Get methods include querries for the (x,y) location of S, G, D, and Blk leads, the channel type, etc. Other public interfaces include moveTo(), clear(), etc.


Constructor Index

 o JFET()
Constructor prepares a nJFET diagram at default location (60, 60) and default size w=87, h=117.
 o JFET(int, int)
Constructor prepares nJFET diagran to draw at the location, and using the Graphics.
 o JFET(int, int, int, int)
Constructor prepares nJFET diagram at the location and size.
 o JFET(int, int, int, int, boolean)
Constructor prepares a N or P JFET diagram.

Method Index

 o clear(Graphics)
Clears the diagram using a white color.
 o draw(Graphics)
Displays the JFET diagram in the current Graphics context.
 o getChannelLength()
Returns the length of channel (S to D).
 o getChannelWidth()
Returns the width for channel.
 o getDrainX()
Returns the x-coordinate of the Drain contact.
 o getDrainY()
Returns the y-coordinate of the Drain contact.
 o getGateY()
Returns the y-coordinate of Gates contacts.
 o getHeight()
Returns the height of this diagram.
 o getHeightOfContact()
Returns the height of the contact region
 o getHeightOfPN()
Returns the height of the P+ or N+
 o getLeftGateX()
Returns the x-coordinates of Gates contacts.
 o getLeftXOfChannel()
Returns the left x-coordinate of the channel
 o getLowerYOfPN()
Returns the lower y-coordinate of P+ or N+
 o getRightGateX()
 o getRightXOfChannel()
Returns the right x-coordinate of the channel
 o getSourceX()
Returns the x-coordinate of the Source contact.
 o getSourceY()
Returns the y-coordinate of the Source contact.
 o getUpperYOfPN()
Returns the upper y-coordinate of P+ or N+
 o getWidth()
Returns the width of this MOSFET diagram.
 o getWidthOfContact()
Returns the width of the contact region
 o getWidthOfPN()
Returns the width of the P+ or N+
 o getX()
Returns the coordinate of the upper-left corner of diagram.
 o getY()
Returns the coordinate of the upper-left corner of diagram.
 o isNChannel()
Returns channel type.
 o setLocation(int, int)
Moves the upper-left corner of this diagram to a new location.
 o setNChannel(boolean)
Sets the channel type of this JFET.
 o setRect(int, int, int, int)
Sets the drawing area.
 o setSize(int, int)
Changes the size of this diagram to a new size.

Constructors

 o JFET
 public JFET()
Constructor prepares a nJFET diagram at default location (60, 60) and default size w=87, h=117.

 o JFET
 public JFET(int w,
             int h)
Constructor prepares nJFET diagran to draw at the location, and using the Graphics. Default size (86, 116).

Parameters:
w - the width.
h - th height.
 o JFET
 public JFET(int x,
             int y,
             int w,
             int h)
Constructor prepares nJFET diagram at the location and size.

Parameters:
x - the x-position of upper-left corner of diagram.
y - the y-position of upper-left corner of diagram.
w - the total width of diagram.
h - the total height of diagram.
g - the Graphics context to draw in.
 o JFET
 public JFET(int x,
             int y,
             int w,
             int h,
             boolean isNChannel)
Constructor prepares a N or P JFET diagram.

Parameters:
x - the x-position of upper-left corner of diagram.
x - the x-position of upper-left corner of diagram.
w - the total width of JFET diagram.
h - the total height of JFET diagram.
g - the Graphics context to draw diagram in.
isNChannel - true for nJFET and false for pJFET.

Methods

 o draw
 public void draw(Graphics g)
Displays the JFET diagram in the current Graphics context. If the context is null (i.e., not set), then does nothing.

 o clear
 public void clear(Graphics g)
Clears the diagram using a white color.

 o setNChannel
 public void setNChannel(boolean nChannel)
Sets the channel type of this JFET.

Parameters:
nChannel - true for nJFET, false for pJFET
 o isNChannel
 public boolean isNChannel()
Returns channel type.

Returns:
true if n-channel, false if p-channel.
 o setLocation
 public void setLocation(int x,
                         int y)
Moves the upper-left corner of this diagram to a new location.

Parameters:
x - the new x-coordinate.
y - the new y-coordinate.
 o setSize
 public void setSize(int w,
                     int h)
Changes the size of this diagram to a new size.

Parameters:
w - the new width.
h - the new height.
 o setRect
 public void setRect(int x,
                     int y,
                     int w,
                     int h)
Sets the drawing area.

Parameters:
x - the new x-coordinate.
y - the new y-coordinate.
w - the new width.
h - the new height.
 o getX
 public int getX()
Returns the coordinate of the upper-left corner of diagram.

Returns:
the x-coordinate of upper-left corner.
 o getY
 public int getY()
Returns the coordinate of the upper-left corner of diagram.

Returns:
the y-coordinate of upper-left corner.
 o getWidth
 public int getWidth()
Returns the width of this MOSFET diagram.

Returns:
the current width of diagram.
 o getHeight
 public int getHeight()
Returns the height of this diagram.

Returns:
the current height of MOSFET diagram.
 o getSourceX
 public int getSourceX()
Returns the x-coordinate of the Source contact.

Returns:
the x-coordinate of source
 o getSourceY
 public int getSourceY()
Returns the y-coordinate of the Source contact.

Returns:
the y-coordinate of source
 o getDrainX
 public int getDrainX()
Returns the x-coordinate of the Drain contact.

Returns:
the x-coordinate of drain
 o getDrainY
 public int getDrainY()
Returns the y-coordinate of the Drain contact.

Returns:
the y-coordinate of drain
 o getLeftGateX
 public int getLeftGateX()
Returns the x-coordinates of Gates contacts.

 o getRightGateX
 public int getRightGateX()
 o getGateY
 public int getGateY()
Returns the y-coordinate of Gates contacts.

 o getChannelLength
 public int getChannelLength()
Returns the length of channel (S to D).

Returns:
the channel length.
 o getChannelWidth
 public int getChannelWidth()
Returns the width for channel.

Returns:
width of channel.
 o getUpperYOfPN
 public int getUpperYOfPN()
Returns the upper y-coordinate of P+ or N+

 o getLowerYOfPN
 public int getLowerYOfPN()
Returns the lower y-coordinate of P+ or N+

 o getLeftXOfChannel
 public int getLeftXOfChannel()
Returns the left x-coordinate of the channel

 o getRightXOfChannel
 public int getRightXOfChannel()
Returns the right x-coordinate of the channel

 o getWidthOfPN
 public int getWidthOfPN()
Returns the width of the P+ or N+

 o getHeightOfPN
 public int getHeightOfPN()
Returns the height of the P+ or N+

 o getWidthOfContact
 public int getWidthOfContact()
Returns the width of the contact region

 o getHeightOfContact
 public int getHeightOfContact()
Returns the height of the contact region


All Packages  Class Hierarchy  This Package  Previous  Next  Index