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, sequenceIteratoraddChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitidsgetName, getSequenceaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic 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 AbstractChangeablepublic SequenceDB getParent()
Copyright © 2020 BioJava. All rights reserved.