hades.models.io
Class AsciiDisplay

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.io.AsciiDisplay
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable

public class AsciiDisplay
extends SimObject

AsciiDisplay - a simple subclass of SimObject that models a red 20-segment display, used as a ASCII-display 0 .. 9 A .. Z ... The display decodes the ASCII values from 32 to 96, other input values will result in a dark display.

See Also:
Serialized Form

Field Summary
protected  java.awt.Color dark_gray
           
 int DEFAULT
           
protected  FigCompound display
           
(package private)  int index
           
protected  java.awt.Color medium_gray
           
protected  ColoredPolyline[] segments
           
protected  StdLogic1164 undefined
           
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
AsciiDisplay()
          AsciiDisplay: construct a new ASCII display
 
Method Summary
 void elaborate(java.lang.Object arg)
          elaborate: this just calls show() to initialize our symbol.
 void evaluate(java.lang.Object arg)
          evaluate: update our symbol to show any new value.
 void setSymbol(Symbol s)
          setSymbol: set a new symbol and initialize it
 java.lang.String toString()
          toString: generate a String with class name, full instance name, and current ASCII input value.
 
Methods inherited from class hades.simulator.SimObject
configure, constructDynamicSymbol, copy, getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getToolTip, getVersionId, initialize, isVisible, keyPressed, message, mousePressed, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setVersionId, setVisible, tearDown, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

int index

DEFAULT

public final int DEFAULT
See Also:
Constant Field Values

segments

protected ColoredPolyline[] segments

display

protected FigCompound display

dark_gray

protected java.awt.Color dark_gray

medium_gray

protected java.awt.Color medium_gray

undefined

protected StdLogic1164 undefined
Constructor Detail

AsciiDisplay

public AsciiDisplay()
AsciiDisplay: construct a new ASCII display

Method Detail

setSymbol

public void setSymbol(Symbol s)
setSymbol: set a new symbol and initialize it

Overrides:
setSymbol in class SimObject

elaborate

public void elaborate(java.lang.Object arg)
elaborate: this just calls show() to initialize our symbol.

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

evaluate

public void evaluate(java.lang.Object arg)
evaluate: update our symbol to show any new value.

Specified by:
evaluate in interface Simulatable
Overrides:
evaluate in class SimObject
Parameters:
arg - an arbitrary object argument

toString

public java.lang.String toString()
toString: generate a String with class name, full instance name, and current ASCII input value.

Overrides:
toString in class SimObject