Class AbstractSelection<E>
- java.lang.Object
-
- com.macrofocus.selection.implementation.AbstractSelection<E>
-
- All Implemented Interfaces:
Selection<E>,java.lang.Iterable<E>
- Direct Known Subclasses:
AbstractMutableSelection
public abstract class AbstractSelection<E> extends java.lang.Object implements Selection<E>
This class provides a skeletal implementation of the Selection interface to minimize the effort required to implement this interface.
-
-
Constructor Summary
Constructors Constructor Description AbstractSelection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSelectionListener(SelectionListener<E> listener)Add a listener to the list that's notified each time a change to the selection occurs.voidaddWeakSelectionListener(SelectionListener<E> listener)Add a listener to the list that's notified each time a change to the selection occurs.booleanisEnabled()protected voidnotifySelectedChanged(SelectionEvent<E> event)voidremoveSelectionListener(SelectionListener<E> listener)Remove a listener to the list that's notified each time a change to the selection occurs.voidremoveSelectionListeners()Remove all listeners to the list that's notified each time a change to the selection occurs.protected voidsetEnabled(boolean enabled)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.macrofocus.selection.Selection
getSelectedCount, getSelectedSet, isActive, isSelected
-
-
-
-
Method Detail
-
setEnabled
protected void setEnabled(boolean enabled)
-
addSelectionListener
public void addSelectionListener(SelectionListener<E> listener)
Description copied from interface:SelectionAdd a listener to the list that's notified each time a change to the selection occurs.- Specified by:
addSelectionListenerin interfaceSelection<E>- Parameters:
listener- the SelectionListener
-
addWeakSelectionListener
public void addWeakSelectionListener(SelectionListener<E> listener)
Description copied from interface:SelectionAdd a listener to the list that's notified each time a change to the selection occurs. The listener will automatically be disposed of should no other object have a reference to it.- Specified by:
addWeakSelectionListenerin interfaceSelection<E>- Parameters:
listener- the SelectionListener
-
removeSelectionListener
public void removeSelectionListener(SelectionListener<E> listener)
Description copied from interface:SelectionRemove a listener to the list that's notified each time a change to the selection occurs.- Specified by:
removeSelectionListenerin interfaceSelection<E>- Parameters:
listener- the SelectionListener
-
removeSelectionListeners
public void removeSelectionListeners()
Description copied from interface:SelectionRemove all listeners to the list that's notified each time a change to the selection occurs.- Specified by:
removeSelectionListenersin interfaceSelection<E>
-
notifySelectedChanged
protected void notifySelectedChanged(SelectionEvent<E> event)
-
-