Package org.eclipse.gef.ui.parts
Class ContentOutlinePage
- java.lang.Object
-
- org.eclipse.ui.part.Page
-
- org.eclipse.gef.ui.parts.ContentOutlinePage
-
- All Implemented Interfaces:
ISelectionProvider,IPage,IPageBookViewPage,IContentOutlinePage
public class ContentOutlinePage extends Page implements IContentOutlinePage
A adapter for an outline page containing a single EditPartViewer. This class handles selection processing and widget focus. There is no need to manage viewer lifecycle. Whendispose()is called in the superclass, the EditPartViewer will receive widget dispose callback, and perform any necessary cleanup. This class is just an adapter.
-
-
Constructor Summary
Constructors Constructor Description ContentOutlinePage(EditPartViewer viewer)Constructs a ContentOutlinePage for the given viewer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSelectionChangedListener(ISelectionChangedListener listener)voidcreateControl(Composite parent)Forwards the createControl request to the editpartviewer.ControlgetControl()ISelectiongetSelection()Forwards selection request to the viewer.protected EditPartViewergetViewer()Returns the EditPartViewervoidremoveSelectionChangedListener(ISelectionChangedListener listener)voidsetFocus()Sets focus to a part in the page.voidsetSelection(ISelection selection)-
Methods inherited from class org.eclipse.ui.part.Page
dispose, getSite, init, makeContributions, setActionBars
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.ui.part.IPage
dispose, setActionBars
-
-
-
-
Constructor Detail
-
ContentOutlinePage
public ContentOutlinePage(EditPartViewer viewer)
Constructs a ContentOutlinePage for the given viewer.- Parameters:
viewer- the viewer
-
-
Method Detail
-
addSelectionChangedListener
public void addSelectionChangedListener(ISelectionChangedListener listener)
- Specified by:
addSelectionChangedListenerin interfaceISelectionProvider- See Also:
ISelectionProvider.addSelectionChangedListener(ISelectionChangedListener)
-
createControl
public void createControl(Composite parent)
Forwards the createControl request to the editpartviewer.- Specified by:
createControlin interfaceIPage- Specified by:
createControlin classPage- See Also:
IPage.createControl(org.eclipse.swt.widgets.Composite)
-
getControl
public Control getControl()
- Specified by:
getControlin interfaceIPage- Specified by:
getControlin classPage- See Also:
IPage.getControl()
-
getSelection
public ISelection getSelection()
Forwards selection request to the viewer.- Specified by:
getSelectionin interfaceISelectionProvider- See Also:
ISelectionProvider.getSelection()
-
getViewer
protected EditPartViewer getViewer()
Returns the EditPartViewer- Returns:
- the viewer
-
removeSelectionChangedListener
public void removeSelectionChangedListener(ISelectionChangedListener listener)
- Specified by:
removeSelectionChangedListenerin interfaceISelectionProvider- See Also:
ISelectionProvider.removeSelectionChangedListener(ISelectionChangedListener)
-
setFocus
public void setFocus()
Sets focus to a part in the page.
-
setSelection
public void setSelection(ISelection selection)
- Specified by:
setSelectionin interfaceISelectionProvider- See Also:
ISelectionProvider.setSelection(org.eclipse.jface.viewers.ISelection)
-
-