public abstract class SequenceDBWrapper extends AbstractSequenceDB implements Serializable
Modifier and Type | Class and Description |
---|---|
protected class |
SequenceDBWrapper.SequencesForwarder |
SEQUENCES
Constructor and Description |
---|
SequenceDBWrapper(SequenceDB parent) |
Modifier and Type | Method and Description |
---|---|
protected ChangeSupport |
getChangeSupport(ChangeType ct)
Called to retrieve the ChangeSupport for this object.
|
SequenceDB |
getParent()
Return the parent SequenceDB.
|
addSequence, filter, removeSequence, sequenceIterator
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ids
getName, getSequence
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public SequenceDBWrapper(SequenceDB parent)
protected ChangeSupport getChangeSupport(ChangeType ct)
AbstractChangeable
Your implementation of this method should have the following structure:
It is usual for the forwarding listeners (someForwarder in this example) to
be transient and lazily instantiated. Be sure to register & unregister the
forwarder in the code that does the ChangeEvent handling in setter methods.
ChangeSupport cs = super.getChangeSupport(ct);
if(someForwarder == null && ct.isMatching(SomeInterface.SomeChangeType)) {
someForwarder = new ChangeForwarder(...
this.stateVariable.addChangeListener(someForwarder, VariableInterface.AChange);
}
return cs;
getChangeSupport
in class AbstractChangeable
public SequenceDB getParent()
Copyright © 2014 BioJava. All rights reserved.