public abstract class DocumentAdapter extends Object implements DocumentListener, DocumentInterceptor
DocumentListener
s
as well as DocumentInterceptor
. This class implements all methods mandated by the
aforementioned interfaces with default methods. The implementations for the
DocumentListener
methods just do nothing, while the implementations of the
DocumentInterceptor
methods approve all operations.Document
,
Page
,
DocumentListener
,
DocumentInterceptor
Constructor and Description |
---|
DocumentAdapter() |
Modifier and Type | Method and Description |
---|---|
boolean |
approveStateChange(Document source,
Document.State oldState,
Document.State newState)
Return whether this DocumentListener approves the state change (
true ) of the given
document from the given previous state to the given new state. |
void |
listChanged(ListEvent<Page> listEvent)
When the underlying list changes, this notification allows the object to repaint itself or
update itself as necessary.
|
void |
pageSegmentAdded(PageSegmentEvent evt)
Signal the addition of a page segment from a page.
|
void |
pageSegmentModified(PageSegmentEvent evt)
Signal the modification of a page segment within a page.
|
void |
pageSegmentRemoved(PageSegmentEvent evt)
Signal the removal of a page segment from a page.
|
void |
propertyChange(PropertyChangeEvent propertyChangeEvent) |
public void listChanged(ListEvent<Page> listEvent)
ListEventListener
It is mandatory that the calling thread has obtained the write lock on the source list. This is because the calling thread will have written to the source list to cause this event. This condition guarantees that no writes can occur while the listener is handling this event. It is an error to write to the source list while processing an event.
listChanged
in interface ListEventListener<Page>
listEvent
- a ListEvent
describing the changes to the listpublic void propertyChange(PropertyChangeEvent propertyChangeEvent)
propertyChange
in interface PropertyChangeListener
public boolean approveStateChange(Document source, Document.State oldState, Document.State newState)
DocumentInterceptor
true
) of the given
document from the given previous state to the given new state.approveStateChange
in interface DocumentInterceptor
source
- The Document
on which a state change occurredoldState
- that Document.State
which was valid up to now.newState
- that Document.State
which will be the Document
's new Document.State
if no
registered DocumentInterceptor
disapproves the change.true
if the change is approved, false
otherwise.public void pageSegmentModified(PageSegmentEvent evt)
PageListener
pageSegmentModified
in interface PageListener
evt
- the the event describing the changepublic void pageSegmentRemoved(PageSegmentEvent evt)
PageListener
pageSegmentRemoved
in interface PageListener
public void pageSegmentAdded(PageSegmentEvent evt)
PageListener
pageSegmentAdded
in interface PageListener
Copyright © 2024 levigo holding gmbh. All rights reserved.