ants.move.core.models.voter
Class VoterModel

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

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

See Also:
Serialized Form

Field Summary
protected  java.util.Vector listeners
           
 
Constructor Summary
VoterModel()
           
 
Method Summary
 void addVote(java.lang.String user)
           
 void addVoterListener(VoterListener vList)
           
 void destroy()
          Finalization method for CSCW components in the ANTS container.
 int getNo()
           
 java.lang.String getTopic()
           
 java.lang.String getType()
          Facility method for obtaining extra information about a specific bean.
 int getUnknown()
           
 VoterThing getVoterThing()
           
 int getYes()
           
 void init()
          Initialization method for CSCW components in the ANTS container.
 void loadVotation(java.lang.String thingKey)
           
 void propertyChange(ants.core.PropertyChangeEvent evt)
          Method triggered in response to a property change.
 void removeVoterListener(VoterListener vList)
           
 void setVoterThing(java.lang.String thingKey)
           
 void voteNo(int votes)
           
 void voteUnknown(int votes)
           
 void voteYes(int votes)
           
 
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
 

Field Detail

listeners

protected java.util.Vector listeners
Constructor Detail

VoterModel

public VoterModel()
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

getTopic

public java.lang.String getTopic()

getYes

public int getYes()

getNo

public int getNo()

getUnknown

public int getUnknown()

setVoterThing

public void setVoterThing(java.lang.String thingKey)

getVoterThing

public VoterThing getVoterThing()

loadVotation

public void loadVotation(java.lang.String thingKey)

addVote

public void addVote(java.lang.String user)

voteYes

public void voteYes(int votes)

voteNo

public void voteNo(int votes)

voteUnknown

public void voteUnknown(int votes)

addVoterListener

public void addVoterListener(VoterListener vList)
                      throws ants.comm.SessionException

removeVoterListener

public void removeVoterListener(VoterListener vList)

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()
Description copied from interface: ants.core.Model
Facility method for obtaining extra information about a specific bean.
Overrides:
getType in class ants.core.Thing
Following copied from interface: ants.core.Model
Returns:
String keyword describing component type

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