Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ui.views.properties
Class PropertySheet

    java.lang.Object
      org.eclipse.ui.part.WorkbenchPart
          org.eclipse.ui.part.ViewPart
              org.eclipse.ui.part.PageBookView
                  org.eclipse.ui.views.properties.PropertySheet

All Implemented Interfaces:
  IAdaptable, IExecutableExtension, IPartListener, ISelectionListener, IViewPart, IWorkbenchPart, IWorkbenchPart2

public class PropertySheet
extends PageBookView
implements ISelectionListener

Main class for the Property Sheet View.

This standard view has id `"org.eclipse.ui.views.PropertySheet"`.

Note that property sheets and property sheet pages are not the same thing as property dialogs and their property pages (the property pages extension point is for contributing property pages to property dialogs). Within the property sheet view, all pages are `IPropertySheetPage`s.

Property sheet pages are discovered by the property sheet view automatically when a part is first activated. The property sheet view asks the active part for its property sheet page; this is done by invoking `getAdapter(IPropertySheetPage.class)` on the part. If the part returns a page, the property sheet view then creates the controls for that property sheet page (using `createControl`), and adds the page to the property sheet view. Whenever this part becomes active, its corresponding property sheet page is shown in the property sheet view (which may or may not be visible at the time). A part's property sheet page is discarded when the part closes. The property sheet view has a default page (an instance of `PropertySheetPage`) which services all parts without a property sheet page of their own.

The workbench will automatically instantiates this class when a Property Sheet view is needed for a workbench window. This class is not intended to be instantiated or subclassed by clients.

See Also:
  `IPropertySheetPage`, `PropertySheetPage`

Nested Class Summary

Nested classes inherited from class org.eclipse.ui.part.PageBookView
`PageBookView.PageRec, PageBookView.SelectionProvider`

Field Summary
`static String` | `HELP_CONTEXT_PROPERTY_SHEET_VIEW` No longer used but preserved to avoid api change

Fields inherited from interface org.eclipse.ui.IWorkbenchPart
`PROP_TITLE`

Constructor Summary
`PropertySheet()` Creates a property sheet view.

Method Summary
`protected IPage` | `createDefaultPage(PageBook book)` Creates and returns the default page for this view.
`void` | `createPartControl(Composite parent)` The `PropertySheet` implementation of this `IWorkbenchPart` method creates a `PageBook` control with its default page showing.
`void` | `dispose()` The `PageBookView` implementation of this `IWorkbenchPart` method cleans up all the pages.
`protected PageBookView.PageRec` | `doCreatePage(IWorkbenchPart part)` Creates a new page in the pagebook for a particular part.
`protected void` | `doDestroyPage(IWorkbenchPart part, PageBookView.PageRec rec)` Destroys a page in the pagebook for a particular part.
`protected IWorkbenchPart` | `getBootstrapPart()` Returns the active, important workbench part for this view.
`void` | `init(IViewSite site)` Initializes this view with the given view site.
`protected boolean` | `isImportant(IWorkbenchPart part)` Returns whether the given part should be added to this view.
`void` | `partActivated(IWorkbenchPart part)` The `PropertySheet` implementation of this `IPartListener` method first sees if the active part is an `IContributedContentsView` adapter and if so, asks it for its contributing part.
`void` | `selectionChanged(IWorkbenchPart part, ISelection sel)` Notifies this listener that the selection has changed.

Methods inherited from class org.eclipse.ui.part.PageBookView
`doesPageExist, getAdapter, getCurrentContributingPart, getCurrentPage, getDefaultPage, getPageBook, getPageRec, getPageRec, getPageSite, getSelectionProvider, initPage, partBroughtToTop, partClosed, partDeactivated, partOpened, setFocus, showPageRec`

Methods inherited from class org.eclipse.ui.part.ViewPart
`getViewSite, init, saveState, setContentDescription, setInitializationData, setPartName`

Methods inherited from class org.eclipse.ui.part.WorkbenchPart
`addPropertyListener, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy`

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.IWorkbenchPart
`addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener`

Field Detail

### HELP_CONTEXT_PROPERTY_SHEET_VIEW

    public static final String HELP_CONTEXT_PROPERTY_SHEET_VIEW

  No longer used but preserved to avoid api change

  See Also:
    Constant Field Values

Constructor Detail

### PropertySheet

    public PropertySheet()

  Creates a property sheet view.

Method Detail

