org.jscience.physics.electricity.circuitry.gui
Class CircuitFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by org.jscience.physics.electricity.circuitry.gui.CircuitFrame
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ComponentListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class CircuitFrame
extends java.awt.Frame
implements java.awt.event.ComponentListener, java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.MouseMotionListener, java.awt.event.MouseListener, java.awt.event.ItemListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 java.lang.Class addingClass
           
 boolean analyzeFlag
           
 java.awt.Rectangle circuitArea
           
 double[][] circuitMatrix
           
 int circuitMatrixFullSize
           
 int circuitMatrixSize
           
 boolean circuitNonLinear
           
 int[] circuitPermute
           
 double[] circuitRightSide
           
 RowInfo[] circuitRowInfo
           
 java.awt.Color[] colorScale
           
 int colorScaleCount
           
 boolean converged
           
 java.awt.Scrollbar currentBar
           
 double currentMult
           
 java.awt.Image dbimage
           
 java.awt.CheckboxMenuItem dotsCheckItem
           
 CircuitElement dragElement
           
 boolean dragging
           
 int draggingPost
           
 int dragX
           
 int dragY
           
 boolean dumpMatrix
           
 java.lang.Class[] dumpTypes
           
 EditDialog editDialog
           
 java.awt.MenuItem elmDeleteMenuItem
           
 java.awt.MenuItem elmEditMenuItem
           
 java.util.Vector elmList
           
 java.awt.PopupMenu elmMenu
           
 java.awt.MenuItem elmScopeMenuItem
           
 java.lang.Thread engine
           
 java.awt.CheckboxMenuItem euroResistorCheckItem
           
 java.awt.MenuItem exitItem
           
 java.awt.MenuItem exportItem
           
static double freqMult
           
 int gridMask
           
 int gridRound
           
 int gridSize
           
 SwitchElement heldSwitchElement
           
static int HINT_3DB_C
           
static int HINT_3DB_L
           
static int HINT_LC
           
static int HINT_RC
           
static int HINT_TWINT
           
 int hintItem1
           
 int hintItem2
           
 int hintType
           
 ImportDialog impDialog
           
 java.awt.MenuItem importItem
           
static int infoWidth
           
 java.awt.Container main
           
 java.awt.PopupMenu mainMenu
           
 CircuitElement menuElement
           
 int menuScope
           
static int MODE_ADD_ELM
           
static int MODE_DRAG_ALL
           
static int MODE_DRAG_COLUMN
           
static int MODE_DRAG_POST
           
static int MODE_DRAG_ROW
           
static int MODE_DRAG_SELECTED
           
 CircuitElement mouseElement
           
 int mouseMode
           
 java.lang.String mouseModeStr
           
 java.lang.String muString
           
 java.text.NumberFormat noCommaFormat
           
 java.util.Vector nodeList
           
 java.lang.String ohmString
           
 java.awt.Menu optionsMenu
           
 double[][] origMatrix
           
 double[] origRightSide
           
 int pause
           
static double pi
           
 java.awt.Scrollbar powerBar
           
 java.awt.CheckboxMenuItem powerCheckItem
           
 java.awt.Label powerLabel
           
 double powerMult
           
 java.util.Random random
           
 java.awt.Button resetButton
           
 int[] scopeColCount
           
 int scopeCount
           
 java.awt.CheckboxMenuItem scopeFreqMenuItem
           
 java.awt.CheckboxMenuItem scopeIbMenuItem
           
 java.awt.CheckboxMenuItem scopeIcMenuItem
           
 java.awt.CheckboxMenuItem scopeIeMenuItem
           
 java.awt.CheckboxMenuItem scopeIMenuItem
           
 java.awt.CheckboxMenuItem scopeMaxMenuItem
           
 java.awt.PopupMenu scopeMenu
           
 java.awt.CheckboxMenuItem scopePowerMenuItem
           
 Scope[] scopes
           
 int scopeSelected
           
 java.awt.CheckboxMenuItem scopeVbcMenuItem
           
 java.awt.CheckboxMenuItem scopeVbeMenuItem
           
 java.awt.CheckboxMenuItem scopeVceMenuItem
           
 java.awt.CheckboxMenuItem scopeVMenuItem
           
 int selectedSource
           
 java.util.Vector setupList
           
 java.text.NumberFormat shortFormat
           
 java.text.NumberFormat showFormat
           
 java.awt.CheckboxMenuItem showValuesCheckItem
           
 java.awt.CheckboxMenuItem smallGridCheckItem
           
