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

java.lang.Object
  extended by org.jscience.physics.electricity.circuitry.CircuitElement
      extended by org.jscience.physics.electricity.circuitry.elements.VoltageElement
Direct Known Subclasses:
ACVoltageElement, DCVoltageElement, RailElement

public class VoltageElement
extends CircuitElement

DOCUMENT ME!


Field Summary
 double bias
          DOCUMENT ME!
 int circleSize
          DOCUMENT ME!
static int FLAG_COS
          DOCUMENT ME!
 double freqTimeZero
          DOCUMENT ME!
 double frequency
          DOCUMENT ME!
 double maxVoltage
          DOCUMENT ME!
 int waveform
          DOCUMENT ME!
static int WF_AC
          DOCUMENT ME!
static int WF_DC
          DOCUMENT ME!
static int WF_PULSE
          DOCUMENT ME!
static int WF_SAWTOOTH
          DOCUMENT ME!
static int WF_SQUARE
          DOCUMENT ME!
static int WF_TRIANGLE
          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
VoltageElement(int xx, int yy, int wf)
          Creates a new VoltageElement object.
VoltageElement(int xa, int ya, int xb, int yb, int f, java.util.StringTokenizer st)
          Creates a new VoltageElement object.
 
Method Summary
 void doStep()
          DOCUMENT ME!
 void draw(java.awt.Graphics g)
          DOCUMENT ME!
 void drawWaveform(java.awt.Graphics g, int xc, int yc)
          DOCUMENT ME!
 java.lang.String dump()
          DOCUMENT ME!
 int getDumpType()
          DOCUMENT ME!
 EditInfo getEditInfo(int n)
          DOCUMENT ME!
 void getInfo(java.lang.String[] arr)
          DOCUMENT ME!
 double getPower()
          DOCUMENT ME!
 double getVoltage()
          DOCUMENT ME!
 double getVoltageDiff()
          DOCUMENT ME!
 int getVoltageSourceCount()
          DOCUMENT ME!
 void reset()
          DOCUMENT ME!
 void setEditValue(int n, EditInfo ei)
          DOCUMENT ME!
 void stamp()
          DOCUMENT ME!
 double triangleFunc(double x)
          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, getConnection, getCurrent, getDumpClass, getInternalNodeCount, getNode, getPost, getPostCount, getScopeUnits, getScopeValue, getVoltageSource, hasGroundConnection, isWire, move, movePoint, nonLinear, 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_COS

public static final int FLAG_COS
DOCUMENT ME!

See Also:
Constant Field Values

WF_DC

public static final int WF_DC
DOCUMENT ME!

See Also:
Constant Field Values

WF_AC

public static final int WF_AC
DOCUMENT ME!

See Also:
Constant Field Values

WF_SQUARE

public static final int WF_SQUARE
DOCUMENT ME!

See Also:
Constant Field Values

WF_TRIANGLE

public static final int WF_TRIANGLE
DOCUMENT ME!

See Also:
Constant Field Values

WF_SAWTOOTH

public static final int WF_SAWTOOTH
DOCUMENT ME!

See Also:
Constant Field Values

WF_PULSE

public static final int WF_PULSE
DOCUMENT ME!

See Also:
Constant Field Values

waveform

public int waveform
DOCUMENT ME!


frequency

public double frequency
DOCUMENT ME!


maxVoltage

public double maxVoltage
DOCUMENT ME!


freqTimeZero

public double freqTimeZero
DOCUMENT ME!


bias

public double bias
DOCUMENT ME!


circleSize

public final int circleSize
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

VoltageElement

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

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

VoltageElement

public VoltageElement(int xa,
                      int ya,
                      int xb,
                      int yb,
                      int f,
                      java.util.StringTokenizer st)
Creates a new VoltageElement 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!

dump

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

Overrides:
dump in class CircuitElement
Returns:
DOCUMENT ME!

reset

public void reset()
Description copied from class: CircuitElement
DOCUMENT ME!

Overrides:
reset in class CircuitElement

triangleFunc

public double triangleFunc(double x)
DOCUMENT ME!

Parameters:
x - DOCUMENT ME!
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

getVoltage

public double getVoltage()
DOCUMENT ME!

Returns:
DOCUMENT ME!

draw

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

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

drawWaveform

public void drawWaveform(java.awt.Graphics g,
                         int xc,
                         int yc)
DOCUMENT ME!

Parameters:
g - DOCUMENT ME!
xc - DOCUMENT ME!
yc - DOCUMENT ME!

getVoltageSourceCount

public int getVoltageSourceCount()
DOCUMENT ME!

Overrides:
getVoltageSourceCount in class CircuitElement
Returns:
DOCUMENT ME!

getPower

public double getPower()
DOCUMENT ME!

Overrides:
getPower in class CircuitElement
Returns:
DOCUMENT ME!

getVoltageDiff

public double getVoltageDiff()
DOCUMENT ME!

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

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!