org.jscience.physics.electricity.circuitry.elements
Class ChipElement

java.lang.Object
  extended by org.jscience.physics.electricity.circuitry.CircuitElement
      extended by org.jscience.physics.electricity.circuitry.elements.ChipElement
Direct Known Subclasses:
CounterElement, DFlipFlopElement, JKFlipFlopElement, JohnsonElement, PhaseCompElement, SevenSegElement, TimerElement, VCOElement

public abstract class ChipElement
extends CircuitElement

DOCUMENT ME!


Field Summary
 int bits
          DOCUMENT ME!
 int[] clockPointsX
          DOCUMENT ME!
 int[] clockPointsY
          DOCUMENT ME!
 int csize
          DOCUMENT ME!
 int cspc
          DOCUMENT ME!
 int cspc2
          DOCUMENT ME!
 int FLAG_SMALL
          DOCUMENT ME!
 boolean lastClock
          DOCUMENT ME!
 org.jscience.physics.electricity.circuitry.elements.ChipElement.Pin[] pins
          DOCUMENT ME!
 int[] rectPointsX
          DOCUMENT ME!
 int[] rectPointsY
          DOCUMENT ME!
 int SIDE_E
          DOCUMENT ME!
 int SIDE_N
          DOCUMENT ME!
 int SIDE_S
          DOCUMENT ME!
 int SIDE_W
          DOCUMENT ME!
 int sizeX
          DOCUMENT ME!
 int sizeY
          DOCUMENT ME!
 
Fields inherited from class org.jscience.physics.electricity.circuitry.CircuitElement
boundingBox, circuitFrame, curcount, current, flags, nodes, noDiagonal, volts, voltSource, x, x2, y, y2
 
Constructor Summary
ChipElement(int xx, int yy)
          Creates a new ChipElement object.
ChipElement(int xa, int ya, int xb, int yb, int f, java.util.StringTokenizer st)
          Creates a new ChipElement object.
 
Method Summary
 void doStep()
          DOCUMENT ME!
 void drag(int xx, int yy)
          DOCUMENT ME!
 void draw(java.awt.Graphics g)
          DOCUMENT ME!
 void drawChip(java.awt.Graphics g)
          DOCUMENT ME!
 java.lang.String dump()
          DOCUMENT ME!
 void execute()
          DOCUMENT ME!
 java.lang.String getChipName()
          DOCUMENT ME!
 boolean getConnection(int n1, int n2)
          DOCUMENT ME!
 void getInfo(java.lang.String[] arr)
          DOCUMENT ME!
 java.awt.Point getPost(int n)
          DOCUMENT ME!
abstract  int getVoltageSourceCount()
          DOCUMENT ME!
 boolean hasGroundConnection(int n1)
          DOCUMENT ME!
 boolean needsBits()
          DOCUMENT ME!
 void reset()
          DOCUMENT ME!
 void setCurrent(int x, double c)
          DOCUMENT ME!
 void setPoints()
          DOCUMENT ME!
 void setSize(int s)
          DOCUMENT ME!
abstract  void setupPins()
          DOCUMENT ME!
 void setVoltageSource(int j, int vs)
          DOCUMENT ME!
 void stamp()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.physics.electricity.circuitry.CircuitElement
adjustBbox, allocNodes, calculateCurrent, canViewInScope, doAdjust, doDots, drawPost, drawPost, drawPosts, drawValues, getBasicInfo, getCircuitFrame, getCurrent, getDumpClass, getDumpType, getEditInfo, getInternalNodeCount, getNode, getPostCount, getPower, getScopeUnits, getScopeValue, getVoltageDiff, getVoltageSource, isWire, move, movePoint, nonLinear, setBbox, setCircuitFrame, setEditValue, setNode, setNodeVoltage, setPowerColor, setPowerColor, setupAdjust, setVoltageColor, startIteration, updateDotCount, updateDotCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

csize

public int csize
DOCUMENT ME!


cspc

public int cspc
DOCUMENT ME!


cspc2

public int cspc2
DOCUMENT ME!


bits

public int bits
DOCUMENT ME!


FLAG_SMALL

public final int FLAG_SMALL
DOCUMENT ME!

See Also:
Constant Field Values

rectPointsX

public int[] rectPointsX
DOCUMENT ME!


rectPointsY

