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

java.lang.Object
  extended by org.jscience.physics.electricity.circuitry.CircuitElement
      extended by org.jscience.physics.electricity.circuitry.elements.SwitchElement
          extended by org.jscience.physics.electricity.circuitry.elements.Switch2Element

public class Switch2Element
extends SwitchElement

DOCUMENT ME!


Field Summary
 int link
          DOCUMENT ME!
 int spxa
          DOCUMENT ME!
 int spxb
          DOCUMENT ME!
 int spya
          DOCUMENT ME!
 int spyb
          DOCUMENT ME!
 int x3a
          DOCUMENT ME!
 int x3b
          DOCUMENT ME!
 int y3a
          DOCUMENT ME!
 int y3b
          DOCUMENT ME!
 
Fields inherited from class org.jscience.physics.electricity.circuitry.elements.SwitchElement
momentary, open, switchx1, switchx2, switchy1, switchy2
 
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
Switch2Element(int xx, int yy)
          Creates a new Switch2Element object.
Switch2Element(int xx, int yy, boolean mm)
          Creates a new Switch2Element object.
Switch2Element(int xa, int ya, int xb, int yb, int f, java.util.StringTokenizer st)
          Creates a new Switch2Element object.
 
Method Summary
 void calculateCurrent()
          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, double v3, boolean open)
          DOCUMENT ME!
 java.lang.String dump()
          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!
 int getVoltageSourceCount()
          DOCUMENT ME!
 void setPoints()
          DOCUMENT ME!
 void stamp()
          DOCUMENT ME!
 void toggle()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.physics.electricity.circuitry.elements.SwitchElement
drawSwitch, getEditInfo, isWire, mouseUp, setEditValue
 
Methods inherited from class org.jscience.physics.electricity.circuitry.CircuitElement
adjustBbox, allocNodes, canViewInScope, doAdjust, doDots, doStep, drag, drawPost, drawPost, drawPosts, drawValues, getBasicInfo, getCircuitFrame, getCurrent, getDumpClass, getInternalNodeCount, getNode, getPower, getScopeUnits, getScopeValue, getVoltageDiff, getVoltageSource, hasGroundConnection, move, movePoint, nonLinear, reset, setBbox, setCircuitFrame, setCurrent, 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

link

public int link
DOCUMENT ME!


x3a

public int x3a
DOCUMENT ME!


y3a

public int y3a
DOCUMENT ME!


x3b

public int x3b
DOCUMENT ME!


y3b

public int y3b
DOCUMENT ME!


spxa

public int spxa
DOCUMENT ME!


spya

public int spya
DOCUMENT ME!


spxb

public int spxb
DOCUMENT ME!


spyb

public int spyb
DOCUMENT ME!

Constructor Detail

Switch2Element

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

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

Switch2Element

public Switch2Element(int xx,
                      int yy,
                      boolean mm)
Creates a new Switch2Element object.

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

Switch2Element

public Switch2Element(int xa,
                      int ya,
                      int xb,
                      int yb,
                      int f,
                      java.util.StringTokenizer st)
Creates a new Switch2Element 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 SwitchElement
Returns:
DOCUMENT ME!

dump

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

Overrides:
dump in class SwitchElement
Returns:
DOCUMENT ME!

draw

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

Overrides:
draw in class SwitchElement
Parameters:
g - DOCUMENT ME!

getPost

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

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

getPostCount

public int getPostCount()
DOCUMENT ME!

Overrides:
getPostCount in class CircuitElement
Returns:
DOCUMENT ME!

setPoints

public void setPoints()
DOCUMENT ME!

Overrides:
setPoints in class CircuitElement

calculateCurrent

public void calculateCurrent()
DOCUMENT ME!

Overrides:
calculateCurrent in class SwitchElement

stamp

public void stamp()
DOCUMENT ME!

Overrides:
stamp in class SwitchElement

getVoltageSourceCount

public int getVoltageSourceCount()
DOCUMENT ME!

Overrides:
getVoltageSourceCount in class SwitchElement
Returns:
DOCUMENT ME!

drawSwitch

public void drawSwitch(java.awt.Graphics g,
                       int x1,
                       int y1,
                       int x2,
                       int y2,
                       double v1,
                       double v2,
                       double v3,
                       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!
v3 - DOCUMENT ME!
open - DOCUMENT ME!

toggle

public void toggle()
DOCUMENT ME!

Overrides:
toggle in class SwitchElement

getConnection

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

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

getInfo

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

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