ants.move.core.models.video
Class VideoModel

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

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

Implementation of Video Model.

Version:
1.0 Build 2002
Author:
Oriol Montalà (omontala@tinet.org), Carles Pairot (cpairot@tinet.org)
See Also:
Serialized Form

Constructor Summary
VideoModel()
          Sole & void constructor.
 
Method Summary
 void addVideoListener(VideoListener vList)
          Adds new listener
 void controlVideo(boolean p)
          Set video play or stop
 void destroy()
          Destroy method
 java.lang.String getType()
          Tool Type
 java.lang.String getVideoThing()
          get videothing key
 void init()
          Initialize model
 java.lang.String isPlaying()
          Return if video tool is playing a video
 void loadVideo(java.lang.String thingKey)
          Remotely load video file in Video tool.
 void propertyChange(ants.core.PropertyChangeEvent evt)
          Method triggered in response to a property change.
 void removeVideoListener(VideoListener vList)
          removes listeners
 
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

VideoModel

public VideoModel()
Sole & void constructor.
Method Detail

init

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

addVideoListener

public void addVideoListener(VideoListener vList)
Adds new listener
Parameters:
vList - Class that implements VideoListener interface

removeVideoListener

public void removeVideoListener(VideoListener vList)
removes listeners
Parameters:
vList - Class that implements VideoListener interface

loadVideo

public void loadVideo(java.lang.String thingKey)
Remotely load video file in Video tool.
Parameters:
thingKey - Key of the Thing

controlVideo

public void controlVideo(boolean p)
Set video play or stop
Parameters:
p - True indicate play and false indicate stop

getVideoThing

public java.lang.String getVideoThing()
get videothing key
Returns:
key of the thing that is now loaded in video Tool

isPlaying

public java.lang.String isPlaying()
Return if video tool is playing a video
Returns:
true or false

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:
VIDEO

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