com.xmlmind.domutil
Class SimpleConsole

java.lang.Object
  extended by com.xmlmind.domutil.SimpleConsole
All Implemented Interfaces:
Console

public class SimpleConsole
extends Object
implements Console

An implementation of Console which prints its messages to System.err and System.out.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.xmlmind.util.Console
Console.MessageType
 
Constructor Summary
SimpleConsole()
           
SimpleConsole(String prefix, boolean showMessageType, Console.MessageType errorLevel)
           
 
Method Summary
 Console.MessageType getErrorLevel()
           
 String getPrefix()
           
 boolean isShowingMessageType()
           
 void setErrorLevel(Console.MessageType level)
           
 void setPrefix(String prefix)
           
 void setShowingMessageType(boolean show)
           
 void showMessage(String message, Console.MessageType messageType)
          Show specified message to user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleConsole

public SimpleConsole()

SimpleConsole

public SimpleConsole(String prefix,
                     boolean showMessageType,
                     Console.MessageType errorLevel)
Method Detail

setPrefix

public void setPrefix(String prefix)

getPrefix

public String getPrefix()

setShowingMessageType

public void setShowingMessageType(boolean show)

isShowingMessageType

public boolean isShowingMessageType()

setErrorLevel

public void setErrorLevel(Console.MessageType level)

getErrorLevel

public Console.MessageType getErrorLevel()

showMessage

public void showMessage(String message,
                        Console.MessageType messageType)
Description copied from interface: Console
Show specified message to user.

Specified by:
showMessage in interface Console
Parameters:
message - a possibly multi-line message
messageType - type of message: Console.MessageType.INFO, Console.MessageType.WARNING, Console.MessageType.ERROR or Console.MessageType.DEBUG.