Package org.eclipse.gef
Class SelectionManager
java.lang.Object
org.eclipse.gef.SelectionManager
Manages a viewer's selection model. Selection management includes
 representing a form of selection which is available to clients of a viewer as
 an ISelection. It also includes managing the notion of focus, which is
 closely tied to the current selection. The selection manager provides the
 mechanism for modifying the selection and any validation.
 
WARNING: Subclassing this class is considered experimental at this point.
- Since:
- 3.2
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidappendSelection(EditPart editpart) Appends theEditPartto the current selection.static SelectionManagerCreates the default implementation for a selection manager.voidRemoves theEditPartfrom the current selection.voidDeselects everything.protected final voidCauses the viewer to fire selection changed notification to all listeners.protected EditPartgetFocus()Returns the focus editpart.Returns the current selection.protected EditPartViewerReturnsnullor the viewer whose selection is managed.protected voidhookViewer(EditPartViewer viewer) Provides a hook for when the viewer has been set.voidinternalHookControl(Control control) For internal use only.voidinternalInitialize(EditPartViewer viewer, List<EditPart> selection, Runnable notifier) For internal use only.voidFor internal use only.voidSets the focus part.voidsetSelection(ISelection newSelection) Sets the selection.
- 
Constructor Details- 
SelectionManagerprotected SelectionManager()Default Constructor- Since:
- 3.2
 
 
- 
- 
Method Details- 
createDefaultCreates the default implementation for a selection manager.- Returns:
- the default selection manager
- Since:
- 3.2
 
- 
appendSelectionAppends theEditPartto the current selection. The EditPart becomes the new primary selection. Fires selection changed to allISelectionChangedListeners.- Parameters:
- editpart- the EditPart to append
- Since:
- 3.2
 
- 
deselectRemoves theEditPartfrom the current selection.- Parameters:
- editpart- the editpart
- Since:
- 3.2
 
- 
deselectAllpublic void deselectAll()Deselects everything.- Since:
- 3.2
 
- 
fireSelectionChangedprotected final void fireSelectionChanged()Causes the viewer to fire selection changed notification to all listeners.- Since:
- 3.2
 
- 
getFocusReturns the focus editpart.- Returns:
- the focus editpart
- Since:
- 3.2
 
- 
getSelectionReturns the current selection.- Returns:
- the selection
- Since:
- 3.2
 
- 
getViewerReturnsnullor the viewer whose selection is managed.- Returns:
- nullor the viewer
- Since:
- 3.2
 
- 
internalHookControlFor internal use only. This API is subject to change.- Parameters:
- control- the control
- Since:
- 3.2
 
- 
internalUninstallpublic void internalUninstall()For internal use only. This API is subject to change.- Since:
- 3.2
 
- 
hookViewerProvides a hook for when the viewer has been set.- Parameters:
- viewer- the viewer.
- Since:
- 3.2
 
- 
internalInitializeFor internal use only.- Parameters:
- viewer- viewer
- selection- selection
- notifier- notifier
- Since:
- 3.2
 
- 
setFocusSets the focus part.- Parameters:
- part- the focus part
- Since:
- 3.2
 
- 
setSelectionSets the selection.- Parameters:
- newSelection- the new selection
- Since:
- 3.2
 
 
-