Package com.macrofocus.filter
Class AbstractFilter<E>
java.lang.Object
com.macrofocus.filter.AbstractFilter<E>
- All Implemented Interfaces:
Filter<E>,MutableFilter<E>
- Direct Known Subclasses:
AbstractMutableFilter,AbstractMutableIndexFilter
This class provides a skeletal implementation of the Filter interface to minimize the effort required to implement
this interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFilterListener(FilterListener<E> listener) Add a listener to the list that's notified each time a change to the filter occurs.voidaddWeakFilterListener(FilterListener<E> listener) Add a listener to the list that's notified each time a change to the filter occurs.booleanprotected voidnotifyFilteredChanged(FilterEvent<E> event) voidremoveFilterListener(FilterListener<E> listener) Remove a listener to the list that's notified each time a change to the filter occurs.voidRemove all listeners to the list that's notified each time a change to the selection occurs.voidsetEnabled(boolean enabled) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.macrofocus.filter.Filter
getFilteredCount, isActive, isFiltered, isFilteredByMethods inherited from interface com.macrofocus.filter.MutableFilter
clearFilter, clearFilterBy, setFiltered, setFilteredIterable, setFilteredState
-
Constructor Details
-
AbstractFilter
public AbstractFilter()
-
-
Method Details
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabledin interfaceMutableFilter<E>
-
addFilterListener
Description copied from interface:FilterAdd a listener to the list that's notified each time a change to the filter occurs.- Specified by:
addFilterListenerin interfaceFilter<E>- Parameters:
listener- the SelectionListener
-
addWeakFilterListener
Description copied from interface:FilterAdd a listener to the list that's notified each time a change to the filter occurs. The listener will automatically be disposed of should no other object have a reference to it.- Specified by:
addWeakFilterListenerin interfaceFilter<E>- Parameters:
listener- the SelectionListener
-
removeFilterListener
Description copied from interface:FilterRemove a listener to the list that's notified each time a change to the filter occurs.- Specified by:
removeFilterListenerin interfaceFilter<E>- Parameters:
listener- the SelectionListener
-
removeFilterListeners
public void removeFilterListeners()Description copied from interface:FilterRemove all listeners to the list that's notified each time a change to the selection occurs.- Specified by:
removeFilterListenersin interfaceFilter<E>
-
notifyFilteredChanged
-