ants.move.core.models.voter
Class VoterThing

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

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

See Also:
Serialized Form

Constructor Summary
VoterThing()
           
 
Method Summary
 boolean canIVote(java.lang.String user)
           
 void destroy()
          Finalization method for CSCW components in the ANTS container.
 int getNo()
           
 java.lang.String getTopic()
           
 int getUnknown()
           
 java.lang.String getUsersWhoHaveVotedList()
           
 int getYes()
           
 void init()
          Initialization method for CSCW components in the ANTS container.
 void propertyChange(ants.core.PropertyChangeEvent evt)
          Method triggered in response to a property change.
 void setModel(VoterModel m)
           
 void voteNo()
           
 void voteUnknown()
           
 void voteYes()
           
 
Methods inherited from class ants.core.Thing
addPropertyChangeListener, addTokenToProperty, eventArrived, getContext, getDescription, getIndexedProperty, getIndexedProperty, getIndexedPropertyNames, getIndexedPropertySize, getName, getPlace, getProperty, getPropertyNames, getThingGateway, getThingId, getType, 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

VoterThing

public VoterThing()
Method Detail

init

public void init()
Description copied from class: ants.core.Thing
Initialization method for CSCW components in the ANTS container.
Overrides:
init in class ants.core.Thing

setModel

public void setModel(VoterModel m)

getUsersWhoHaveVotedList

public java.lang.String getUsersWhoHaveVotedList()

canIVote

public boolean canIVote(java.lang.String user)

getYes

public int getYes()

getNo

public int getNo()

getUnknown

public int getUnknown()

getTopic

public java.lang.String getTopic()

voteYes

public void voteYes()

voteNo

public void voteNo()

voteUnknown

public void voteUnknown()

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.

destroy

public void destroy()
Description copied from class: ants.core.Thing
Finalization method for CSCW components in the ANTS container.
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