rails.game
Class DisplayBuffer

java.lang.Object
  extended by rails.game.DisplayBuffer

public final class DisplayBuffer
extends java.lang.Object

Class to write a log, and also to maintain a log message stack for writing to the UI.


Field Summary
protected static java.util.List<java.lang.String> initialQueue
          List to catch messages before the buffer is instantiated, based on the supposition that never 2 games will be initialised simultaneously...
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
DisplayBuffer()
           
 
Method Summary
static void add(java.lang.String message)
          Add a message to the message (display) buffer (and display it on the console)
static void add(java.lang.String message, boolean autoDisplay)
           
static void clear()
           
static java.lang.String[] get()
          Get the current message buffer, and clear it
static boolean getAutoDisplay()
           
static int getSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialQueue

protected static java.util.List<java.lang.String> initialQueue
List to catch messages before the buffer is instantiated, based on the supposition that never 2 games will be initialised simultaneously...


log

protected static org.apache.log4j.Logger log
Constructor Detail

DisplayBuffer

public DisplayBuffer()
Method Detail

add

public static void add(java.lang.String message)
Add a message to the message (display) buffer (and display it on the console)


add

public static void add(java.lang.String message,
                       boolean autoDisplay)

get

public static java.lang.String[] get()
Get the current message buffer, and clear it


getSize

public static int getSize()

getAutoDisplay

public static boolean getAutoDisplay()

clear

public static void clear()