VR
- The visual root node of the UI toolkit, e.g. javafx.scene.Node in
case of JavaFX.public class SelectionForwarder<VR> extends java.lang.Object implements ISelectionChangedListener
SelectionForwarder
can be used to propagate selections from the
Eclipse workbench to the MVC application and vice versa.Constructor and Description |
---|
SelectionForwarder(ISelectionProvider selectionProvider,
IViewer<VR> viewer)
Creates a new
SelectionForwarder that registers listeners on the
given ISelectionProvider and the SelectionModel of the
given IViewer to propagate selections from the Eclipse workbench
to the viewer, and vice versa. |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Unregisters all listeners.
|
protected SelectionModel<VR> |
getSelectionModel()
Returns the
SelectionModel attached to the viewer. |
void |
selectionChanged(SelectionChangedEvent event) |
public SelectionForwarder(ISelectionProvider selectionProvider, IViewer<VR> viewer)
SelectionForwarder
that registers listeners on the
given ISelectionProvider
and the SelectionModel
of the
given IViewer
to propagate selections from the Eclipse workbench
to the viewer, and vice versa.selectionProvider
- The ISelectionProvider
of the Eclipse workbenchviewer
- The IViewer
of which the SelectionModel
should
be held in sync with the Eclipse workbench selection.public void dispose()
protected SelectionModel<VR> getSelectionModel()
SelectionModel
attached to the viewer.SelectionModel
that should be used.public void selectionChanged(SelectionChangedEvent event)
selectionChanged
in interface ISelectionChangedListener
Copyright (c) 2014 itemis AG and others. All rights reserved.