|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlogger.Logger
public class Logger
Provides a method for logging mofications to a map. The methods are static allow any object to directly access these methods.
Field Summary | |
---|---|
private static Log |
log
the current log |
private static boolean |
loggerEnabled
specifies if events should be logged |
static java.lang.String |
NEW_MAP
default name for new maps |
Constructor Summary | |
---|---|
Logger()
|
Method Summary | |
---|---|
static void |
addEvent(LogEvent event)
Adds an event to the current log, if one exists. |
static void |
exportLog(java.lang.String filename)
Serializes the log to the specified file. |
static Log |
getLog()
Gets the current log. |
static Log |
importLog(java.lang.String filename)
Deserializes a log from the specified log file. |
static void |
newMap()
Displables logging, because a new map does not have a file location. |
static void |
redo(InteractionHandler handler)
Redoes the most recently undone action. |
static void |
setMap(java.lang.String mapFile)
Creates a new log object for the new map. |
static void |
undo(InteractionHandler handler)
Undoes the most recent event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Log log
private static boolean loggerEnabled
public static java.lang.String NEW_MAP
Constructor Detail |
---|
public Logger()
Method Detail |
---|
public static void setMap(java.lang.String mapFile)
mapFile
- - the location of the new mappublic static void newMap()
public static Log getLog()
public static void addEvent(LogEvent event)
event
- - the modification eventpublic static Log importLog(java.lang.String filename)
filename
- - the file containing a serialized log
public static void exportLog(java.lang.String filename)
filename
- - the file to writepublic static void undo(InteractionHandler handler)
handler
- - the interaction handlerpublic static void redo(InteractionHandler handler)
handler
- - the interaction handler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |