PublicRoom.java

key0-96/src/talker/PublicRoom.java · 1.6 KB

From the archive key0-96.tar.bz2

Download the archive   « Back to the archive contents

/*
**               j###t  ########## ####   ####
**              j###t   ########## ####   ####
**             j###T               "###L J###"
**          ######P'    ##########  #########
**          ######k,    ##########   T######T
**          ####~###L   ####
**          #### q###L  ##########   .#####
**          ####  \###L ##########   #####"
**
**  $Id: PublicRoom.java,v 1.2 1997/07/31 14:00:18 subtle Exp subtle $
**
**  Class History
**  
**  Date        Name         Description
**  ---------|------------|-----------------------------------------------
**  20Jul97     subtle      created this class
**
*/

package key;

import java.util.Enumeration;
import java.io.*;
import java.util.StringTokenizer;

public class PublicRoom extends Room
{
	public static final AtomicElement[] ELEMENTS =
	{
		AtomicElement.construct( PublicRoom.class, String.class, "loginMessage",
			AtomicElement.PUBLIC_FIELD,
			"the message that is shown when someone logs in to this room" ),
		AtomicElement.construct( PublicRoom.class, String.class, "logoutMessage",
			AtomicElement.PUBLIC_FIELD,
			"the message that is shown when someone logs out from this room" )
	};
	
	public static final AtomicStructure STRUCTURE = new AtomicStructure( Room.STRUCTURE, ELEMENTS );
	
	public String loginMessage;
	public String logoutMessage;
	
	public PublicRoom()
	{
		loginMessage = "%o appears.";
		logoutMessage = "%o disappears.";
	}
	
	public AtomicStructure getDeclaredStructure()
	{
		return( STRUCTURE );
	}
	
	public String getLoginMessage()
	{
		return( loginMessage );
	}
	
	public String getLogoutMessage()
	{
		return( logoutMessage );
	}
}

Site Stats

Snippets: 1791
Codebases: 571