public class SelectionManager
extends java.lang.Object
WARNING: Subclassing this class is considered experimental at this point.
Modifier | Constructor and Description |
---|---|
protected |
SelectionManager()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
appendSelection(EditPart editpart)
Appends the
EditPart to the current selection. |
static SelectionManager |
createDefault()
Creates the default implementation for a selection manager.
|
void |
deselect(EditPart editpart)
Removes the
EditPart from the current selection. |
void |
deselectAll()
Deselects everything.
|
protected void |
fireSelectionChanged()
Causes the viewer to fire selection changed notification to all
listeners.
|
protected EditPart |
getFocus()
Returns the focus editpart.
|
ISelection |
getSelection()
Returns the current selection.
|
protected EditPartViewer |
getViewer()
Returns
null or the viewer whose selection is managed. |
protected void |
hookViewer(EditPartViewer viewer)
Provides a hook for when the viewer has been set.
|
void |
internalHookControl(Control control)
For internal use only.
|
void |
internalInitialize(EditPartViewer viewer,
java.util.List selection,
java.lang.Runnable notifier)
For internal use only.
|
void |
internalUninstall()
For internal use only.
|
void |
setFocus(EditPart part)
Sets the focus part.
|
void |
setSelection(ISelection newSelection)
Sets the selection.
|
public static SelectionManager createDefault()
public void appendSelection(EditPart editpart)
EditPart
to the current selection. The EditPart
becomes the new primary selection. Fires selection changed to all
ISelectionChangedListener
s.editpart
- the EditPart to appendpublic void deselect(EditPart editpart)
EditPart
from the current selection.editpart
- the editpartpublic void deselectAll()
protected final void fireSelectionChanged()
protected EditPart getFocus()
public ISelection getSelection()
protected EditPartViewer getViewer()
null
or the viewer whose selection is managed.null
or the viewerpublic void internalHookControl(Control control)
control
- the controlpublic void internalUninstall()
protected void hookViewer(EditPartViewer viewer)
viewer
- the viewer.public void internalInitialize(EditPartViewer viewer, java.util.List selection, java.lang.Runnable notifier)
viewer
- viewerselection
- selectionnotifier
- notifierpublic void setFocus(EditPart part)
part
- the focus partpublic void setSelection(ISelection newSelection)
newSelection
- the new selectionCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.