Added facilities for displaying system messages that originate on the

client rather than from the server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1076 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-02-26 20:37:55 +00:00
parent dc154423e0
commit e1835810b3
@@ -1,5 +1,5 @@
//
// $Id: ChatDirector.java,v 1.17 2002/02/26 05:47:40 mdb Exp $
// $Id: ChatDirector.java,v 1.18 2002/02/26 20:37:55 mdb Exp $
package com.threerings.crowd.chat;
@@ -67,6 +67,42 @@ public class ChatDirector
_displays.remove(display);
}
/**
* Requests that the specified system message be dispatched to all
* registered chat displays. The message will be delivered as if it
* were received on the main chat object (meaning the chat type will
* be {@link ChatCodes#PLACE_CHAT_TYPE}).
*
* @param bundle the message bundle identifier that should be used to
* localize this message.
* @param message the localizable message string.
*/
public void displaySystemMessage (String bundle, String message)
{
displaySystemMessage(PLACE_CHAT_TYPE, bundle, message);
}
/**
* Requests that the specified system message be dispatched to all
* registered chat displays.
*
* @param type {@link ChatCodes#PLACE_CHAT_TYPE} if the message was
* received on the place object or the type associated with the
* auxiliary chat object on which the message was received.
* @param bundle the message bundle identifier that should be used to
* localize this message.
* @param message the localizable message string.
*/
public void displaySystemMessage (
String type, String bundle, String message)
{
// pass this on to our chat displays
for (int i = 0; i < _displays.size(); i++) {
ChatDisplay display = (ChatDisplay)_displays.get(i);
display.displaySystemMessage(type, bundle, message);
}
}
/**
* Requests that a speak message be generated and delivered to all
* users that occupy the place object that we currently occupy.
@@ -247,12 +283,7 @@ public class ChatDirector
{
String bundle = (String)args[0];
String message = (String)args[1];
// pass this on to our chat displays
for (int i = 0; i < _displays.size(); i++) {
ChatDisplay display = (ChatDisplay)_displays.get(i);
display.displaySystemMessage(type, bundle, message);
}
displaySystemMessage(type, bundle, message);
}
/**