Class DefaultSelectionContext

All Implemented Interfaces:
Extensible, SelectionChangeEmitter, SelectionContext, SelectionSource

public class DefaultSelectionContext extends AbstractSelectionContext
A default implementation of the SelectionContext interface. This class is actually only useful for testing purposes. Real world implementations of a SelectionContext will most likely adapt to the selections emitted by dedicated GUI components.
Since:
Ceres 0.10
  • Constructor Details

    • DefaultSelectionContext

      public DefaultSelectionContext()
    • DefaultSelectionContext

      public DefaultSelectionContext(Object selectionSource)
  • Method Details

    • getSelection

      public Selection getSelection()
      Returns:
      The current selection. The selection may be empty, but never null.
      See Also:
    • setSelection

      public void setSelection(Selection selection)
      Description copied from interface: SelectionContext
      Sets a new selection.
      Parameters:
      selection - The new selection.