class EventLogManagerController.EventLogEditorDocumentListener extends Object implements DocumentListener
DocumentListener
for creating a specific
listener to use on the EventLogEditor
(textArea
).
When an insert or a remove update happens, the listener changes the status of the document
owner (an EventLogEditor
frame), to show to the user that the document has been
modified and to notify the application of this change.
First, it changes its isContentModified
status, setting it to true
.
Then it sets the visual status of the EventLogEditor
in a specific way to show that the
content has been modified from the last time (adding an asterisk at the end of the editor title and
at the end of the associated FooterAreaButton
title).
The listener at this point sets the isContentValidated
status of the EventLogEditor
to false
, this because the content has been modified since last
validation and therefore needs to be validated again.
If there is at least one footprint matrix associated with this editor, the listener resets the list of associated footprint matrices, because they are not valid anymore due to the change just made and need to be recreated.
For the same reason, the listener resets the footprint filter associated to the editor, so the footprint algorithm will be able to generate a new one on next start, and closes the opened filters panel associated to the editor, because it could contain information not valid anymore.
DocumentListener
Constructor and Description |
---|
EventLogEditorDocumentListener() |
Modifier and Type | Method and Description |
---|---|
void |
changedUpdate(DocumentEvent e)
Gives notification that an attribute or set of attributes changed.
|
void |
insertUpdate(DocumentEvent e)
Gives notification that there was an insert into the document.
|
private void |
modifyEditorStatus(DocumentEvent e)
This method gets the
EventLogEditor owner of the document and
changes its status, to show to the user that the document has been modified
and to notify the application of this change. |
void |
removeUpdate(DocumentEvent e)
Gives notification that a portion of the document has been removed.
|
public void insertUpdate(DocumentEvent e)
When this happen, this procedure calls the modifyEditorStatus(DocumentEvent)
,
to modify the status of the document owner to modified and not validated.
insertUpdate
in interface DocumentListener
e
- the document eventDocumentEvent
public void removeUpdate(DocumentEvent e)
When this happen, this procedure calls the modifyEditorStatus(DocumentEvent)
,
to modify the status of the document owner to modified and not validated.
removeUpdate
in interface DocumentListener
e
- the document eventDocumentEvent
public void changedUpdate(DocumentEvent e)
changedUpdate
in interface DocumentListener
e
- the document eventDocumentEvent
private void modifyEditorStatus(DocumentEvent e)
EventLogEditor
owner of the document and
changes its status, to show to the user that the document has been modified
and to notify the application of this change.
First, it changes its isContentModified
status, setting it to true
.
Then it sets the visual status of the EventLogEditor
in a specific way to show that the
content has been modified from the last time (adding an asterisk at the end of the editor title and
at the end of the associated FooterAreaButton
title).
The method at this point sets the isContentValidated
status of the EventLogEditor
to false
, this because the content has been modified since last
validation and therefore needs to be validated again.
If there is at least one footprint matrix associated with this editor, the method resets the list of associated footprint matrices, because they are not valid anymore due to the change just made and need to be recreated.
For the same reason, the method resets the footprint filter associated to the editor, so the footprint algorithm will be able to generate a new one on next start, and closes the opened filters panel associated to the editor, because it could contain information not valid anymore.
e
- the document eventFooterAreaButton
,
DocumentEvent