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

java.lang.Object
  extended by org.jscience.physics.electricity.circuitry.CircuitElement
      extended by org.jscience.physics.electricity.circuitry.elements.GateElement
Direct Known Subclasses:
AndGateElement, OrGateElement

public abstract class GateElement
extends CircuitElement

DOCUMENT ME!


Field Summary
 int FLAG_SMALL
          DOCUMENT ME!
 int gheight
          DOCUMENT ME!
 int gsize
          DOCUMENT ME!
 int gwidth
          DOCUMENT ME!
 int gwidth2
          DOCUMENT ME!
 java.awt.Point[] inGates
          DOCUMENT ME!
 java.awt.Point[] inPosts
          DOCUMENT ME!
 int inputCount
          DOCUMENT ME!
 boolean lastOutput
          DOCUMENT ME!
 int[] linePointsX
          DOCUMENT ME!
 int[] linePointsY
          DOCUMENT ME!
 int outnx
          DOCUMENT ME!
 int outny
          DOCUMENT ME!
 int outpx
          DOCUMENT ME!
 int outpy
          DOCUMENT ME!
 int pcirclex
          DOCUMENT ME!
 int pcircley
          DOCUMENT ME!
 int[] triPointsX
          DOCUMENT ME!
 int[] triPointsY
          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
GateElement(int xx, int yy)
          Creates a new GateElement object.
GateElement(int xa, int ya, int xb, int yb, int f, java.util.StringTokenizer st)
          Creates a new GateElement object.
 
Method Summary
abstract  boolean calcFunction()
          DOCUMENT ME!
 void doStep()
          DOCUMENT ME!
 void draw(java.awt.Graphics g)
          DOCUMENT ME!
 java.lang.String dump()
          DOCUMENT ME!
 boolean getConnection(int n1, int n2)
          DOCUMENT ME!
 EditInfo getEditInfo(int n)
          DOCUMENT ME!
abstract  java.lang.String getGateName()
          DOCUMENT ME!
 void getInfo(java.lang.String[] arr)
          DOCUMENT ME!
 boolean getInput(int x)
          DOCUMENT ME!
 java.awt.Point getPost(int n)
          DOCUMENT ME!
 int getPostCount()
          DOCUMENT ME!
 int getVoltageSourceCount()
          DOCUMENT ME!
 boolean hasGroundConnection(int n1)
          DOCUMENT ME!
 boolean isInverting()
          DOCUMENT ME!
 void setEditValue(int n, EditInfo ei)
          DOCUMENT ME!
 void setSize(int s)
          DOCUMENT ME!
 void stamp()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.physics.electricity.circuitry.CircuitElement
adjustBbox, allocNodes, calculateCurrent, canViewInScope, doAdjust, doDots, drag, drawPost, drawPost, drawPosts, drawValues, getBasicInfo, getCircuitFrame, getCurrent, getDumpClass, getDumpType, getInternalNodeCount, getNode, getPower, getScopeUnits, getScopeValue, getVoltageDiff, getVoltageSource, isWire, move, movePoint, nonLinear, reset, setBbox, setCircuitFrame, setCurrent, setNode, setNodeVoltage, setPoints, setPowerColor, setPowerColor, setupAdjust, setVoltageColor, setVoltageSource, startIteration, updateDotCount, updateDotCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLAG_SMALL

public final int FLAG_SMALL
DOCUMENT ME!

See Also:
Constant Field Values

inputCount

public int inputCount
DOCUMENT ME!


lastOutput

public boolean lastOutput
DOCUMENT ME!


gsize

public int gsize
DOCUMENT ME!


gwidth

public int gwidth
DOCUMENT ME!


gwidth2

public int gwidth2
DOCUMENT ME!


gheight

public int gheight
DOCUMENT ME!


inPosts

public java.awt.Point[] inPosts
DOCUMENT ME!


inGates

public java.awt.Point[] inGates
DOCUMENT ME!


outpx

public int outpx
DOCUMENT ME!


outpy

public int outpy
DOCUMENT ME!


outnx

public int outnx
DOCUMENT ME!


outny

public int outny
DOCUMENT ME!


triPointsX

public int[] triPointsX
DOCUMENT ME!


triPointsY

public int[] triPointsY
DOCUMENT ME!


linePointsX

public int[] linePointsX
DOCUMENT ME!


linePointsY

public int[] linePointsY
DOCUMENT ME!


pcirclex

public int pcirclex
DOCUMENT ME!


pcircley

public int pcircley
DOCUMENT ME!

Constructor Detail

GateElement

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

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

GateElement

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

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

isInverting

public boolean isInverting()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setSize

public void setSize(int s)
DOCUMENT ME!

Parameters:
s - DOCUMENT ME!

dump

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

Overrides:
dump in class CircuitElement
Returns:
DOCUMENT ME!

draw

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

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

getPostCount

public int getPostCount()
DOCUMENT ME!

Overrides:
getPostCount in class CircuitElement
Returns:
DOCUMENT ME!

getPost

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

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

getVoltageSourceCount

public int getVoltageSourceCount()
DOCUMENT ME!

Overrides:
getVoltageSourceCount in class CircuitElement
Returns:
DOCUMENT ME!

getGateName

public abstract java.lang.String getGateName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getInfo

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

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

stamp

public void stamp()
DOCUMENT ME!

Overrides:
stamp in class CircuitElement

getInput

public boolean getInput(int x)
DOCUMENT ME!

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

calcFunction

public abstract boolean calcFunction()
DOCUMENT ME!

Returns:
DOCUMENT ME!

doStep

public void doStep()
DOCUMENT ME!

Overrides:
doStep in class CircuitElement

getEditInfo

public EditInfo getEditInfo(int n)
DOCUMENT ME!

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

setEditValue

public void setEditValue(int n,
                         EditInfo ei)
DOCUMENT ME!

Overrides:
setEditValue in class CircuitElement
Parameters:
n - DOCUMENT ME!
ei - 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!