|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.document.DocumentAdapter
public abstract class DocumentAdapter
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.
Document
,
Page
,
DocumentListener
,
DocumentInterceptor
Constructor Summary | |
---|---|
DocumentAdapter()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentAdapter()
Method Detail |
---|
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>
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |