All Packages Class Hierarchy This Package Previous Next Index
Class crw.device.MOSFET
java.lang.Object
|
+----crw.device.MOSFET
- public class MOSFET
- extends Object
Class draws a schematic MOSFET 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.
- Version:
- 1.0 2-12-1998.
- Author:
- C.R.Wie
-
MOSFET()
- Constructor prepares a nMOS diagram at default location
(30, 50) and default size w=200, h=120.
-
MOSFET(int, int)
- Constructor prepares nMOS diagran to draw at the location,
and using the Graphics.
-
MOSFET(int, int, int, int)
- Constructor prepares nMOS diagram at the location and size.
-
MOSFET(int, int, int, int, boolean)
- Constructor prepares a N or P MOS diagram.
-
clear(Graphics)
- Clears the diagram using a white color.
-
draw(Graphics)
- Displays the MOS diagram in the current Graphics context.
-
getBulkX()
- Returns the x-coordinate of Bulk contact.
-
getBulkY()
- Returns the y-coordinate of Bulk contact.
-
getChannelHeight()
- Returns the maximum possible vertical width for channel.
-
getChannelLength()
- Returns the length of channel (S to D).
-
getChannelX()
- Returns of x-coordinate of the source-end of Channel.
-
getChannelY()
- Returns the y-coordinate of the top of Channel (semi surface).
-
getContactY()
- Returns vertical coordinate for the S, G, and D contact.
-
getDrainX()
- Returns the x-coordinate of Drain contact.
-
getGateX()
- Returns the x-coordinate of Gate contact.
-
getHeight()
- Returns the height of this diagram.
-
getSourceX()
- Returns the x-coordinate of the Source contact.
-
getWidth()
- Returns the width of this MOSFET diagram.
-
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 MOS.
-
setRect(int, int, int, int)
- Sets the drawing area.
-
setSize(int, int)
- Changes the size of this diagram to a new size.
MOSFET
public MOSFET()
- Constructor prepares a nMOS diagram at default location
(30, 50) and default size w=200, h=120.
MOSFET
public MOSFET(int w,
int h)
- Constructor prepares nMOS diagran to draw at the location,
and using the Graphics. Default size (200, 120).
- Parameters:
- w - the width.
- h - th height.
MOSFET
public MOSFET(int x,
int y,
int w,
int h)
- Constructor prepares nMOS 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.
MOSFET
public MOSFET(int x,
int y,
int w,
int h,
boolean isNChannel)
- Constructor prepares a N or P MOS 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 MOS diagram.
- h - the total height of MOS diagram.
- g - the Graphics context to draw diagram in.
- isNChannel - true for nMOS and false for pMOS.
draw
public void draw(Graphics g)
- Displays the MOS 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 MOS.
- Parameters:
- nChannel - true for nMOS, false for pMOS.
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
getContactY
public int getContactY()
- Returns vertical coordinate for the S, G, and D contact.
- Returns:
- the vertical coordinate of S,G,D contacts.
getGateX
public int getGateX()
- Returns the x-coordinate of Gate contact.
getDrainX
public int getDrainX()
- Returns the x-coordinate of Drain contact.
- Returns:
- the x-coordinate of Drain.
getChannelX
public int getChannelX()
- Returns of x-coordinate of the source-end of Channel.
- Returns:
- the source-end x-coordinate of Channel.
getChannelY
public int getChannelY()
- Returns the y-coordinate of the top of Channel (semi surface).
- Returns:
- the y-coordinate of semi surface.
getChannelLength
public int getChannelLength()
- Returns the length of channel (S to D).
- Returns:
- the channel length.
getChannelHeight
public int getChannelHeight()
- Returns the maximum possible vertical width for channel.
- Returns:
- max vertical width of channel.
getBulkX
public int getBulkX()
- Returns the x-coordinate of Bulk contact.
- Returns:
- x-coordinate of Bulk contact.
getBulkY
public int getBulkY()
- Returns the y-coordinate of Bulk contact.
- Returns:
- the y-coordinate of Bulk contact.
All Packages Class Hierarchy This Package Previous Next Index