static int sourceRadius
           
 java.awt.Scrollbar speedBar
           
 CircuitElement stopElement
           
 java.lang.String stopMessage
           
 java.awt.Checkbox stoppedCheck
           
 double t
           
 double timeStep
           
 java.awt.Label titleLabel
           
 java.awt.PopupMenu transScopeMenu
           
 java.awt.Font unitsFont
           
 boolean useFrame
           
 double voltageRange
           
 int voltageSourceCount
           
 java.awt.CheckboxMenuItem voltsCheckItem
           
 java.awt.Dimension winSize
           
 int[] xpoints
           
 int[] ypoints
           
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CircuitFrame(CircuitApplet a)
           
 
Method Summary
 int abs(int x)
           
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
           
 void analyzeCircuit()
           
 java.awt.PopupMenu buildScopeMenu(boolean t)
           
 void centerString(java.awt.Graphics g, java.lang.String s, int y)
           
 boolean comparePair(int x1, int x2, int y1, int y2)
           
 void componentHidden(java.awt.event.ComponentEvent e)
           
 void componentMoved(java.awt.event.ComponentEvent e)
           
 void componentResized(java.awt.event.ComponentEvent e)
           
 void componentShown(java.awt.event.ComponentEvent e)
           
 CircuitElement constructElement(java.lang.Class c, int x0, int y0)
           
 void deleteElement(CircuitElement elm)
           
 int distanceSq(int x1, int y1, int x2, int y2)
           
 void doEdit()
           
 void doImport(boolean imp)
           
 void doMainMenuChecks(java.awt.Menu m)
           
 void doPopupMenu(java.awt.event.MouseEvent e)
           
 boolean doSwitch(int x, int y)
           
 void dragAll(int x, int y)
           
 void dragColumn(int x, int y)
           
 void dragItem(int x, int y)
           
 void dragPost(int x, int y)
           
 void dragRow(int x, int y)
           
 void drawDots(java.awt.Graphics g, int x1, int y1, int x2, int y2, double pos)
           
 void drawThickCircle(java.awt.Graphics g, int cx, int cy, int ri)
           
 void drawThickLine(java.awt.Graphics g, int x, int y, int x2, int y2)
           
 void drawThickPolygon(java.awt.Graphics g, int[] xs, int[] ys, int c)
           
 void editFuncPoint(int x, int y)
           
 void enableItems()
           
 java.lang.String getAppletInfo()
           
 java.awt.CheckboxMenuItem getCheckItem(java.lang.String s)
           
 java.awt.CheckboxMenuItem getCheckItem(java.lang.String s, java.lang.String t)
           
 CircuitNode getCircuitNode(int n)
           
 java.awt.CheckboxMenuItem getClassCheckItem(java.lang.String s, java.lang.String t)
           
 java.lang.String getCurrentDText(double i)
           
 java.lang.String getCurrentText(double i)
           
 CircuitElement getElement(int n)
           
 java.lang.String getHint()
           
 double getIterCount()
           
 java.awt.MenuItem getMenuItem(java.lang.String s)
           
 java.awt.MenuItem getMenuItem(java.lang.String s, java.lang.String ac)
           
 int getrand(int x)
           
 void getSetupList(java.awt.Menu menu)
           
 java.lang.String getShortUnitText(double v, java.lang.String u)
           
 java.lang.String getUnitText(double v, java.lang.String u)
           
 java.lang.String getVoltageDText(double v)
           
 java.lang.String getVoltageText(double v)
           
 boolean handleEvent(java.awt.Event ev)
           
 void handleResize()
           
 void init()
           
 void itemStateChanged(java.awt.event.ItemEvent e)
           
 int locateElement(CircuitElement elm)
           
 int max(int a, int b)
           
 int min(int a, int b)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void needAnalyze()
           
 void paint(java.awt.Graphics g)
           
 void readHint(java.util.StringTokenizer st)
           
 void readOptions(java.util.StringTokenizer st)
           
 void readSetup(byte[] b, int len)
           
 void readSetup(java.lang.String text)
           
 void readSetupFile(java.lang.String str, java.lang.String title)
           
 java.io.ByteArrayOutputStream readUrlData(java.net.URL url)
           
 void register(java.lang.Class c, CircuitElement elm)
           
 void removeZeroLengthElements()
           
 void runCircuit()
           
 void setGrid()
           
 void setupScopes()
           
 int sign(int x)
           
 int snapGrid(int x)
           
 void stackAll()
           
 void stackScope(int s)
           
 void stampConductance(int n1, int n2, double r0)
           
 void stampCurrentSource(int n1, int n2, double i)
           
 void stampMatrix(int i, int j, double x)
           
 void stampNonLinear(int i)
           
 void stampResistor(int n1, int n2, double r)
           
 void stampRightSide(int i)
           
 void stampRightSide(int i, double x)
           
 void stampVCCurrentSource(int cn1, int cn2, int vn1, int vn2, double g)
           
 void stampVoltageSource(int n1, int n2, int vs)
           
 void stampVoltageSource(int n1, int n2, int vs, double v)
           
 void stop(java.lang.String s, CircuitElement ce)
           
 void toggleSwitch(int n)
           
 void unstackAll()
           
 void unstackScope(int s)
           
 void updateCircuit(java.awt.Graphics realg)
           
 void updateVoltageSource(int n1, int n2, int vs, double v)
           
 
