Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acs::logging::dialogs::error::ErrorLogDialog Class Reference

Collaboration diagram for alma::acs::logging::dialogs::error::ErrorLogDialog:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ErrorLogDialog (Frame owner, String title, boolean modal)
synchronized void appendText (String str)
synchronized void clearAll ()
void actionPerformed (ActionEvent e)

Private Member Functions

void initGUI ()
void saveAllLog ()
void rationalizeButtons ()

Private Attributes

JTextArea logTA
PlainDocument document = new PlainDocument()
JButton closeBtn
JButton cleanAllBtn
JButton saveAllBtn
JToolBar toolBar
long maxLength
final String ERRORLOG_SIZE_PROP_NAME = "jlog.errorlog.size"
final long ERROR_LOG_DEFAULT_SIZE = 50 *1000000
ErrorLogFile outFile = null

Detailed Description

The dialog to show the errors.

The dialog stores errors till maxLength chars is reached. If the log exceeds that number, they are automatically flushed in a file in ACS_TMP.

The dimension defaults to ERROR_LOG_DEFAULT_SIZE and can be changed setting the ERRORLOG_SIZE_PROP_NAME property.

The content of the dialog can be saved and cleared.

Author:
acaproni


Constructor & Destructor Documentation

alma::acs::logging::dialogs::error::ErrorLogDialog::ErrorLogDialog Frame  owner,
String  title,
boolean  modal
[inline]
 

Constructor

Parameters:
owner The owner of the dialog
title The title
modal Modal type


Member Function Documentation

void alma::acs::logging::dialogs::error::ErrorLogDialog::actionPerformed ActionEvent  e  )  [inline]
 

See also:
java.awt.event.ActionListener

java.awt.event.ActionEvent

synchronized void alma::acs::logging::dialogs::error::ErrorLogDialog::appendText String  str  )  [inline]
 

Add a String to the error log and show/hide the dialog if it is the first time an error is added

Parameters:
str The string to append in the TextArea
show Show/hide the dialog

synchronized void alma::acs::logging::dialogs::error::ErrorLogDialog::clearAll  )  [inline]
 

Clear the log in the windows and the log in the file

void alma::acs::logging::dialogs::error::ErrorLogDialog::initGUI  )  [inline, private]
 

Builds the content of the GUI

void alma::acs::logging::dialogs::error::ErrorLogDialog::rationalizeButtons  )  [inline, private]
 

Enable/Disable the buttons in the toolbar depending on the content of the text area and the existence of the temporary file

void alma::acs::logging::dialogs::error::ErrorLogDialog::saveAllLog  )  [inline, private]
 

Save the content of the temporary file and the content of the text area into a file


Member Data Documentation

JButton alma::acs::logging::dialogs::error::ErrorLogDialog::cleanAllBtn [private]
 

The button to erase all the logs (i.e. the logs shown in the window and those flushed on the temporary file)

JButton alma::acs::logging::dialogs::error::ErrorLogDialog::closeBtn [private]
 

The button to close (hide) the dialog

PlainDocument alma::acs::logging::dialogs::error::ErrorLogDialog::document = new PlainDocument() [private]
 

The document of the TextArea

final long alma::acs::logging::dialogs::error::ErrorLogDialog::ERROR_LOG_DEFAULT_SIZE = 50 *1000000 [private]
 

/ The default maximum size of the ERROR LOG

final String alma::acs::logging::dialogs::error::ErrorLogDialog::ERRORLOG_SIZE_PROP_NAME = "jlog.errorlog.size" [private]
 

/ The name of the property defining the size of the error log

JTextArea alma::acs::logging::dialogs::error::ErrorLogDialog::logTA [private]
 

The log text appears into a JtextArea

long alma::acs::logging::dialogs::error::ErrorLogDialog::maxLength [private]
 

The maximum dimension of the log to keep in memory.

Its value is read from a property. If the value is 0, the error log is unlimited

ErrorLogFile alma::acs::logging::dialogs::error::ErrorLogDialog::outFile = null [private]
 

The file to flush logs

JButton alma::acs::logging::dialogs::error::ErrorLogDialog::saveAllBtn [private]
 

/ The button to save all the logs in a file (it saves the content of the temporary log file on disk and the content of the text area)

The button is enabled only if some log has been flushed on disk

JToolBar alma::acs::logging::dialogs::error::ErrorLogDialog::toolBar [private]
 

The toolbar


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:53:48 2009 for ACS Java API by doxygen 1.3.8