### createDefaultPage

    protected IPage createDefaultPage(PageBook book)

  Description copied from class: `PageBookView`
  Creates and returns the default page for this view.

  Subclasses must implement this method.

  Subclasses must call initPage with the new page (if it is an `IPageBookViewPage`) before calling createControl on the page.

  Specified by:
    `createDefaultPage` in class `PageBookView`
  Parameters:
    `book` - the pagebook control
  Returns:
    the default page

### createPartControl

    public void createPartControl(Composite parent)

  The `PropertySheet` implementation of this `IWorkbenchPart` method creates a `PageBook` control with its default page showing.

  Specified by:
    `createPartControl` in interface `IWorkbenchPart`
  Overrides:
    `createPartControl` in class `PageBookView`

### dispose

    public void dispose()

  Description copied from class: `PageBookView`
  The `PageBookView` implementation of this `IWorkbenchPart` method cleans up all the pages. Subclasses may extend.

  Specified by:
    `dispose` in interface `IWorkbenchPart`
  Overrides:
    `dispose` in class `PageBookView`

### doCreatePage

    protected PageBookView.PageRec doCreatePage(IWorkbenchPart part)

  Description copied from class: `PageBookView`
  Creates a new page in the pagebook for a particular part. This page will be made visible whenever the part is active, and will be destroyed with a call to `doDestroyPage`.

  Subclasses must implement this method.

  Subclasses must call initPage with the new page (if it is an `IPageBookViewPage`) before calling createControl on the page.

  Specified by:
    `doCreatePage` in class `PageBookView`
  Parameters:
    `part` - the input part
  Returns:
    the record describing a new page for this view
  See Also:
    `PageBookView.doDestroyPage(org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.part.PageBookView.PageRec)`

### doDestroyPage

    protected void doDestroyPage(IWorkbenchPart part,
                                 PageBookView.PageRec rec)

  Description copied from class: `PageBookView`
  Destroys a page in the pagebook for a particular part. This page was returned as a result from `doCreatePage`.

  Subclasses must implement this method.

  Specified by:
    `doDestroyPage` in class `PageBookView`
  Parameters:
    `part` - the input part
    `rec` - a page record for the part
  See Also:
    `PageBookView.doCreatePage(org.eclipse.ui.IWorkbenchPart)`

### getBootstrapPart

    protected IWorkbenchPart getBootstrapPart()

  Description copied from class: `PageBookView`
  Returns the active, important workbench part for this view.

  When the page book view is created it has no idea which part within the workbook should be used to generate the first page. Therefore, it delegates the choice to subclasses of `PageBookView`.

  Implementors of this method should return an active, important part in the workbench or `null` if none found.

  Subclasses must implement this method.

  Specified by:
    `getBootstrapPart` in class `PageBookView`
  Returns:
    the active important part, or `null` if none

### init

    public void init(IViewSite site)
              throws PartInitException

  Description copied from interface: `IViewPart`
  Initializes this view with the given view site.

  This method is automatically called by the workbench shortly after the part is instantiated. It marks the start of the views's lifecycle. Clients must not call this method.

  Specified by:
    `init` in interface `IViewPart`
  Overrides:
    `init` in class `PageBookView`
  Throws:
    `PartInitException`

### isImportant

    protected boolean isImportant(IWorkbenchPart part)

  Description copied from class: `PageBookView`
  Returns whether the given part should be added to this view.

  Subclasses must implement this method.

  Specified by:
    `isImportant` in class `PageBookView`
  Parameters:
    `part` - the input part
  Returns:
    `true` if the part is relevant, and `false` otherwise

### partActivated

    public void partActivated(IWorkbenchPart part)

  The `PropertySheet` implementation of this `IPartListener` method first sees if the active part is an `IContributedContentsView` adapter and if so, asks it for its contributing part.

  Specified by:
    `partActivated` in interface `IPartListener`
  Overrides:
    `partActivated` in class `PageBookView`

### selectionChanged

    public void selectionChanged(IWorkbenchPart part,
                                 ISelection sel)

  Description copied from interface: `ISelectionListener`
  Notifies this listener that the selection has changed.

  This method is called when the selection changes from one to a `non-null` value, but not when the selection changes to `null`. If there is a requirement to be notified in the latter scenario, implement `INullSelectionListener`. The event will be posted through this method.

  Specified by:
    `selectionChanged` in interface `ISelectionListener`
  Parameters:
    `part` - the workbench part containing the selection
    `sel` - the current selection. This may be `null` if `INullSelectionListener` is implemented.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
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, 2004. All rights reserved.