Methods inherited from class java.awt.Frame
addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

engine

public java.lang.Thread engine

winSize

public java.awt.Dimension winSize

dbimage

public java.awt.Image dbimage

random

public java.util.Random random

sourceRadius

public static final int sourceRadius
See Also:
Constant Field Values

freqMult

public static final double freqMult
See Also:
Constant Field Values

main

public java.awt.Container main

titleLabel

public java.awt.Label titleLabel

resetButton

public java.awt.Button resetButton

exportItem

public java.awt.MenuItem exportItem

importItem

public java.awt.MenuItem importItem

exitItem

public java.awt.MenuItem exitItem

optionsMenu

public java.awt.Menu optionsMenu

stoppedCheck

public java.awt.Checkbox stoppedCheck

dotsCheckItem

public java.awt.CheckboxMenuItem dotsCheckItem

voltsCheckItem

public java.awt.CheckboxMenuItem voltsCheckItem

powerCheckItem

public java.awt.CheckboxMenuItem powerCheckItem

smallGridCheckItem

public java.awt.CheckboxMenuItem smallGridCheckItem

showValuesCheckItem

public java.awt.CheckboxMenuItem showValuesCheckItem

euroResistorCheckItem

public java.awt.CheckboxMenuItem euroResistorCheckItem

speedBar

public java.awt.Scrollbar speedBar

currentBar

public java.awt.Scrollbar currentBar

powerLabel

public java.awt.Label powerLabel

powerBar

public java.awt.Scrollbar powerBar

currentMult

public double currentMult

powerMult

public double powerMult

elmMenu

public java.awt.PopupMenu elmMenu

elmEditMenuItem

public java.awt.MenuItem elmEditMenuItem

elmDeleteMenuItem

public java.awt.MenuItem elmDeleteMenuItem

elmScopeMenuItem

public java.awt.MenuItem elmScopeMenuItem

scopeMenu

public java.awt.PopupMenu scopeMenu

transScopeMenu

public java.awt.PopupMenu transScopeMenu

mainMenu

public java.awt.PopupMenu mainMenu

scopeVMenuItem

public java.awt.CheckboxMenuItem scopeVMenuItem

scopeIMenuItem

public java.awt.CheckboxMenuItem scopeIMenuItem

scopeMaxMenuItem

public java.awt.CheckboxMenuItem scopeMaxMenuItem

scopeFreqMenuItem

public java.awt.CheckboxMenuItem scopeFreqMenuItem

scopePowerMenuItem

public java.awt.CheckboxMenuItem scopePowerMenuItem

scopeIbMenuItem

public java.awt.CheckboxMenuItem scopeIbMenuItem

scopeIcMenuItem

public java.awt.CheckboxMenuItem scopeIcMenuItem

scopeIeMenuItem

public java.awt.CheckboxMenuItem scopeIeMenuItem

scopeVbeMenuItem

public java.awt.CheckboxMenuItem scopeVbeMenuItem

scopeVbcMenuItem

public java.awt.CheckboxMenuItem scopeVbcMenuItem

scopeVceMenuItem

public java.awt.CheckboxMenuItem scopeVceMenuItem

addingClass

public java.lang.Class addingClass

mouseMode

public int mouseMode

mouseModeStr

public java.lang.String mouseModeStr

unitsFont

public java.awt.Font unitsFont

pi

public static final double pi
See Also:
Constant Field Values

MODE_ADD_ELM

public static final int MODE_ADD_ELM
See Also:
Constant Field Values

MODE_DRAG_ALL

public static final int MODE_DRAG_ALL
See Also:
Constant Field Values

MODE_DRAG_ROW

public static final int MODE_DRAG_ROW
See Also:
Constant Field Values

MODE_DRAG_COLUMN

public static final int MODE_DRAG_COLUMN
See Also:
Constant Field Values

