All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class crw.circuit.symbol.Symbol

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

public abstract class Symbol
extends CktElement
Universal super class to all device symbols in a circuit schematic diagram. Device may be active or passive.

Version:
1.0
Author:
C.Wie

Constructor Index

 o Symbol()
Constructor is used in subclass only.

Method Index

 o getBounds()
Returns the bounding rectangle of this symbol.
 o getLocation()
Gets the upper-left corner position of bounding rectangle of this symbol.
 o getSize()
Returns the size of the bounding rectangle.
 o initNodes()
Subclass implements this to init the Node objects.
 o initWires()
Subclass implements this to init Wire objs.
 o prepare()
Subclass implements this to init the attributes.
 o setLocation(int, int)
Sets the upper-left corner of bounding rectangle of this symbol.
 o setLocation2(int, int)
Sets the upper-left corner of bounding rectangle of this symbol.
 o setNode(int, Node)
Sets one the nodes to a new Node obj.
 o setNodes(Node[])
Sets new Node number objects associated to this symbol.
 o setSize(int, int)
Sets a new size for the bounding rectangle of this symbol.
 o setSize2(int, int)
Sets a new size for the bounding rectangle of this symbol.
 o setWires(Wire[])
Sets the wire obj's associated to this symbol.

Constructors

 o Symbol
 protected Symbol()
Constructor is used in subclass only.

Methods

 o getBounds
 public Rectangle getBounds()
Returns the bounding rectangle of this symbol.

 o setNodes
 public void setNodes(Node node[])
Sets new Node number objects associated to this symbol.

 o setNode
 public void setNode(int i,
                     Node nd)
Sets one the nodes to a new Node obj.

Parameters:
i - the ith node. Goes around CCW, starting to top-left corner.
nd - new Node obj.
 o setWires
 public void setWires(Wire w[])
Sets the wire obj's associated to this symbol.

 o setSize
 public void setSize(int w,
                     int h)
Sets a new size for the bounding rectangle of this symbol. It does not prepare attributes that may depend on the new size.

 o setSize2
 public void setSize2(int w,
                      int h)
Sets a new size for the bounding rectangle of this symbol. Then it prepares all attributes that may depend on the width and height values.

 o getSize
 public Dimension getSize()
Returns the size of the bounding rectangle.

 o setLocation
 protected void setLocation(int x,
                            int y)
Sets the upper-left corner of bounding rectangle of this symbol. Does NOT handle any properties of this object that depend on this coordinate.

 o setLocation2
 public void setLocation2(int x,
                          int y)
Sets the upper-left corner of bounding rectangle of this symbol. And then, any properties of this object that depend on this coordinates are prepared.

 o getLocation
 public Point getLocation()
Gets the upper-left corner position of bounding rectangle of this symbol.

 o initNodes
 protected abstract void initNodes()
Subclass implements this to init the Node objects.

 o initWires
 protected abstract void initWires()
Subclass implements this to init Wire objs.

 o prepare
 protected abstract void prepare()
Subclass implements this to init the attributes.


All Packages  Class Hierarchy  This Package  Previous  Next  Index