hades.models.meta
Class AudioPlayer

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.gates.GenericGate
          extended byhades.models.meta.AudioPlayer
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable

public class AudioPlayer
extends GenericGate
implements Simulatable, java.io.Serializable

AudioPlayer - a basic audio player with StdLogic1164 control input...

See Also:
Serialized Form

Field Summary
(package private)  java.awt.Frame frame
           
 
Fields inherited from class hades.models.gates.GenericGate
t_delay
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
AudioPlayer()
           
 
Method Summary
 void configure()
          create and display a 'ConfigDialog' to set the parameters for a SimObject.
 SimObject copy()
          create a copy of the current AudioPlayer with the same audio file
 void elaborate(java.lang.Object arg)
          elaborate(): This method is called by the simulation engine to initialize the simulation object.
 void evaluate(java.lang.Object arg)
          evaluate(): called by the simulation engine on all events that concern this object.
 java.lang.String getAudioResourceName()
           
 java.lang.String[] getExternalResources()
          return a String[] array of length 1 with our current audio resource.
 java.awt.Component getPropertySheet()
          return a reference to the 'property sheet' or configuration window for this SimObject.
 boolean initialize(java.lang.String s)
          initialize a GenericGate from a String that contains the integer version id of this gate and its propagation delay (in seconds), e.g.
 boolean needsExternalResources()
          we use one external resource: the audio data file/resource.
 void setAudioResourceName(java.lang.String s)
           
 java.lang.String toString()
          toString() - the usual info method
 void write(java.io.PrintWriter ps)
          write "versionId" and gate delay "t_delay"
 
Methods inherited from class hades.models.gates.GenericGate
getDelay, getToolTip, scheduleEvent, scheduleEventAfter, scheduleOutputValue, scheduleOutputValueAfter, setDelay, setDelay
 
Methods inherited from class hades.simulator.SimObject
constructDynamicSymbol, getBindkey, getClassLoader, getDebug, getEditor, getFullName, getName, getParent, getPort, getPorts, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, keyPressed, message, mousePressed, needsDynamicSymbol, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setSymbol, setVersionId, setVisible, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hades.simulator.Simulatable
message
 

Field Detail

frame

java.awt.Frame frame
Constructor Detail

AudioPlayer

public AudioPlayer()
Method Detail

getAudioResourceName

public java.lang.String getAudioResourceName()

setAudioResourceName

public void setAudioResourceName(java.lang.String s)

needsExternalResources

public boolean needsExternalResources()
we use one external resource: the audio data file/resource.

Overrides:
needsExternalResources in class SimObject

getExternalResources

public java.lang.String[] getExternalResources()
return a String[] array of length 1 with our current audio resource.

Overrides:
getExternalResources in class SimObject

elaborate

public void elaborate(java.lang.Object arg)
elaborate(): This method is called by the simulation engine to initialize the simulation object.

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

evaluate

public void evaluate(java.lang.Object arg)
evaluate(): called by the simulation engine on all events that concern this object. The object is responsible for updating its internal state and for scheduling all pending output events.

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

initialize

public boolean initialize(java.lang.String s)
Description copied from class: GenericGate
initialize a GenericGate from a String that contains the integer version id of this gate and its propagation delay (in seconds), e.g. '1001 0.5E-8'.

Overrides:
initialize in class GenericGate

write

public void write(java.io.PrintWriter ps)
Description copied from class: GenericGate
write "versionId" and gate delay "t_delay"

Overrides:
write in class GenericGate

configure

public void configure()
Description copied from class: SimObject
create and display a 'ConfigDialog' to set the parameters for a SimObject. The default ConfigDialog for the base class (SimObject) itself is empty except for the 'instance name' of the SimObject.

Overrides:
configure in class GenericGate

getPropertySheet

public java.awt.Component getPropertySheet()
Description copied from class: SimObject
return a reference to the 'property sheet' or configuration window for this SimObject. We cast the return value to an AWT Component, but typically you can expect either a hades.gui.PropertySheet or an java.awt.Window (Dialog or Frame).

Overrides:
getPropertySheet in class SimObject

copy

public SimObject copy()
create a copy of the current AudioPlayer with the same audio file

Overrides:
copy in class GenericGate

toString

public java.lang.String toString()
toString() - the usual info method

Overrides:
toString in class SimObject