MODE_DRAG_SELECTED

public static final int MODE_DRAG_SELECTED
See Also:
Constant Field Values

MODE_DRAG_POST

public static final int MODE_DRAG_POST
See Also:
Constant Field Values

infoWidth

public static final int infoWidth
See Also:
Constant Field Values

dragX

public int dragX

dragY

public int dragY

selectedSource

public int selectedSource

gridSize

public int gridSize

gridMask

public int gridMask

gridRound

public int gridRound

dragging

public boolean dragging

analyzeFlag

public boolean analyzeFlag

dumpMatrix

public boolean dumpMatrix

t

public double t

pause

public int pause

xpoints

public int[] xpoints

ypoints

public int[] ypoints

colorScaleCount

public int colorScaleCount

colorScale

public java.awt.Color[] colorScale

scopeSelected

public int scopeSelected

menuScope

public int menuScope

hintType

public int hintType

hintItem1

public int hintItem1

hintItem2

public int hintItem2

stopMessage

public java.lang.String stopMessage

timeStep

public double timeStep

HINT_LC

public static final int HINT_LC
See Also:
Constant Field Values

HINT_RC

public static final int HINT_RC
See Also:
Constant Field Values

HINT_3DB_C

public static final int HINT_3DB_C
See Also:
Constant Field Values

HINT_TWINT

public static final int HINT_TWINT
See Also:
Constant Field Values

HINT_3DB_L

public static final int HINT_3DB_L
See Also:
Constant Field Values

elmList

public java.util.Vector elmList

setupList

public java.util.Vector setupList

dragElement

public CircuitElement dragElement

menuElement

public CircuitElement menuElement

mouseElement

public CircuitElement mouseElement

stopElement

public CircuitElement stopElement

draggingPost

public int draggingPost

heldSwitchElement

public SwitchElement heldSwitchElement

circuitMatrix

public double[][] circuitMatrix

circuitRightSide

public double[] circuitRightSide

origRightSide

public double[] origRightSide

origMatrix

public double[][] origMatrix

circuitRowInfo

public RowInfo[] circuitRowInfo

circuitPermute

public int[] circuitPermute

circuitNonLinear

public boolean circuitNonLinear

voltageSourceCount

public int voltageSourceCount

voltageRange

public double voltageRange

circuitMatrixSize

public int circuitMatrixSize

circuitMatrixFullSize

public int circuitMatrixFullSize

useFrame

public boolean useFrame

scopeCount

public int scopeCount

scopes

public Scope[] scopes

scopeColCount

public int[] scopeColCount

editDialog

public EditDialog editDialog

impDialog

public ImportDialog impDialog

dumpTypes

public java.lang.Class[] dumpTypes

muString

public java.lang.String muString

ohmString

public java.lang.String ohmString

circuitArea

public java.awt.Rectangle circuitArea

showFormat

public java.text.NumberFormat showFormat

shortFormat

public java.text.NumberFormat shortFormat

noCommaFormat

public java.text.NumberFormat noCommaFormat

nodeList

public java.util.Vector nodeList

converged

public boolean converged
Constructor Detail

CircuitFrame

public CircuitFrame(CircuitApplet a)
Method Detail

getAppletInfo

public java.lang.String getAppletInfo()

getrand

public int getrand(int x)

init

public void init()

buildScopeMenu

public java.awt.PopupMenu buildScopeMenu(boolean t)

getMenuItem

public java.awt.MenuItem getMenuItem(java.lang.String s)

getMenuItem

public java.awt.MenuItem getMenuItem(java.lang.String s,
                                     java.lang.String ac)

getCheckItem

public java.awt.CheckboxMenuItem getCheckItem(java.lang.String s)

getClassCheckItem

public java.awt.CheckboxMenuItem getClassCheckItem(java.lang.String s,
                                                   java.lang.String t)

getCheckItem

public java.awt.CheckboxMenuItem getCheckItem(java.lang.String s,
                                              java.lang.String t)

register

public void register(java.lang.Class c,
                     CircuitElement elm)

handleResize

public void handleResize()

handleEvent

public boolean handleEvent(java.awt.Event ev)
Overrides:
handleEvent in class java.awt.Component

centerString

public void centerString(java.awt.Graphics g,
                         java.lang.String s,
                         int y)

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Container

updateCircuit

public void updateCircuit(java.awt.Graphics realg)

setupScopes

public void setupScopes()

getHint

public java.lang.String getHint()

toggleSwitch

public void toggleSwitch(int n)

needAnalyze

public void needAnalyze()

drawDots

