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 TypeMethodDescriptionvoidAdds a selection change listener to this emitter.Gets all registered selection change listeners.Gets the current selection context.voidRemoves a selection change listener from this emitter.voidsetClipboard(Clipboard clipboard) voidsetSelectionContext(SelectionContext newSelectionContext) Sets a new selection context.
-
Constructor Details
-
DefaultSelectionManager
public DefaultSelectionManager() -
DefaultSelectionManager
-
-
Method Details
-
getClipboard
- Specified by:
getClipboardin interfaceSelectionManager- Returns:
- The clipboard used by this selection manager.
- See Also:
-
setClipboard
-
getSelectionContext
Description copied from interface:SelectionManagerGets the current selection context.- Specified by:
getSelectionContextin interfaceSelectionManager- Returns:
- The current selection context, or
null.
-
setSelectionContext
Description copied from interface:SelectionManagerSets a new selection context.- Specified by:
setSelectionContextin interfaceSelectionManager- Parameters:
newSelectionContext- The new selection context, ornull.
-
getSelection
- Specified by:
getSelectionin interfaceSelectionSource- Returns:
- The current selection. The selection may be empty, but never
null. - See Also:
-
addSelectionChangeListener
Description copied from interface:SelectionChangeEmitterAdds a selection change listener to this emitter.- Specified by:
addSelectionChangeListenerin interfaceSelectionChangeEmitter- Parameters:
listener- The listener.
-
removeSelectionChangeListener
Description copied from interface:SelectionChangeEmitterRemoves a selection change listener from this emitter.- Specified by:
removeSelectionChangeListenerin interfaceSelectionChangeEmitter- Parameters:
listener- The listener.
-
getSelectionChangeListeners
Description copied from interface:SelectionChangeEmitterGets all registered selection change listeners.- Specified by:
getSelectionChangeListenersin interfaceSelectionChangeEmitter- Returns:
- An array containing all registered listeners.
-