|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojava.bio.seq.db.AbstractSequenceDB
org.biojava.bio.seq.db.SequenceDBWrapper
public abstract class SequenceDBWrapper
An abstract implementation of SequenceDB that wraps up another database.
| Nested Class Summary | |
|---|---|
protected class |
SequenceDBWrapper.SequencesForwarder
|
| Field Summary |
|---|
| Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite |
|---|
SEQUENCES |
| Constructor Summary | |
|---|---|
SequenceDBWrapper(SequenceDB parent)
|
|
| Method Summary | |
|---|---|
protected ChangeSupport |
getChangeSupport(ChangeType ct)
Called to retrieve the ChangeSupport for this object. |
SequenceDB |
getParent()
Return the parent SequenceDB. |
| Methods inherited from class org.biojava.bio.seq.db.AbstractSequenceDB |
|---|
addSequence, filter, removeSequence, sequenceIterator |
| Methods inherited from class org.biojava.utils.AbstractChangeable |
|---|
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.biojava.bio.seq.db.SequenceDB |
|---|
ids |
| Methods inherited from interface org.biojava.bio.seq.db.SequenceDBLite |
|---|
getName, getSequence |
| Methods inherited from interface org.biojava.utils.Changeable |
|---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
| Constructor Detail |
|---|
public SequenceDBWrapper(SequenceDB parent)
| Method Detail |
|---|
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||