public class FilterObservable extends Object
FilterObserver
instances and the
required methods to notify these instances about filter changes. This class
is not thread-safe.Constructor and Description |
---|
FilterObservable() |
Modifier and Type | Method and Description |
---|---|
boolean |
addObserver(FilterObserver observer)
If not already registered, adds this observer to the list of registered
observers.
|
void |
clearObservers()
Removes all registered observers.
|
void |
notifyObservers(Filter filter,
FilterAction action)
Notifies all registered observers about a change to a
Filter . |
boolean |
removeObserver(FilterObserver observer)
Removes a potentially registered observer.
|
public boolean addObserver(FilterObserver observer)
observer
- observer to addtrue
if the observer was actually newly registered.public boolean removeObserver(FilterObserver observer)
observer
- the observer to removetrue
if the observer was previously registered and
is now unregisteredpublic void notifyObservers(Filter filter, FilterAction action)
Filter
.filter
- the filter that is affected, not null
action
- the action performed to the filter, not null
public void clearObservers()
Copyright © 2018 CoR-Lab. All rights reserved.