hades.models.ruge
Class IntegerSignal

java.lang.Object
  extended byhades.signals.Signal
      extended byhades.models.ruge.IntegerSignal
All Implemented Interfaces:
ColorSource, ContextToolTip, java.io.Serializable, Simulatable

public class IntegerSignal
extends Signal

IntegerSignal - a class that models an Signal that transports Integer values

See Also:
Serialized Form

Field Summary
 java.lang.Integer defaultValue
           
 
Fields inherited from class hades.signals.Signal
debug, design, DFS, driverValues, EA, glowMode, isRoot, label, lastChangeTime, lastValue, name, portPositionTable, probe, probeSymbol, receivers, segments, senders, simulator, solderDots, st, VA, value, vertexTable, VI, visible, visited
 
Constructor Summary
IntegerSignal()
           
IntegerSignal(java.lang.String name)
           
IntegerSignal(java.lang.String name, Port[] senders, Port[] receivers)
           
 
Method Summary
 void addSegment(WireSegment ws)
          add a new segment to this Signal.
 void animate()
          called after the value of this Signal changed.
 void elaborate(java.lang.Object arg)
          elaborate(): called at the start of the simulation to initialize this signal.
 void evaluate(java.lang.Object arg)
          evaluate
 java.awt.Color getColor()
          get the color to be used for drawing the WireSegments and SolderDots for this Signal during animation.
static Signal getDefaultValue()
           
 void handleGlowMode()
          do whatever is necessary to update our graphical representation when the glow mode state changed...
 
Methods inherited from class hades.signals.Signal
addReceiver, addSender, addSolderDot, buildEdgeVectors, buildVertexArrays, canConnect, canMerge, connect, countSegments, countSendersAndReceivers, countSubgraphs, createLabel, createPortPositionTable, createVertexTable, dbg, deleteReceiver, deleteSegment, deleteSender, deleteSingularSegments, DFS, disconnect, disconnectAll, getDebug, getDesign, getDriverValues, getFullName, getGlowMode, getLabel, getLastChangeTime, getName, getPreviousValue, getProbe, getProbeSymbol, getReceivers, getSegments, getSenders, getSimulator, getSolderDots, getToolTip, getValue, getVertexTable, getVisible, hasEvent, hasProbe, isConnected, isPortPosition, isStable, isVertex, isVisible, merge, message, moveLabelTo, numberOfDrivers, parseName, parsePorts, parseSegments, parseSolderDots, printDFS, printGraph, printPortPositionTable, printSegments, printVertexTable, propagateConnectivityChanges, readFromString, rebuildSolderDots, removeProbe, renameAfterDriver, setDebug, setDesign, setGlowMode, setName, setProbe, setProbeSymbol, setSimulator, setTrafo, setValue, setValue, setVisible, showInternalWireSegments, splitIntoSubgraphs, tearDown, toString, toStringVerbose, toStringVerboseOld, write, writeAsResource, writePorts, writeSegments, writeSolderDots
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultValue

public java.lang.Integer defaultValue
Constructor Detail

IntegerSignal

public IntegerSignal()

IntegerSignal

public IntegerSignal(java.lang.String name)

IntegerSignal

public IntegerSignal(java.lang.String name,
                     Port[] senders,
                     Port[] receivers)
Method Detail

addSegment

public void addSegment(WireSegment ws)
Description copied from class: Signal
add a new segment to this Signal. Override this method in subclasses as needed to specify signal-specific segment attributes, e.g.
   
     public void addSegment( WireSegment ws ) {
       super.addSegment( ws );
       ws.getAttributes().lineWidth = 160;
     }
     

Overrides:
addSegment in class Signal

getDefaultValue

public static Signal getDefaultValue()

elaborate

public void elaborate(java.lang.Object arg)
elaborate(): called at the start of the simulation to initialize this signal.

Specified by:
elaborate in interface Simulatable
Overrides:
elaborate in class Signal

evaluate

public void evaluate(java.lang.Object arg)
evaluate

Specified by:
evaluate in interface Simulatable
Overrides:
evaluate in class Signal
Parameters:
arg - An object with the new value for this signal.

getColor

public java.awt.Color getColor()
get the color to be used for drawing the WireSegments and SolderDots for this Signal during animation. This method is required to implement the ColorSource interface. In this class, we always return Color.blue, but subclasses should override this method as needed.

Specified by:
getColor in interface ColorSource
Overrides:
getColor in class Signal

handleGlowMode

public void handleGlowMode()
do whatever is necessary to update our graphical representation when the glow mode state changed... We request a paint() for all WireSegments and SolderDots, whose colors are updated on their next asynchronous refresh via the ColorSource interface and our getColor() method.

Overrides:
handleGlowMode in class Signal

animate

public void animate()
called after the value of this Signal changed. If glowMode is active, update all WireSegments and SolderDots belonging to this Signal,