ants.move.core.models.audio
Class AudioModel

java.lang.Object
  |
  +--ants.core.Thing
        |
        +--ants.move.core.models.audio.AudioModel
All Implemented Interfaces:
ants.core.Model, ants.core.PropertyChangeListener, ants.comm.RemoteEventListener, java.io.Serializable

public class AudioModel
extends ants.core.Thing
implements ants.core.PropertyChangeListener

Implementation of Audio Model.

Version:
1.0 Build 2002
Author:
Carles Pairot (cpairot@tinet.org), Oriol Montalā (omontala@tinet.org), Francesc Piņas(fpd@tinet.org)
See Also:
Serialized Form

Constructor Summary
AudioModel()
          Sole & void constructor.
 
Method Summary
 void addAudioListener(AudioListener aList)
          Add Audio listener
 void controlAudio(boolean p)
          Set audio play or stop
 void destroy()
          Destroy method
 ants.core.Thing getAudioThing()
          Get audio thing
 java.lang.String getAudioThingId()
          Get audio thing key
 java.lang.String getAudioTrack()
          Get audio track
 java.lang.String getType()
          tool type
 void init()
          Initialize model
 java.lang.String isPlaying()
          Is playing
 void loadAudio(java.lang.String thingKey)
           
 void propertyChange(ants.core.PropertyChangeEvent evt)
          Method triggered in response to a property change.
 void removeAudioListener(AudioListener aList)
          Remove audio listener
 void setAudioThing(java.lang.String thingKey)
          Set audio thing in tool
 
Methods inherited from class ants.core.Thing
addPropertyChangeListener, addTokenToProperty, eventArrived, getContext, getDescription, getIndexedProperty, getIndexedProperty, getIndexedPropertyNames, getIndexedPropertySize, getName, getPlace, getProperty, getPropertyNames, getThingGateway, getThingId, incrementProperty, init, removePropertyChangeListener, setProperty, triggerEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioModel

public AudioModel()
Sole & void constructor.
Method Detail

init

public void init()
Initialize model
Overrides:
init in class ants.core.Thing

addAudioListener

public void addAudioListener(AudioListener aList)
Add Audio listener
Parameters:
aList - listener

removeAudioListener

public void removeAudioListener(AudioListener aList)
Remove audio listener
Parameters:
aList - listener

setAudioThing

public void setAudioThing(java.lang.String thingKey)
Set audio thing in tool
Parameters:
thingKey - key

getAudioThingId

public java.lang.String getAudioThingId()
Get audio thing key
Returns:
key

getAudioThing

public ants.core.Thing getAudioThing()
Get audio thing
Returns:
Thing instance

controlAudio

public void controlAudio(boolean p)
Set audio play or stop
Parameters:
p - true=play false=stop

isPlaying

public java.lang.String isPlaying()
Is playing
Returns:
state

loadAudio

public void loadAudio(java.lang.String thingKey)

getAudioTrack

public java.lang.String getAudioTrack()
Get audio track
Returns:
track source url

propertyChange

public void propertyChange(ants.core.PropertyChangeEvent evt)
Description copied from interface: ants.core.PropertyChangeListener
Method triggered in response to a property change.
Specified by:
propertyChange in interface ants.core.PropertyChangeListener
Following copied from interface: ants.core.PropertyChangeListener
Returns:
ants.core.PropertyChangeEvent A PropertyChangeEvent with property change information.

getType

public java.lang.String getType()
tool type
Overrides:
getType in class ants.core.Thing
Returns:
AUDIO

destroy

public void destroy()
Destroy method
Overrides:
destroy in class ants.core.Thing


Developers: Oriol Montala, Carles Pairot, Francesc Pinas2000 - 2002
Departament d'Enginyeria Informatica i Matematiques
Escola Tecnica Superior d'Enginyeria
Universitat Rovira i Virgili