T - The underlying type of Filter.public interface MasterFilter<T extends org.scijava.Contextual> extends Filter
Filters.
When instantiated, all appropriately typed Filter classes should be
discovered by this class. As enable(Class) and
disable(Class) are called on the appropriate Filter classes,
a stack of filters is built.
NB: this interface extends Filter and concrete MasterFilter
implementations should similarly extend the interface they wrap. However,
instead of Filter.getParent() returning the wrapped
object, it should return the head of this MasterFilter's filter
stack.
NB: all wrappers should be maintained as singletons within the scope of a
MasterFilter instance, so that enable(Class) returns the
same filter instance each time it is called.
NB: MasterFilters are intended to be used the same way as
Filters: that is, as the wrapped component would be. However, the
Filter API does have a slightly different meaning in the context of a
MasterFilter.
Filter| Modifier and Type | Method and Description |
|---|---|
boolean |
disable(Class<? extends Filter> filterClass)
Removes the specified filter from the filter stack, if present.
|
<F extends Filter> |
enable(Class<F> filterClass)
Inserts an instance of the indicated filter class into the filter stack.
|
Set<Class<? extends Filter>> |
getFilterClasses()
Returns a list of all filter classes this MasterFilter can enable/disable.
|
Object |
getParent()
Returns the top of the filter stack.
|
Object |
getTail()
Returns the base object (below the filter stack).
|
void |
reset()
Disables all enabled filters maintained by this MasterFilter.
|
void |
setParent(Object parent)
Sets the wrapped object.
|
enabledDefault, isCompatible, targetgetVersion, loggetIdentifiercontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocation<F extends Filter> F enable(Class<F> filterClass)
filterClass - - The type of filter to enableboolean disable(Class<? extends Filter> filterClass)
filterClass - - The type of filter to disableSet<Class<? extends Filter>> getFilterClasses()
void setParent(Object parent)
Object getParent()
Object getTail()
Copyright © 2011–2026 SCIFIO. All rights reserved.