|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.ui.part.Page
org.eclipse.ui.views.contentoutline.ContentOutlinePage
An abstract base class for content outline pages.
Clients who are defining an editor may elect to provide a corresponding content outline page. This content outline page will be presented to the user via the standard Content Outline View (the user decides whether their workbench window contains this view) whenever that editor is active. This class should be subclassed.
Internally, each content outline page consists of a standard tree viewer;
selections made in the tree viewer are reported as selection change events
by the page (which is a selection provider). The tree viewer is not created
until createPage is called; consequently, subclasses must extend
createControl to configure the tree viewer with a proper content
provider, label provider, and input element.
Note that those wanting to use a control other than internally created
TreeViewer will need to implement
IContentOutlinePage directly rather than subclassing this class.
| Constructor Summary | |
|---|---|
protected |
ContentOutlinePage()
Create a new content outline page. |
| Method Summary | |
|---|---|
void |
addSelectionChangedListener(ISelectionChangedListener listener)
Adds a listener for selection changes in this selection provider. |
void |
createControl(Composite parent)
The ContentOutlinePage implementation of this
IContentOutlinePage method creates a tree viewer. |
protected void |
fireSelectionChanged(ISelection selection)
Fires a selection changed event. |
Control |
getControl()
Returns the SWT control for this page. |
ISelection |
getSelection()
Returns the current selection for this provider. |
protected TreeViewer |
getTreeViewer()
Returns this page's tree viewer. |
void |
init(IPageSite pageSite)
The Page implementation of this IPageBookViewPage method
stores a reference to the supplied site (the site which contains this
page).
|
void |
removeSelectionChangedListener(ISelectionChangedListener listener)
Removes the given selection change listener from this selection provider. |
void |
selectionChanged(SelectionChangedEvent event)
Notifies that the selection has changed. |
void |
setFocus()
Sets focus to a part in the page. |
void |
setSelection(ISelection selection)
Sets the current selection for this selection provider. |
| Methods inherited from class org.eclipse.ui.part.Page |
|---|
dispose, getSite, 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 |
protected ContentOutlinePage()
| Method Detail |
public void addSelectionChangedListener(ISelectionChangedListener listener)
ISelectionProvider
addSelectionChangedListener in interface ISelectionProviderlistener - a selection changed listenerpublic void createControl(Composite parent)
ContentOutlinePage implementation of this
IContentOutlinePage method creates a tree viewer. Subclasses
must extend this method configure the tree viewer with a proper content
provider, label provider, and input element.
createControl in interface IPagecreateControl in class Pageparent - protected void fireSelectionChanged(ISelection selection)
selection - the new selectionpublic Control getControl()
IPage
getControl in interface IPagegetControl in class Pagepublic ISelection getSelection()
ISelectionProvider
getSelection in interface ISelectionProviderprotected TreeViewer getTreeViewer()
null if
createControl has not been called yetpublic void init(IPageSite pageSite)
PagePage implementation of this IPageBookViewPage method
stores a reference to the supplied site (the site which contains this
page).
Subclasses may extend.
init in interface IPageBookViewPageinit in class Pagepublic void removeSelectionChangedListener(ISelectionChangedListener listener)
ISelectionProvider
removeSelectionChangedListener in interface ISelectionProviderlistener - a selection changed listenerpublic void selectionChanged(SelectionChangedEvent event)
ISelectionChangedListener
selectionChanged in interface ISelectionChangedListenerevent - event object describing the changepublic void setFocus()
setFocus in interface IPagesetFocus in class Pagepublic void setSelection(ISelection selection)
ISelectionProvider
setSelection in interface ISelectionProviderselection - the new selection
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.