Class 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 Detail

      • AbstractSelection

        public AbstractSelection()
    • Method Detail

      • setEnabled

        protected void setEnabled​(boolean enabled)
      • addSelectionListener

        public void addSelectionListener​(SelectionListener<E> listener)
        Description copied from interface: Selection
        Add a listener to the list that's notified each time a change to the selection occurs.
        Specified by:
        addSelectionListener in interface Selection<E>
        Parameters:
        listener - the SelectionListener
      • addWeakSelectionListener

        public void addWeakSelectionListener​(SelectionListener<E> listener)
        Description copied from interface: Selection
        Add 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:
        addWeakSelectionListener in interface Selection<E>
        Parameters:
        listener - the SelectionListener
      • removeSelectionListener

        public void removeSelectionListener​(SelectionListener<E> listener)
        Description copied from interface: Selection
        Remove a listener to the list that's notified each time a change to the selection occurs.
        Specified by:
        removeSelectionListener in interface Selection<E>
        Parameters:
        listener - the SelectionListener
      • removeSelectionListeners

        public void removeSelectionListeners()
        Description copied from interface: Selection
        Remove all listeners to the list that's notified each time a change to the selection occurs.
        Specified by:
        removeSelectionListeners in interface Selection<E>
      • notifySelectedChanged

        protected void notifySelectedChanged​(SelectionEvent<E> event)