Interface FeatureReferenceSelection

All Superinterfaces:
org.gvsig.tools.observer.ComplexObservable, DataSelection, DataSet, org.gvsig.tools.dispose.Disposable, org.gvsig.tools.observer.Observable, org.gvsig.tools.observer.Observer, org.gvsig.tools.persistence.Persistent, org.gvsig.tools.visitor.Visitable, org.gvsig.tools.observer.WeakReferencingObservable
All Known Subinterfaces:
FeatureSelection

public interface FeatureReferenceSelection extends DataSelection, org.gvsig.tools.observer.Observer, org.gvsig.tools.observer.WeakReferencingObservable, org.gvsig.tools.observer.ComplexObservable, org.gvsig.tools.persistence.Persistent
Interface to manage selection of objects from an undetermined set. Allows to add and remove values from the selection, as well as reversing the selection.
Author:
Cèsar Ordiñana
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Removes a feature from the selection.
    void
    Deselects all values.
    long
    Returns the number of selected values.
    boolean
     
    boolean
    Returns if a feature is selected.
     
    Returns an unmodifiable Iterator of selected feature references.
    void
    Reverses the selection.
    boolean
    Adds a feature to the selection.
    void
    Selects all values.

    Methods inherited from interface org.gvsig.tools.observer.ComplexObservable

    beginComplexNotification, disableNotifications, enableNotifications, endComplexNotification

    Methods inherited from interface org.gvsig.fmap.dal.DataSet

    accept, isFromStore

    Methods inherited from interface org.gvsig.tools.dispose.Disposable

    dispose

    Methods inherited from interface org.gvsig.tools.observer.Observable

    addObserver, deleteObserver, deleteObservers

    Methods inherited from interface org.gvsig.tools.observer.Observer

    update

    Methods inherited from interface org.gvsig.tools.persistence.Persistent

    loadFromState, saveToState
  • Method Details

    • select

      boolean select(FeatureReference reference)
      Adds a feature to the selection.
      Parameters:
      reference - the selected feature reference
      Returns:
      true if the feature was not selected before selecting it
    • deselect

      boolean deselect(FeatureReference reference)
      Removes a feature from the selection.
      Parameters:
      reference - the deselected feature reference
      Returns:
      true if the feature was selected before deselecting it
    • selectAll

      void selectAll() throws DataException
      Selects all values.
      Throws:
      DataException - if there is an error selecting all values
    • deselectAll

      void deselectAll() throws DataException
      Deselects all values.
      Throws:
      DataException - if there is an error deselecting all values
    • isSelected

      boolean isSelected(FeatureReference reference)
      Returns if a feature is selected.
      Parameters:
      reference - to check
      Returns:
      if it is selected
    • reverse

      void reverse()
      Reverses the selection. Currently selected objects will become the not selected ones, so any other object will be a selected one.
    • getSelectedCount

      long getSelectedCount()
      Returns the number of selected values.
      Returns:
      the number of selected values
    • referenceIterator

      Iterator<FeatureReference> referenceIterator()
      Returns an unmodifiable Iterator of selected feature references.
      Returns:
      the iterator of selected feature references
    • referenceIterable

      Iterable<FeatureReference> referenceIterable()
    • isAvailable

      boolean isAvailable()