org.gscg.common.interactionlayer.location
Class YellowPage

java.lang.Object
  extended bynl.tudelft.simulation.event.EventProducer
      extended byorg.gscg.common.interactionlayer.location.YellowPage
All Implemented Interfaces:
nl.tudelft.simulation.event.EventProducerInterface, java.io.Serializable

public class YellowPage
extends nl.tudelft.simulation.event.EventProducer

The YellowPage object is a place holder for the actors in an interactive simulation. Whenever an actor is added or removed this object sends LocationAndNameData objects to all the client-side graphical user interfaces which upon receiving this data adjust their WorldPanel. It is furthermore used to support social communication by means of text messages between human controlled actors and a game leader.

Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl . The source code and binary code of this software is proprietary information of Delft University of Technology.

Since:
1.0.0
Version:
$Revision: 1.3 $ $Date: 2005/08/09 15:43:41 $
Author:
Stijn-Pieter van Houten
See Also:
Serialized Form

Field Summary
static nl.tudelft.simulation.event.EventType UPDATE_ACTORS
          to indicate the adding or removing of new actors
static nl.tudelft.simulation.event.EventType UPDATE_INTERACTIVE_PLAYER_STATUS
          to indicate a change in the status of a human controlled actor
 
Fields inherited from class nl.tudelft.simulation.event.EventProducer
listeners
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Constructor Summary
YellowPage()
          constructs a new YellowPage
 
Method Summary
 void addActor(GameActorInterface actor, java.lang.String actorType, boolean interactive)
          Method addActor.
 void addGameLeader(GameLeaderInteractionLayer gameLeader)
          Method addGameLeader.
 boolean addListener(nl.tudelft.simulation.event.EventListenerInterface listener, nl.tudelft.simulation.event.EventType eventType)
           
 nl.tudelft.simulation.event.EventListenerInterface findActor(java.lang.String name)
          Method findActor.
 void removeActor(GameActorInterface actor)
          Method removeActor.
 void update(boolean announce, nl.tudelft.simulation.event.EventListenerInterface owner)
          Method update.
 void updateActor(GameActorInterface actor, java.lang.String actorType, boolean interactive)
          Method updateActor.
 void updateInteractiveOnlineStatus(nl.tudelft.simulation.actor.ActorInterface actor, boolean status, boolean persistent)
          Method updateInteractiveOnlineStatus.
 void updateInteractiveOnlineStatus(GameLeaderInteractionLayer gameLeader, boolean status, boolean persistent)
          Method updateInteractiveOnlineStatus.
 
Methods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UPDATE_ACTORS

public static final nl.tudelft.simulation.event.EventType UPDATE_ACTORS
to indicate the adding or removing of new actors


UPDATE_INTERACTIVE_PLAYER_STATUS

public static final nl.tudelft.simulation.event.EventType UPDATE_INTERACTIVE_PLAYER_STATUS
to indicate a change in the status of a human controlled actor

Constructor Detail

YellowPage

public YellowPage()
constructs a new YellowPage

Method Detail

addActor

public void addActor(GameActorInterface actor,
                     java.lang.String actorType,
                     boolean interactive)
Method addActor.

Parameters:
actor - the actor
actorType - the type of actor
interactive - indicates whether the actor is human controlled or not

addGameLeader

public void addGameLeader(GameLeaderInteractionLayer gameLeader)
Method addGameLeader.

Parameters:
gameLeader - the game leader

removeActor

public void removeActor(GameActorInterface actor)
Method removeActor.

Parameters:
actor - the actor

updateActor

public void updateActor(GameActorInterface actor,
                        java.lang.String actorType,
                        boolean interactive)
Method updateActor.

Parameters:
actor - the actor
actorType - the type of actor
interactive - indicates whether the actor is human controlled or not

updateInteractiveOnlineStatus

public void updateInteractiveOnlineStatus(nl.tudelft.simulation.actor.ActorInterface actor,
                                          boolean status,
                                          boolean persistent)
Method updateInteractiveOnlineStatus.

Parameters:
actor - the human controlled actor actor to update
status - the status of the actor, true if the human controlled actor is online
persistent - indicates whether the status is changed because of saving, if true , no event is fired

updateInteractiveOnlineStatus

public void updateInteractiveOnlineStatus(GameLeaderInteractionLayer gameLeader,
                                          boolean status,
                                          boolean persistent)
Method updateInteractiveOnlineStatus.

Parameters:
gameLeader - the game leader
status - the status of the actor, true if the human controlled actor is online
persistent - indicates whether the status is changed because of saving, if true , no event is fired

update

public void update(boolean announce,
                   nl.tudelft.simulation.event.EventListenerInterface owner)
Method update.

Parameters:
announce - indicates whether this is an announce event
owner - may be null if announce == false

findActor

public nl.tudelft.simulation.event.EventListenerInterface findActor(java.lang.String name)
Method findActor.

Parameters:
name - the name of the actor
Returns:
returns an actor interface based on the name, or null if no actor could be found

addListener

public boolean addListener(nl.tudelft.simulation.event.EventListenerInterface listener,
                           nl.tudelft.simulation.event.EventType eventType)
See Also:
EventProducerInterface.addListener(nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventType)


Copyright © 2002-2005 Delft University of Technology, the Netherlands. All Rights Reserved.