blue is DigSim class, geen is java class, red is method. Not all classes listed only major classes and their templates
DigSim extends Applet
init // get default schematic name, sets file operations t/f, creates pin grid
run // loads schematic, creates and paints Schematic and SchemeticPanel
InitPinGrids
SetUpImages
destroyFrame
doFrame
action
SimulateSetUp
SimulateStart // pops-up analyzer frame if called, informs MyStatusPanel (a that simulation is running)
SimulateStop
SimulateCycle // moves time forware one instance
addComponent // called when a user selects a component to be added. HACK !, hardcoded to the set of components in the demo
UserWantsPointer // sets appropriate MyControlPanel buttons to be deselected.
UserWantsWireDrawing // sets appropriate MyControlPanel buttons to be deselected.
UserWantsJunctionDrawing // sets appropriate MyControlPanel buttons to be deselected
UserWantsTextDrawing
UserWantsHelp
UserWantsSimulate
UserWantsNewSchematic
UserWantsOpenSchematic
UserWants... // there is one of these for every button and menu item on the the ControlPanel
ControlPanel extends Canvas // control panel is cluster of ImageButton in that control editing and simulation
Constructor // adds ImageButtons to applet
Dimension // figure out perferred size
getButton // get ImageButton with specified name
LoadButtonImages
EnableButton
DisableButton
SelectButton
UnselectButton
mouseX
ButtonPressed
ElectronicComponent extends Object
Constructor
Point, Dimension, HitBox, HitBoxSize, Inputs, Outputs, InputPin[], OutputPin[]
Copy // empty
CompToCopy // take a copy of component and create new
getName
InitBeforeSimulate
ReceivePotential
SimulateLogic // empty
SimulateLogic(id)
InformConnectedComponents(id)
InformConnectedComponentsOldLevel(id)
SimulateSetUp
draw
DrawHitBox
AdjustPosition
CheckPosition
CheckIfComponentInSelectBox
CheckIfComponentClicked
protected RegisterPin
RegisterPins
protected RemovePin
RemovePinsGrid // remove all pins
PlacePinsHere
SimMouseDown()
SimMouseUp()
DrawInputPins
Save(PrintStream)
LED extends ElectronicComponent // example of a simple electronic component
Consrtuctor
Copy
draw
Save
InitBeforeSimulate
IngergratedCircuit extends ElectronicComponent
Constructor // call superclasss constructor
draw
SimulateLogic // empty
Simulate(id) // calls super Simulate method
LogicPort extends ElectronicComponent
Constructor // calls super and setups output pin to floating
Copy // empty
Draw // calls super.drawm, DrawInputPins, and DrawOutputPins
SimulateLogic // empty
Pin
Contrcutor // call Vector (Pin psuedo extends Vector)
AddComponent // adds element to vector
RemoveComponent //
SimulateSetUp
InputPin extends ComponentPin
Constructor // simply calls superclass contructor
InitBeforeSimulate
draw // calls super draw and checks if "looping"
Schematic
Constructor // creates new Vector
PasteSchematic
SetAllComponents
RemoveSameElements
addComponent
draw
size // returns number of components
DestroyComponents
RemoveAllComponents
InSchematic
CheckIfComponentInSelectBox
AdjustPosition
RemovePinsGrid
CheckPosition
PlacePinsHere
CheckIfComponentClicked // returns ElectronicComponent if clicked or null
Simulate // runs for loop through all components in Schematic and calls Simulate method, SimulateCycleID++
InitBeforeSimulate
protected StringToColor
LoadComponent // LoadComponent from File, poorly architected checks for every type in system !!!, then calls addComponent on that type
Save throws IOException, FileFormatException
PlaceJunction
TestShortCircuit
TestLoop
getProbes
SwapComponents // used by analyzer, to fix some strange condition
ProbesInSchematic