Class DefaultSelectionManager
java.lang.Object
com.bc.ceres.swing.selection.support.DefaultSelectionManager
- All Implemented Interfaces:
SelectionChangeEmitter
,SelectionManager
,SelectionSource
A default implementation of the
SelectionManager
interface.- Since:
- Ceres 0.10
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a selection change listener to this emitter.Gets all registered selection change listeners.Gets the current selection context.void
Removes a selection change listener from this emitter.void
setClipboard
(Clipboard clipboard) void
setSelectionContext
(SelectionContext newSelectionContext) Sets a new selection context.
-
Constructor Details
-
DefaultSelectionManager
public DefaultSelectionManager() -
DefaultSelectionManager
-
-
Method Details
-
getClipboard
- Specified by:
getClipboard
in interfaceSelectionManager
- Returns:
- The clipboard used by this selection manager.
- See Also:
-
setClipboard
-
getSelectionContext
Description copied from interface:SelectionManager
Gets the current selection context.- Specified by:
getSelectionContext
in interfaceSelectionManager
- Returns:
- The current selection context, or
null
.
-
setSelectionContext
Description copied from interface:SelectionManager
Sets a new selection context.- Specified by:
setSelectionContext
in interfaceSelectionManager
- Parameters:
newSelectionContext
- The new selection context, ornull
.
-
getSelection
- Specified by:
getSelection
in interfaceSelectionSource
- Returns:
- The current selection. The selection may be empty, but never
null
. - See Also:
-
addSelectionChangeListener
Description copied from interface:SelectionChangeEmitter
Adds a selection change listener to this emitter.- Specified by:
addSelectionChangeListener
in interfaceSelectionChangeEmitter
- Parameters:
listener
- The listener.
-
removeSelectionChangeListener
Description copied from interface:SelectionChangeEmitter
Removes a selection change listener from this emitter.- Specified by:
removeSelectionChangeListener
in interfaceSelectionChangeEmitter
- Parameters:
listener
- The listener.
-
getSelectionChangeListeners
Description copied from interface:SelectionChangeEmitter
Gets all registered selection change listeners.- Specified by:
getSelectionChangeListeners
in interfaceSelectionChangeEmitter
- Returns:
- An array containing all registered listeners.
-