|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.AbstractChangeable
Useful base-class for objects implementing Changeable
Constructor Summary | |
AbstractChangeable()
|
Method Summary | |
void |
addChangeListener(ChangeListener cl)
Add a listener that will be informed of all changes. |
void |
addChangeListener(ChangeListener cl,
ChangeType ct)
Add a listener that will be informed of changes of a given type. |
protected ChangeSupport |
generateChangeSupport()
Called the first time a ChangeSupport object is needed. |
protected ChangeSupport |
getChangeSupport(ChangeType ct)
Called to retrieve the ChangeSupport for this object |
protected boolean |
hasListeners()
|
boolean |
isUnchanging(ChangeType ct)
A particular ChangeType can never be raised by this Changeable. |
void |
removeChangeListener(ChangeListener cl)
Remove a listener that was interested in all types of changes. |
void |
removeChangeListener(ChangeListener cl,
ChangeType ct)
Remove a listener that was interested in a specific types of changes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractChangeable()
Method Detail |
protected boolean hasListeners()
protected ChangeSupport generateChangeSupport()
protected ChangeSupport getChangeSupport(ChangeType ct)
public final void addChangeListener(ChangeListener cl)
Changeable
addChangeListener
in interface Changeable
cl
- the ChangeListener to addpublic final void addChangeListener(ChangeListener cl, ChangeType ct)
Changeable
addChangeListener
in interface Changeable
cl
- the ChangeListenerct
- the ChangeType it is to be informed ofpublic final void removeChangeListener(ChangeListener cl)
Changeable
removeChangeListener
in interface Changeable
cl
- a ChangeListener to removepublic final void removeChangeListener(ChangeListener cl, ChangeType ct)
Changeable
removeChangeListener
in interface Changeable
cl
- a ChangeListener to removect
- the ChangeType that it was interested inpublic final boolean isUnchanging(ChangeType ct)
Changeable
A particular ChangeType can never be raised by this Changeable.
If this returns true, then it is guaranteed that change events of this type (and all child types) can never under any circumstances be fired by this Changeable instance. If it returns false, that does not mean that this type of event will or even can be raised, but that it is worth registering listeners incase.
isUnchanging
in interface Changeable
ct
- the ChangeType to check
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |