Eclipse Platform
Release 3.3

org.eclipse.ui.views.properties.tabbed
Class TabbedPropertySheetPage

java.lang.Object
  extended byorg.eclipse.ui.part.Page
      extended byorg.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage
All Implemented Interfaces:
ILabelProviderListener, IPage, IPageBookViewPage, IPropertySheetPage, ISelectionListener

public class TabbedPropertySheetPage
extends Page
implements IPropertySheetPage, ILabelProviderListener

A property sheet page that provides a tabbed UI.


Field Summary
protected  IStructuredContentProvider tabListContentProvider
           
 
Constructor Summary
TabbedPropertySheetPage(ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor)
          create a new tabbed property sheet page.
 
Method Summary
 void addTabSelectionListener(ITabSelectionListener listener)
          Add a tab selection listener.
 void createControl(Composite parent)
          Creates the SWT control for this page under the given parent control.
 void dispose()
          Disposes of this page.
 Control getControl()
          Returns the SWT control for this page.
 org.eclipse.ui.internal.views.properties.tabbed.view.Tab getCurrentTab()
          Get the currently active tab.
protected  IStructuredContentProvider getTabListContentProvider()
          Gets the tab list content provider for the contributor.
 TabbedPropertySheetWidgetFactory getWidgetFactory()
          Get the widget factory.
protected  void handlePartActivated(IWorkbenchPart part)
          Handle the part activated event.
 void labelProviderChanged(LabelProviderChangedEvent event)
          Notifies this listener that the state of the label provider has changed in a way that affects the labels it computes.
 void refresh()
          Refresh the currently active tab.
 void removeTabSelectionListener(ITabSelectionListener listener)
          Remove a tab selection listener.
 void selectionChanged(IWorkbenchPart part, ISelection selection)
          Notifies this listener that the selection has changed.
 void setActionBars(IActionBars actionBars)
          Allows the page to make contributions to the given action bars.
 void setFocus()
          Asks this page to take focus within its pagebook view.
protected  void updateTabs(org.eclipse.ui.internal.views.properties.tabbed.view.TabDescriptor[] descriptors)
          Update the current tabs to represent the given input object.
 
Methods inherited from class org.eclipse.ui.part.Page
getSite, init, makeContributions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tabListContentProvider

protected IStructuredContentProvider tabListContentProvider
Constructor Detail

TabbedPropertySheetPage

public TabbedPropertySheetPage(ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor)
create a new tabbed property sheet page.

Parameters:
tabbedPropertySheetPageContributor - the tabbed property sheet page contributor.
Method Detail

handlePartActivated

protected void handlePartActivated(IWorkbenchPart part)
Handle the part activated event.

Parameters:
part - the new activated part.

createControl

public void createControl(Composite parent)
Description copied from interface: IPage
Creates the SWT control for this page under the given parent control.

Clients should not call this method (the workbench calls this method when it needs to, which may be never).

Specified by:
createControl in interface IPage
Specified by:
createControl in class Page
See Also:
IPage.createControl(org.eclipse.swt.widgets.Composite)

getTabListContentProvider

protected IStructuredContentProvider getTabListContentProvider()
Gets the tab list content provider for the contributor.

Returns:
the tab list content provider for the contributor.

dispose

public void dispose()
Description copied from interface: IPage
Disposes of this page.

This is the last method called on the IPage. Implementors should clean up any resources associated with the page.

Callers of this method should ensure that the page's control (if it exists) has been disposed before calling this method. However, for backward compatibilty, implementors must also ensure that the page's control has been disposed before this method returns.

Note that there is no guarantee that createControl() has been called, so the control may never have been created.

Specified by:
dispose in interface IPage
Overrides:
dispose in class Page
See Also:
IPage.dispose()

getControl

public Control getControl()
Description copied from interface: IPage
Returns the SWT control for this page.

Specified by:
getControl in interface IPage
Specified by:
getControl in class Page
See Also:
IPage.getControl()

setActionBars

public void setActionBars(IActionBars actionBars)
Description copied from interface: IPage
Allows the page to make contributions to the given action bars. The contributions will be visible when the page is visible.

This method is automatically called shortly after createControl is called

Specified by:
setActionBars in interface IPage
Overrides:
setActionBars in class Page
See Also:
IPage.setActionBars(org.eclipse.ui.IActionBars)

setFocus

public void setFocus()
Description copied from interface: IPage
Asks this page to take focus within its pagebook view.

Specified by:
setFocus in interface IPage
Specified by:
setFocus in class Page
See Also:
IPage.setFocus()

selectionChanged

public void selectionChanged(IWorkbenchPart part,
                             ISelection selection)
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
selection - the current selection. This may be null if INullSelectionListener is implemented.
See Also:
ISelectionListener.selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)

updateTabs

protected void updateTabs(org.eclipse.ui.internal.views.properties.tabbed.view.TabDescriptor[] descriptors)
Update the current tabs to represent the given input object. When tabs apply for both the old and new input they are reused otherwise they are disposed. If the current visible tab will not be reused (i.e. will be disposed) we have to send it an aboutToBeHidden() message.


refresh

public void refresh()
Refresh the currently active tab.


getCurrentTab

public org.eclipse.ui.internal.views.properties.tabbed.view.Tab getCurrentTab()
Get the currently active tab.

Returns:
the currently active tab.

addTabSelectionListener

public void addTabSelectionListener(ITabSelectionListener listener)
Add a tab selection listener.

Parameters:
listener - a tab selection listener.

removeTabSelectionListener

public void removeTabSelectionListener(ITabSelectionListener listener)
Remove a tab selection listener.

Parameters:
listener - a tab selection listener.

getWidgetFactory

public TabbedPropertySheetWidgetFactory getWidgetFactory()
Get the widget factory.

Returns:
the widget factory.

labelProviderChanged

public void labelProviderChanged(LabelProviderChangedEvent event)
Description copied from interface: ILabelProviderListener
Notifies this listener that the state of the label provider has changed in a way that affects the labels it computes.

A typical response would be to refresh all labels by re-requesting them from the label provider.

Specified by:
labelProviderChanged in interface ILabelProviderListener
Parameters:
event - the label provider change event
See Also:
ILabelProviderListener.labelProviderChanged(org.eclipse.jface.viewers.LabelProviderChangedEvent)

Eclipse Platform
Release 3.3

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.