Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.views.contentoutline
Class ContentOutlinePage


java.lang.Object
  extended by 

org.eclipse.ui.part.Page
      extended by 
org.eclipse.ui.views.contentoutline.ContentOutlinePage
All Implemented Interfaces:
ISelectionChangedListener, ISelectionProvider, IPage, IPageBookViewPage, IContentOutlinePage

public abstract class ContentOutlinePage
extends Page
implements IContentOutlinePage, ISelectionChangedListener

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 ()
          The Page implementation of this IPage method returns null.
  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

ContentOutlinePage

protected ContentOutlinePage()
Create a new content outline page.

Method Detail

addSelectionChangedListener

public void addSelectionChangedListener(
ISelectionChangedListener listener)
Description copied from interface: ISelectionProvider
Adds a listener for selection changes in this selection provider. Has no effect if an identical listener is already registered.

Specified by:
addSelectionChangedListener in interface ISelectionProvider
Parameters:
listener - a selection changed listener

createControl

public void createControl(
Composite parent)
The 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.

Specified by:
createControl in interface IPage
Specified by:
createControl in class Page
Parameters:
parent -

fireSelectionChanged

protected void fireSelectionChanged(
ISelection selection)
Fires a selection changed event.

Parameters:
selection - the new selection

getControl

public 
Control getControl()
Description copied from class: Page
The Page implementation of this IPage method returns null. Subclasses must reimplement.

Specified by:
getControl in interface IPage
Specified by:
getControl in class Page
Returns:
the SWT control for this page, or null if this page does not have a control

getSelection

public 
ISelection getSelection()
Description copied from interface: ISelectionProvider
Returns the current selection for this provider.

Specified by:
getSelection in interface ISelectionProvider
Returns:
the current selection

getTreeViewer

protected 
TreeViewer getTreeViewer()
Returns this page's tree viewer.

Returns:
this page's tree viewer, or null if createControl has not been called yet

init

public void init(
IPageSite pageSite)
Description copied from class: Page
The Page implementation of this IPageBookViewPage method stores a reference to the supplied site (the site which contains this page).

Subclasses may extend.

Specified by:
init in interface IPageBookViewPage
Overrides:
init in class Page
Parameters:
pageSite - the page site

removeSelectionChangedListener

public void removeSelectionChangedListener(
ISelectionChangedListener listener)
Description copied from interface: ISelectionProvider
Removes the given selection change listener from this selection provider. Has no affect if an identical listener is not registered.

Specified by:
removeSelectionChangedListener in interface ISelectionProvider
Parameters:
listener - a selection changed listener

selectionChanged

public void selectionChanged(
SelectionChangedEvent event)
Description copied from interface: ISelectionChangedListener
Notifies that the selection has changed.

Specified by:
selectionChanged in interface ISelectionChangedListener
Parameters:
event - event object describing the change

setFocus

public void setFocus()
Sets focus to a part in the page.

Specified by:
setFocus in interface IPage
Specified by:
setFocus in class Page

setSelection

public void setSelection(
ISelection selection)
Description copied from interface: ISelectionProvider
Sets the current selection for this selection provider.

Specified by:
setSelection in interface ISelectionProvider
Parameters:
selection - the new selection

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire