Package com.pixelmed.display
Class DialogMessageLogger
- java.lang.Object
-
- com.pixelmed.display.DialogMessageLogger
-
- All Implemented Interfaces:
MessageLogger
public class DialogMessageLogger extends java.lang.Object implements MessageLogger
A class to write log and status messages to a scrolling text area in a dialog box.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classDialogMessageLogger.ClearActionListenerprotected classDialogMessageLogger.CreateGUIRunnableprotected classDialogMessageLogger.SendRunnableprotected classDialogMessageLogger.SetVisibleRunnable
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JDialogoutputDialogprotected javax.swing.JScrollPaneoutputScrollPaneprotected javax.swing.JTextAreaoutputTextArea
-
Constructor Summary
Constructors Constructor Description DialogMessageLogger(java.lang.String titleMessage, int width, int height, boolean exitApplicationOnClose)Construct a logger and make it immediately visible.DialogMessageLogger(java.lang.String titleMessage, int width, int height, boolean exitApplicationOnClose, boolean visible)Construct a logger.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateGUI(java.lang.String titleMessage, int width, int height, boolean exitApplicationOnClose, boolean visible)Construct the GUI for a logger.voidsend(java.lang.String message)Append the supplied text to the log.voidsendLn(java.lang.String message)Append the supplied text to the log, followed by a new line.voidsetVisible(boolean visible)
-
-
-
Constructor Detail
-
DialogMessageLogger
public DialogMessageLogger(java.lang.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 boxwidth- initial width of the resizeable dialog boxheight- initial height of the resizeable dialog boxexitApplicationOnClose- if true, when the dialog box is closed (X-d out), will exit the application with success status
-
DialogMessageLogger
public DialogMessageLogger(java.lang.String titleMessage, int width, int height, boolean exitApplicationOnClose, boolean visible)Construct a logger.
- Parameters:
titleMessage- for the title bar of the dialog boxwidth- initial width of the resizeable dialog boxheight- initial height of the resizeable dialog boxexitApplicationOnClose- if true, when the dialog box is closed (X-d out), will exit the application with success statusvisible- if true, will be made visible after construction
-
-
Method Detail
-
createGUI
protected void createGUI(java.lang.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 boxwidth- initial width of the resizeable dialog boxheight- initial height of the resizeable dialog boxexitApplicationOnClose- if true, when the dialog box is closed (X-d out), will exit the application with success statusvisible- if true, will be made visible after construction
-
setVisible
public void setVisible(boolean visible)
-
send
public void send(java.lang.String message)
Description copied from interface:MessageLoggerAppend the supplied text to the log.
- Specified by:
sendin interfaceMessageLogger- Parameters:
message- the (possibly multi-line) text to append to the log
-
sendLn
public void sendLn(java.lang.String message)
Description copied from interface:MessageLoggerAppend the supplied text to the log, followed by a new line.
- Specified by:
sendLnin interfaceMessageLogger- Parameters:
message- the (possibly multi-line) text to append to the log
-
-