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

java.lang.Object
  extended by org.jscience.physics.electricity.circuitry.CircuitElement
      extended by org.jscience.physics.electricity.circuitry.elements.AnalogSwitchElement
Direct Known Subclasses:
AnalogSwitch2Element

public class AnalogSwitchElement
extends CircuitElement

DOCUMENT ME!


Field Summary
 boolean open
          DOCUMENT ME!
 double resistance
          DOCUMENT ME!
 int x3
          DOCUMENT ME!
 int x3a
          DOCUMENT ME!
 int y3
          DOCUMENT ME!
 int y3a
          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
AnalogSwitchElement(int xx, int yy)
          Creates a new AnalogSwitchElement object.
AnalogSwitchElement(int xa, int ya, int xb, int yb, int f, java.util.StringTokenizer st)
          Creates a new AnalogSwitchElement object.
 
Method Summary
 void calculateCurrent()
          DOCUMENT ME!
 void doStep()
          DOCUMENT ME!
 void drag(int xx, int yy)
          DOCUMENT ME!
 void draw(java.awt.Graphics g)
          DOCUMENT ME!
 void drawSwitch(java.awt.Graphics g, int x1, int y1, int x2, int y2, double v1, double v2, boolean open)
          DOCUMENT ME!
 boolean getConnection(int n1, int n2)
          DOCUMENT ME!
 int getDumpType()
          DOCUMENT ME!
 void getInfo(java.lang.String[] arr)
          DOCUMENT ME!
 java.awt.Point getPost(int n)
          DOCUMENT ME!
 int getPostCount()
          DOCUMENT ME!
 boolean nonLinear()
          DOCUMENT ME!
 void setPoints()
          DOCUMENT ME!
 void stamp()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.physics.electricity.circuitry.CircuitElement
adjustBbox, allocNodes, canViewInScope, doAdjust, doDots, drawPost, drawPost, drawPosts, drawValues, dump, getBasicInfo, getCircuitFrame, getCurrent, getDumpClass, getEditInfo, getInternalNodeCount, getNode, getPower, getScopeUnits, getScopeValue, getVoltageDiff, getVoltageSource, getVoltageSourceCount, hasGroundConnection, isWire, move, movePoint, reset, setBbox, setCircuitFrame, setCurrent, setEditValue, setNode, setNodeVoltage, 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

x3

public int x3
DOCUMENT ME!


y3

public int y3
DOCUMENT ME!


x3a

public int x3a
DOCUMENT ME!


y3a

public int y3a
DOCUMENT ME!


open

public boolean open
DOCUMENT ME!


resistance

public final double resistance
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

AnalogSwitchElement

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

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

AnalogSwitchElement

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

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

getDumpType

public int getDumpType()
DOCUMENT ME!

Overrides:
getDumpType 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!

calculateCurrent

public void calculateCurrent()
DOCUMENT ME!

Overrides:
calculateCurrent in class CircuitElement

nonLinear

public boolean nonLinear()
DOCUMENT ME!

Overrides:
nonLinear in class CircuitElement
Returns:
DOCUMENT ME!

stamp

public void stamp()
DOCUMENT ME!

Overrides:
stamp in class CircuitElement

doStep

public void doStep()
DOCUMENT ME!

Overrides:
doStep in class CircuitElement

drawSwitch

public void drawSwitch(java.awt.Graphics g,
                       int x1,
                       int y1,
                       int x2,
                       int y2,
                       double v1,
                       double v2,
                       boolean open)
DOCUMENT ME!

Parameters:
g - DOCUMENT ME!
x1 - DOCUMENT ME!
y1 - DOCUMENT ME!
x2 - DOCUMENT ME!
y2 - DOCUMENT ME!
v1 - DOCUMENT ME!
v2 - DOCUMENT ME!
open - DOCUMENT ME!

setPoints

public void setPoints()
DOCUMENT ME!

Overrides:
setPoints in class CircuitElement

drag

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

Overrides:
drag in class CircuitElement
Parameters:
xx - DOCUMENT ME!
yy - 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!

getInfo

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

Overrides:
getInfo in class CircuitElement
Parameters:
arr - 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!