public abstract class AbstractSymbol extends AbstractChangeable implements Symbol
Annotatable.AnnotationForwarder
Modifier and Type | Field and Description |
---|---|
protected ChangeForwarder |
annotationForwarder |
ANNOTATION
Constructor and Description |
---|
AbstractSymbol() |
Modifier and Type | Method and Description |
---|---|
protected ChangeSupport |
getChangeSupport(ChangeType changeType)
Called to retrieve the ChangeSupport for this object.
|
String |
toString() |
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMatches, getName
getAnnotation
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
protected transient ChangeForwarder annotationForwarder
public AbstractSymbol()
protected ChangeSupport getChangeSupport(ChangeType changeType)
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
Copyright © 2014 BioJava. All rights reserved.