public void drawDots(java.awt.Graphics g,
                     int x1,
                     int y1,
                     int x2,
                     int y2,
                     double pos)

getCircuitNode

public CircuitNode getCircuitNode(int n)

getElement

public CircuitElement getElement(int n)

analyzeCircuit

public void analyzeCircuit()

stop

public void stop(java.lang.String s,
                 CircuitElement ce)

stampVoltageSource

public void stampVoltageSource(int n1,
                               int n2,
                               int vs,
                               double v)

stampVoltageSource

public void stampVoltageSource(int n1,
                               int n2,
                               int vs)

updateVoltageSource

public void updateVoltageSource(int n1,
                                int n2,
                                int vs,
                                double v)

stampResistor

public void stampResistor(int n1,
                          int n2,
                          double r)

stampConductance

public void stampConductance(int n1,
                             int n2,
                             double r0)

stampVCCurrentSource

public void stampVCCurrentSource(int cn1,
                                 int cn2,
                                 int vn1,
                                 int vn2,
                                 double g)

stampCurrentSource

public void stampCurrentSource(int n1,
                               int n2,
                               double i)

stampMatrix

public void stampMatrix(int i,
                        int j,
                        double x)

stampRightSide

public void stampRightSide(int i,
                           double x)

stampRightSide

public void stampRightSide(int i)

stampNonLinear

public void stampNonLinear(int i)

getIterCount

public double getIterCount()

runCircuit

public void runCircuit()

abs

public int abs(int x)

sign

public int sign(int x)

min

public int min(int a,
               int b)

max

public int max(int a,
               int b)

editFuncPoint

public void editFuncPoint(int x,
                          int y)

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Specified by:
componentShown in interface java.awt.event.ComponentListener

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Specified by:
componentResized in interface java.awt.event.ComponentListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

stackScope

public void stackScope(int s)

unstackScope

public void unstackScope(int s)

stackAll

public void stackAll()

unstackAll

public void unstackAll()

doEdit

public void doEdit()

doImport

public void doImport(boolean imp)

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener

readUrlData

public java.io.ByteArrayOutputStream readUrlData(java.net.URL url)
                                          throws java.io.IOException
Throws:
java.io.IOException

getSetupList

public void getSetupList(java.awt.Menu menu)

readSetup

public void readSetup(java.lang.String text)

readSetupFile

public void readSetupFile(java.lang.String str,
                          java.lang.String title)

readSetup

public void readSetup(byte[] b,
                      int len)

readHint

public void readHint(java.util.StringTokenizer st)

readOptions

public void readOptions(java.util.StringTokenizer st)

snapGrid

public int snapGrid(int x)

doSwitch

public boolean doSwitch(int x,
                        int y)

deleteElement

public void deleteElement(CircuitElement elm)

locateElement

public int locateElement(CircuitElement elm)

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

dragAll

public void dragAll(int x,
                    int y)

dragRow

public void dragRow(int x,
                    int y)

dragColumn

public void dragColumn(int x,
                       int y)

dragItem

public void dragItem(int x,
                     int y)

dragPost

public void dragPost(int x,
                     int y)

removeZeroLengthElements

public void removeZeroLengthElements()

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

distanceSq

public int distanceSq(int x1,
                      int y1,
                      int x2,
                      int y2)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

constructElement

public CircuitElement constructElement(java.lang.Class c,
                                       int x0,
                                       int y0)

doPopupMenu

public void doPopupMenu(java.awt.event.MouseEvent e)

doMainMenuChecks

public void doMainMenuChecks(java.awt.Menu m)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

enableItems

public void enableItems()

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

setGrid

public void setGrid()

comparePair

public boolean comparePair(int x1,
                           int x2,
                           int y1,
                           int y2)

getVoltageDText

public java.lang.String getVoltageDText(double v)

getVoltageText

public java.lang.String getVoltageText(double v)

getUnitText

public java.lang.String getUnitText(double v,
                                    java.lang.String u)

getShortUnitText

public java.lang.String getShortUnitText(double v,
                                         java.lang.String u)

getCurrentText

public java.lang.String getCurrentText(double i)

getCurrentDText

public java.lang.String getCurrentDText(double i)

drawThickLine

public void drawThickLine(java.awt.Graphics g,
                          int x,
                          int y,
                          int x2,
                          int y2)

drawThickPolygon

public void drawThickPolygon(java.awt.Graphics g,
                             int[] xs,
                             int[] ys,
                             int c)

drawThickCircle

public void drawThickCircle(java.awt.Graphics g,
                            int cx,
                            int cy,
                            int ri)