ants.move.core.models.banner
Class BannerModel

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

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

Implementation of banner Model.

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

Constructor Summary
BannerModel()
          Sole & void constructor.
 
Method Summary
 void addBannerListener(BannerListener bList)
          Add banner listener
 void destroy()
          Destroy method
 ants.core.Thing getBannerThing()
          get banner thing
 java.lang.String getBannerThingId()
          get banner key
 java.lang.String getImage()
          Get banner image url
 java.lang.String getType()
          Tool type
 void init()
          Initialize model
 void loadBanner(java.lang.String thingKey)
           
 void nextImage()
          Remotely go to next image of banner.
 void propertyChange(ants.core.PropertyChangeEvent evt)
          Method triggered in response to a property change.
 void removeBannerListener(BannerListener bList)
          Remove banner listener
 void setBannerThing(java.lang.String thingKey)
          Set Banner thing in tool
 void updateBanner(java.lang.String image)
          Update banner image
 
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

BannerModel

public BannerModel()
Sole & void constructor.
Method Detail

init

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

addBannerListener

public void addBannerListener(BannerListener bList)
Add banner listener
Parameters:
bList - listener

removeBannerListener

public void removeBannerListener(BannerListener bList)
Remove banner listener
Parameters:
bList - listener

setBannerThing

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

getBannerThingId

public java.lang.String getBannerThingId()
get banner key
Returns:
key

getBannerThing

public ants.core.Thing getBannerThing()
get banner thing
Returns:
thing instance

loadBanner

public void loadBanner(java.lang.String thingKey)

updateBanner

public void updateBanner(java.lang.String image)
Update banner image
Parameters:
image - image source

nextImage

public void nextImage()
Remotely go to next image of banner.

getImage

public java.lang.String getImage()
Get banner image url
Returns:
image 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:
BANNER

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