public int[] rectPointsY
DOCUMENT ME!


clockPointsX

public int[] clockPointsX
DOCUMENT ME!


clockPointsY

public int[] clockPointsY
DOCUMENT ME!


pins

public org.jscience.physics.electricity.circuitry.elements.ChipElement.Pin[] pins
DOCUMENT ME!


sizeX

public int sizeX
DOCUMENT ME!


sizeY

public int sizeY
DOCUMENT ME!


lastClock

public boolean lastClock
DOCUMENT ME!


SIDE_N

public final int SIDE_N
DOCUMENT ME!

See Also:
Constant Field Values

SIDE_S

public final int SIDE_S
DOCUMENT ME!

See Also:
Constant Field Values

SIDE_W

public final int SIDE_W
DOCUMENT ME!

See Also:
Constant Field Values

SIDE_E

public final int SIDE_E
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

ChipElement

public ChipElement(int xx,
                   int yy)
Creates a new ChipElement object.

Parameters:
xx - DOCUMENT ME!
yy - DOCUMENT ME!

ChipElement

public ChipElement(int xa,
                   int ya,
                   int xb,
                   int yb,
                   int f,
                   java.util.StringTokenizer st)
Creates a new ChipElement object.

Parameters:
xa - DOCUMENT ME!
ya - DOCUMENT ME!
xb - DOCUMENT ME!
yb - DOCUMENT ME!
f - DOCUMENT ME!
st - DOCUMENT ME!
Method Detail

needsBits

public boolean needsBits()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setSize

public void setSize(int s)
DOCUMENT ME!

Parameters:
s - DOCUMENT ME!

setupPins

public abstract void setupPins()
DOCUMENT ME!


draw

public void draw(java.awt.Graphics g)
DOCUMENT ME!

Specified by:
draw in class CircuitElement
Parameters:
g - DOCUMENT ME!

drawChip

public void drawChip(java.awt.Graphics g)
DOCUMENT ME!

Parameters:
g - DOCUMENT ME!

drag

public void drag(int xx,
                 int yy)
DOCUMENT ME!

Overrides:
drag in class CircuitElement
Parameters:
xx - DOCUMENT ME!
yy - DOCUMENT ME!

setPoints

public void setPoints()
DOCUMENT ME!

Overrides:
setPoints in class CircuitElement

getPost

public java.awt.Point getPost(int n)
DOCUMENT ME!

Overrides:
getPost in class CircuitElement
Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!

getVoltageSourceCount

public abstract int getVoltageSourceCount()
DOCUMENT ME!

Overrides:
getVoltageSourceCount in class CircuitElement
Returns:
DOCUMENT ME!

setVoltageSource

public void setVoltageSource(int j,
                             int vs)
DOCUMENT ME!

Overrides:
setVoltageSource in class CircuitElement
Parameters:
j - DOCUMENT ME!
vs - DOCUMENT ME!

stamp

public void stamp()
DOCUMENT ME!

Overrides:
stamp in class CircuitElement

execute

public void execute()
DOCUMENT ME!


doStep

public void doStep()
DOCUMENT ME!

Overrides:
doStep in class CircuitElement

reset

public void reset()
DOCUMENT ME!

Overrides:
reset in class CircuitElement

dump

public java.lang.String dump()
DOCUMENT ME!

Overrides:
dump in class CircuitElement
Returns:
DOCUMENT ME!

getInfo

public void getInfo(java.lang.String[] arr)
DOCUMENT ME!

Overrides:
getInfo in class CircuitElement
Parameters:
arr - DOCUMENT ME!

setCurrent

public void setCurrent(int x,
                       double c)
DOCUMENT ME!

Overrides:
setCurrent in class CircuitElement
Parameters:
x - DOCUMENT ME!
c - DOCUMENT ME!

getChipName

public java.lang.String getChipName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getConnection

public boolean getConnection(int n1,
                             int n2)
DOCUMENT ME!

Overrides:
getConnection in class CircuitElement
Parameters:
n1 - DOCUMENT ME!
n2 - DOCUMENT ME!
Returns:
DOCUMENT ME!

hasGroundConnection

public boolean hasGroundConnection(int n1)
DOCUMENT ME!

Overrides:
hasGroundConnection in class CircuitElement
Parameters:
n1 - DOCUMENT ME!
Returns:
DOCUMENT ME!