|
GEF (MVC) 3.9.0.201308190730 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.SelectionManager
public class 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.
Constructor Summary | |
---|---|
protected |
SelectionManager()
Default Constructor |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SelectionManager()
Method Detail |
---|
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 selection
|
GEF (MVC) 3.9.0.201308190730 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |