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.
-
JFET()
- Constructor prepares a nJFET diagram at default location
(60, 60) and default size w=87, h=117.
-
JFET(int, int)
- Constructor prepares nJFET diagran to draw at the location,
and using the Graphics.
-
JFET(int, int, int, int)
- Constructor prepares nJFET diagram at the location and size.
-
JFET(int, int, int, int, boolean)
- Constructor prepares a N or P JFET diagram.
-
clear(Graphics)
- Clears the diagram using a white color.
-
draw(Graphics)
- Displays the JFET diagram in the current Graphics context.
-
getChannelLength()
- Returns the length of channel (S to D).
-
getChannelWidth()
- Returns the width for channel.
-
getDrainX()
- Returns the x-coordinate of the Drain contact.
-
getDrainY()
- Returns the y-coordinate of the Drain contact.
-
getGateY()
- Returns the y-coordinate of Gates contacts.
-
getHeight()
- Returns the height of this diagram.
-
getHeightOfContact()
- Returns the height of the contact region
-
getHeightOfPN()
- Returns the height of the P+ or N+
-
getLeftGateX()
- Returns the x-coordinates of Gates contacts.
-
getLeftXOfChannel()
- Returns the left x-coordinate of the channel
-
getLowerYOfPN()
- Returns the lower y-coordinate of P+ or N+
-
getRightGateX()
-
-
getRightXOfChannel()
- Returns the right x-coordinate of the channel
-
getSourceX()
- Returns the x-coordinate of the Source contact.
-
getSourceY()
- Returns the y-coordinate of the Source contact.
-
getUpperYOfPN()
- Returns the upper y-coordinate of P+ or N+
-
getWidth()
- Returns the width of this MOSFET diagram.
-
getWidthOfContact()
- Returns the width of the contact region
-
getWidthOfPN()
- Returns the width of the P+ or N+
-
getX()
- Returns the coordinate of the upper-left corner of diagram.
-
getY()
- Returns the coordinate of the upper-left corner of diagram.
-
isNChannel()
- Returns channel type.
-
setLocation(int, int)
- Moves the upper-left corner of this diagram to a new
location.
-
setNChannel(boolean)
- Sets the channel type of this JFET.
-
setRect(int, int, int, int)
- Sets the drawing area.
-
setSize(int, int)
- Changes the size of this diagram to a new size.
JFET
public JFET()
- Constructor prepares a nJFET diagram at default location
(60, 60) and default size w=87, h=117.
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.
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.
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.
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.
clear
public void clear(Graphics g)
- Clears the diagram using a white color.
setNChannel
public void setNChannel(boolean nChannel)
- Sets the channel type of this JFET.
- Parameters:
- nChannel - true for nJFET, false for pJFET
isNChannel
public boolean isNChannel()
- Returns channel type.
- Returns:
- true if n-channel, false if p-channel.
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.
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.
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.
getX
public int getX()
- Returns the coordinate of the upper-left corner of diagram.
- Returns:
- the x-coordinate of upper-left corner.
getY
public int getY()
- Returns the coordinate of the upper-left corner of diagram.
- Returns:
- the y-coordinate of upper-left corner.
getWidth
public int getWidth()
- Returns the width of this MOSFET diagram.
- Returns:
- the current width of diagram.
getHeight
public int getHeight()
- Returns the height of this diagram.
- Returns:
- the current height of MOSFET diagram.
getSourceX
public int getSourceX()
- Returns the x-coordinate of the Source contact.
- Returns:
- the x-coordinate of source
getSourceY
public int getSourceY()
- Returns the y-coordinate of the Source contact.
- Returns:
- the y-coordinate of source
getDrainX
public int getDrainX()
- Returns the x-coordinate of the Drain contact.
- Returns:
- the x-coordinate of drain
getDrainY
public int getDrainY()
- Returns the y-coordinate of the Drain contact.
- Returns:
- the y-coordinate of drain
getLeftGateX
public int getLeftGateX()
- Returns the x-coordinates of Gates contacts.
getRightGateX
public int getRightGateX()
getGateY
public int getGateY()
- Returns the y-coordinate of Gates contacts.
getChannelLength
public int getChannelLength()
- Returns the length of channel (S to D).
- Returns:
- the channel length.
getChannelWidth
public int getChannelWidth()
- Returns the width for channel.
- Returns:
- width of channel.
getUpperYOfPN
public int getUpperYOfPN()
- Returns the upper y-coordinate of P+ or N+
getLowerYOfPN
public int getLowerYOfPN()
- Returns the lower y-coordinate of P+ or N+
getLeftXOfChannel
public int getLeftXOfChannel()
- Returns the left x-coordinate of the channel
getRightXOfChannel
public int getRightXOfChannel()
- Returns the right x-coordinate of the channel
getWidthOfPN
public int getWidthOfPN()
- Returns the width of the P+ or N+
getHeightOfPN
public int getHeightOfPN()
- Returns the height of the P+ or N+
getWidthOfContact
public int getWidthOfContact()
- Returns the width of the contact region
getHeightOfContact
public int getHeightOfContact()
- Returns the height of the contact region
All Packages Class Hierarchy This Package Previous Next Index