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 |
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.
|
Constructor
|
|
|
|
Add a String to the error log and show/hide the dialog if it is the first time an error is added
|
|
Clear the log in the windows and the log in the file |
|
Builds the content of the GUI |
|
Enable/Disable the buttons in the toolbar depending on the content of the text area and the existence of the temporary file |
|
Save the content of the temporary file and the content of the text area into a file |
|
The button to erase all the logs (i.e. the logs shown in the window and those flushed on the temporary file) |
|
The button to close (hide) the dialog |
|
The document of the TextArea |
|
/ The default maximum size of the ERROR LOG |
|
/ The name of the property defining the size of the error log |
|
The log text appears into a |
|
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 |
|
The file to flush logs |
|
/ 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 |
|
The toolbar |