Class DefaultSelectionContext
- java.lang.Object
-
- com.bc.ceres.core.ExtensibleObject
-
- com.bc.ceres.swing.selection.AbstractSelectionContext
-
- com.bc.ceres.swing.selection.support.DefaultSelectionContext
-
- All Implemented Interfaces:
Extensible,SelectionChangeEmitter,SelectionContext,SelectionSource
public class DefaultSelectionContext extends AbstractSelectionContext
A default implementation of theSelectionContextinterface. This class is actually only useful for testing purposes. Real world implementations of aSelectionContextwill most likely adapt to the selections emitted by dedicated GUI components.- Since:
- Ceres 0.10
-
-
Constructor Summary
Constructors Constructor Description DefaultSelectionContext()DefaultSelectionContext(Object selectionSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SelectiongetSelection()voidsetSelection(Selection selection)Sets a new selection.-
Methods inherited from class com.bc.ceres.swing.selection.AbstractSelectionContext
addSelectionChangeListener, canDeleteSelection, canInsert, canSelectAll, deleteSelection, fireSelectionChange, getSelectionChangeListeners, insert, removeSelectionChangeListener, selectAll
-
Methods inherited from class com.bc.ceres.core.ExtensibleObject
getExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.bc.ceres.core.Extensible
getExtension
-
-
-
-
Constructor Detail
-
DefaultSelectionContext
public DefaultSelectionContext()
-
DefaultSelectionContext
public DefaultSelectionContext(Object selectionSource)
-
-
Method Detail
-
getSelection
public Selection getSelection()
- Returns:
- The current selection. The selection may be empty, but never
null. - See Also:
Selection.EMPTY,Selection.isEmpty()
-
setSelection
public void setSelection(Selection selection)
Description copied from interface:SelectionContextSets a new selection.- Parameters:
selection- The new selection.
-
-