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
-
Symbol()
- Constructor is used in subclass only.
-
getBounds()
- Returns the bounding rectangle of this symbol.
-
getLocation()
- Gets the upper-left corner position of bounding rectangle
of this symbol.
-
getSize()
- Returns the size of the bounding rectangle.
-
initNodes()
- Subclass implements this to init the Node objects.
-
initWires()
- Subclass implements this to init Wire objs.
-
prepare()
- Subclass implements this to init the attributes.
-
setLocation(int, int)
- Sets the upper-left corner of bounding rectangle
of this symbol.
-
setLocation2(int, int)
- Sets the upper-left corner of bounding rectangle
of this symbol.
-
setNode(int, Node)
- Sets one the nodes to a new Node obj.
-
setNodes(Node[])
- Sets new Node number objects associated to this symbol.
-
setSize(int, int)
- Sets a new size for the bounding rectangle of this symbol.
-
setSize2(int, int)
- Sets a new size for the bounding rectangle of this symbol.
-
setWires(Wire[])
- Sets the wire obj's associated to this symbol.
Symbol
protected Symbol()
- Constructor is used in subclass only.
getBounds
public Rectangle getBounds()
- Returns the bounding rectangle of this symbol.
setNodes
public void setNodes(Node node[])
- Sets new Node number objects associated to this symbol.
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.
setWires
public void setWires(Wire w[])
- Sets the wire obj's associated to this symbol.
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.
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.
getSize
public Dimension getSize()
- Returns the size of the bounding rectangle.
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.
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.
getLocation
public Point getLocation()
- Gets the upper-left corner position of bounding rectangle
of this symbol.
initNodes
protected abstract void initNodes()
- Subclass implements this to init the Node objects.
initWires
protected abstract void initWires()
- Subclass implements this to init Wire objs.
prepare
protected abstract void prepare()
- Subclass implements this to init the attributes.
All Packages Class Hierarchy This Package Previous Next Index