public interface ChangeListener extends EventListener
Modifier and Type | Interface and Description |
---|---|
static class |
ChangeListener.AlwaysVetoListener
An implementation that always vetoes everything.
|
static class |
ChangeListener.ChangeEventRecorder
A listener that remembers the ChangeEvent of the last change.
|
static class |
ChangeListener.LoggingListener
A listener that writes information about the event stream to a PrintStream.
|
Modifier and Type | Field and Description |
---|---|
static ChangeListener |
ALWAYS_VETO
Convenience implementation which vetoes every change of which it is
notified.
|
static ChangeListener |
LOG_TO_OUT
Convenience implementation that echoes all events to out.
|
Modifier and Type | Method and Description |
---|---|
void |
postChange(ChangeEvent cev)
Called when a change has just taken place.
|
void |
preChange(ChangeEvent cev)
Called before a change takes place.
|
static final ChangeListener ALWAYS_VETO
static final ChangeListener LOG_TO_OUT
void preChange(ChangeEvent cev) throws ChangeVetoException
Called before a change takes place.
This is your chance to stop the change by throwing a ChangeVetoException. This method does not indicate that the change will definitely take place, so it is not recomended that you take any positive action within this handler.
cev
- An event encapsulating the change which is about
to take place.ChangeVetoException
- Description of ExceptionChangeVetoException
- if the receiver does not wish
this change to occur at this
time.void postChange(ChangeEvent cev)
Called when a change has just taken place.
This method is the place to perform any behavior in response to the change event.
cev
- An event encapsulating the change which has
occured.Copyright © 2014 BioJava. All rights reserved.