com.pixelmed.display
Class DialogMessageLogger

java.lang.Object
  extended by com.pixelmed.display.DialogMessageLogger
All Implemented Interfaces:
MessageLogger

public class DialogMessageLogger
extends Object
implements MessageLogger

A class to write log and status messages to a scrolling text area in a dialog box.


Nested Class Summary
protected  class DialogMessageLogger.ClearActionListener
           
protected  class DialogMessageLogger.CreateGUIRunnable
           
protected  class DialogMessageLogger.SendRunnable
           
protected  class DialogMessageLogger.SetVisibleRunnable
           
 
Field Summary
protected  JDialog outputDialog
           
protected  JScrollPane outputScrollPane
           
protected  JTextArea outputTextArea
           
 
Constructor Summary
DialogMessageLogger(String titleMessage, int width, int height, boolean exitApplicationOnClose)
          Construct a logger and make it immediately visible.
DialogMessageLogger(String titleMessage, int width, int height, boolean exitApplicationOnClose, boolean visible)
          Construct a logger.
 
Method Summary
protected  void createGUI(String titleMessage, int width, int height, boolean exitApplicationOnClose, boolean visible)
          Construct the GUI for a logger.
 void send(String message)
          Append the supplied text to the log.
 void sendLn(String message)
          Append the supplied text to the log, followed by a new line.
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputDialog

protected JDialog outputDialog

outputScrollPane

protected JScrollPane outputScrollPane

outputTextArea

protected JTextArea outputTextArea
Constructor Detail

DialogMessageLogger

public DialogMessageLogger(String titleMessage,
                           int width,
                           int height,
                           boolean exitApplicationOnClose)

Construct a logger and make it immediately visible.

Parameters:
titleMessage - for the title bar of the dialog box
width - initial width of the resizeable dialog box
height - initial height of the resizeable dialog box
exitApplicationOnClose - if true, when the dialog box is closed (X-d out), will exit the application with success status

DialogMessageLogger

public DialogMessageLogger(String titleMessage,
                           int width,
                           int height,
                           boolean exitApplicationOnClose,
                           boolean visible)

Construct a logger.

Parameters:
titleMessage - for the title bar of the dialog box
width - initial width of the resizeable dialog box
height - initial height of the resizeable dialog box
exitApplicationOnClose - if true, when the dialog box is closed (X-d out), will exit the application with success status
visible - if true, will be made visible after construction
Method Detail

createGUI

protected void createGUI(String titleMessage,
                         int width,
                         int height,
                         boolean exitApplicationOnClose,
                         boolean visible)

Construct the GUI for a logger.

Parameters:
titleMessage - for the title bar of the dialog box
width - initial width of the resizeable dialog box
height - initial height of the resizeable dialog box
exitApplicationOnClose - if true, when the dialog box is closed (X-d out), will exit the application with success status
visible - if true, will be made visible after construction

setVisible

public void setVisible(boolean visible)

send

public void send(String message)
Description copied from interface: MessageLogger

Append the supplied text to the log.

Specified by:
send in interface MessageLogger
Parameters:
message - the (possibly multi-line) text to append to the log

sendLn

public void sendLn(String message)
Description copied from interface: MessageLogger

Append the supplied text to the log, followed by a new line.

Specified by:
sendLn in interface MessageLogger
Parameters:
message - the (possibly multi-line) text to append to the log