org.gscg.common.interactionlayer.messaging
Class ScenarioText

java.lang.Object
  extended bynl.tudelft.simulation.event.EventProducer
      extended byorg.gscg.common.interactionlayer.messaging.ScenarioText
All Implemented Interfaces:
AnnounceInterface, java.util.EventListener, nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventProducerInterface, java.io.Serializable

public class ScenarioText
extends nl.tudelft.simulation.event.EventProducer
implements AnnounceInterface, nl.tudelft.simulation.event.EventListenerInterface, java.io.Serializable

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.2 $ $Date: 2005/08/09 15:43:42 $
Author:
Stijn-Pieter van Houten
See Also:
Serialized Form

Field Summary
static nl.tudelft.simulation.event.EventType CACHE_LARGE_NEWS_MESSAGE_EVENT
          the cache large news message event; this event is for a message panel
static java.lang.String CONTEXT_NAME
          the name of this object in the context
static nl.tudelft.simulation.event.EventType GAME_LEADER_SENT_SMALL_NEWS_MESSAGE_EVENT
          the sent small news message event
static nl.tudelft.simulation.event.EventType LARGE_NEWS_MESSAGE_EVENT
          the large news message event; this event is for a message panel
static nl.tudelft.simulation.event.EventType SMALL_NEWS_MESSAGE_EVENT
          the small news message event; this event is for a news bar
 
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
ScenarioText(nl.tudelft.simulation.dsol.simulators.SimulatorInterface simulator)
          constructs a new ScenarioText
 
Method Summary
 void addInteractionLayer(GlobalInteractionLayerInterface layer)
          Method addInteractionLayer adds an interaction layer to the list of requestForQuotes of the scenario texts
 void announce(nl.tudelft.simulation.event.EventType eventType, boolean announce)
          Method announce.
 void announce(nl.tudelft.simulation.event.EventType eventType, boolean announce, SingleUserInteractionLayerInterface singleUserInteractionLayer)
           
 void fireNewsMessageEvent(java.lang.Integer i)
          Method fireNewsMessageEvent.
 void fireNewsMessageEvent(java.lang.String title, java.lang.String content, java.lang.String summary, java.lang.String region, java.lang.String type)
          Fires a large news message event with the given title and conten.
static ScenarioText getScenarioText()
           
 void notify(nl.tudelft.simulation.event.EventInterface event)
           
 
Methods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, 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

CONTEXT_NAME

public static final java.lang.String CONTEXT_NAME
the name of this object in the context

See Also:
Constant Field Values

SMALL_NEWS_MESSAGE_EVENT

public static final nl.tudelft.simulation.event.EventType SMALL_NEWS_MESSAGE_EVENT
the small news message event; this event is for a news bar


GAME_LEADER_SENT_SMALL_NEWS_MESSAGE_EVENT

public static final nl.tudelft.simulation.event.EventType GAME_LEADER_SENT_SMALL_NEWS_MESSAGE_EVENT
the sent small news message event


LARGE_NEWS_MESSAGE_EVENT

public static final nl.tudelft.simulation.event.EventType LARGE_NEWS_MESSAGE_EVENT
the large news message event; this event is for a message panel


CACHE_LARGE_NEWS_MESSAGE_EVENT

public static final nl.tudelft.simulation.event.EventType CACHE_LARGE_NEWS_MESSAGE_EVENT
the cache large news message event; this event is for a message panel

Constructor Detail

ScenarioText

public ScenarioText(nl.tudelft.simulation.dsol.simulators.SimulatorInterface simulator)
constructs a new ScenarioText

Parameters:
simulator - the simulator to use
Method Detail

addInteractionLayer

public void addInteractionLayer(GlobalInteractionLayerInterface layer)
Method addInteractionLayer adds an interaction layer to the list of requestForQuotes of the scenario texts

Parameters:
layer - the interaction layer

fireNewsMessageEvent

public void fireNewsMessageEvent(java.lang.Integer i)
Method fireNewsMessageEvent.

Parameters:
i - i

fireNewsMessageEvent

public void fireNewsMessageEvent(java.lang.String title,
                                 java.lang.String content,
                                 java.lang.String summary,
                                 java.lang.String region,
                                 java.lang.String type)
Fires a large news message event with the given title and conten. Furthermore, a small news message is sent indicating to players that a large news message has been published.

Parameters:
title - the title of the large news message
content - the content for the large news message
summary - the summary of the large news message
region - the region for the message, e.g. asia or europe
type - the type of message, e.g. money, fire or graph (business)

announce

public void announce(nl.tudelft.simulation.event.EventType eventType,
                     boolean announce,
                     SingleUserInteractionLayerInterface singleUserInteractionLayer)
Parameters:
eventType - the event type
announce - indicates whether it is announce (=true) or not
singleUserInteractionLayer - the single user interaction layer

announce

public void announce(nl.tudelft.simulation.event.EventType eventType,
                     boolean announce)
Description copied from interface: AnnounceInterface
Method announce.

Specified by:
announce in interface AnnounceInterface
Parameters:
eventType - the eventType
announce - indicates whether this is an announce
See Also:
AnnounceInterface.announce(nl.tudelft.simulation.event.EventType, boolean)

notify

public void notify(nl.tudelft.simulation.event.EventInterface event)
            throws java.rmi.RemoteException
Specified by:
notify in interface nl.tudelft.simulation.event.EventListenerInterface
Throws:
java.rmi.RemoteException
See Also:
EventListenerInterface.notify(nl.tudelft.simulation.event.EventInterface)

getScenarioText

public static ScenarioText getScenarioText()
Returns:
Returns the instance of the scenario text


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