All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class crw.circuit.GroundSymbol

java.lang.Object
   |
   +----crw.circuit.GroundSymbol

public class GroundSymbol
extends Object
implements VisualElement
A Ground symbol for drawing circuit diagrams.

Version:
0.0 3/31/1998
Author:
C.R.Wie

Constructor Index

 o GroundSymbol()
 o GroundSymbol(int)
 o GroundSymbol(Point)

Method Index

 o draw(Graphics)
Draws the Ground symbol in the Graphics context.
 o getHeight()
 o getLocation()
Returns the position of top-middle of this symbol.
 o getScale()
 o setLocation(int, int)
Sets the position of the top middle.
 o setScale(int)
Sets the scale 0 (smallest) thru 4 (largest).

Constructors

 o GroundSymbol
 public GroundSymbol()
 o GroundSymbol
 public GroundSymbol(int scale)
 o GroundSymbol
 public GroundSymbol(Point p)
Parameters:
p - the position of top middle.

Methods

 o draw
 public void draw(Graphics g)
Draws the Ground symbol in the Graphics context.

Parameters:
g - the Graphics context to draw this symbol.
 o setLocation
 public void setLocation(int x,
                         int y)
Sets the position of the top middle.

Parameters:
x - the x-coordinate
y - the y-coordinate
 o getLocation
 public Point getLocation()
Returns the position of top-middle of this symbol.

Returns:
the position of top-middle.
 o setScale
 public void setScale(int scale)
Sets the scale 0 (smallest) thru 4 (largest). If outside this range, the scale is set to 2 (default)

Parameters:
scale - the scale 0 -- 4
 o getScale
 public int getScale()
Returns:
the current scale.
 o getHeight
 public int getHeight()
Returns:
the overall height of this symbol.

All Packages  Class Hierarchy  This Package  Previous  Next  Index