Package com.levigo.jadice.document
Class DocumentAdapter
java.lang.Object
com.levigo.jadice.document.DocumentAdapter
- All Implemented Interfaces:
DocumentInterceptor
,DocumentListener
,PageListener
,PropertyChangeListener
,EventListener
,org.jadice.util.glazedlists.event.ListEventListener<Page>
public abstract class DocumentAdapter
extends Object
implements DocumentListener, DocumentInterceptor
An abstract adapter class used to reduce the complexity of implementing
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.- Since:
- 5.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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
(org.jadice.util.glazedlists.event.ListEvent<Page> listEvent) void
Signal the addition of a page segment from a page.void
Signal the modification of a page segment within a page.void
Signal the removal of a page segment from a page.void
propertyChange
(PropertyChangeEvent propertyChangeEvent)
-
Constructor Details
-
DocumentAdapter
public DocumentAdapter()
-
-
Method Details
-
listChanged
- Specified by:
listChanged
in interfaceorg.jadice.util.glazedlists.event.ListEventListener<Page>
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
approveStateChange
public boolean approveStateChange(Document source, Document.State oldState, Document.State newState) Description copied from interface:DocumentInterceptor
Return whether this DocumentListener approves the state change (true
) of the given document from the given previous state to the given new state.- Specified by:
approveStateChange
in interfaceDocumentInterceptor
- Parameters:
source
- TheDocument
on which a state change occurredoldState
- thatDocument.State
which was valid up to now.newState
- thatDocument.State
which will be theDocument
's newDocument.State
if no registeredDocumentInterceptor
disapproves the change.- Returns:
true
if the change is approved,false
otherwise.
-
pageSegmentModified
Description copied from interface:PageListener
Signal the modification of a page segment within a page. This could mean an addition, removal or just a modification within a page segment.- Specified by:
pageSegmentModified
in interfacePageListener
- Parameters:
evt
- the the event describing the change
-
pageSegmentRemoved
Description copied from interface:PageListener
Signal the removal of a page segment from a page.- Specified by:
pageSegmentRemoved
in interfacePageListener
-
pageSegmentAdded
Description copied from interface:PageListener
Signal the addition of a page segment from a page.- Specified by:
pageSegmentAdded
in interfacePageListener
-