public class TabbedPropertySheetPage extends Page implements IPropertySheetPage, ILabelProviderListener
Modifier and Type | Field and Description |
---|---|
protected IStructuredContentProvider |
tabListContentProvider |
Constructor and Description |
---|
TabbedPropertySheetPage(ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor)
create a new tabbed property sheet page.
|
TabbedPropertySheetPage(ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor,
boolean showTitleBar)
create a new tabbed property sheet page.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected TabContents |
createTab(ITabDescriptor tabDescriptor)
Create the tab contents for the provided tab descriptor.
|
void |
dispose()
The
Page implementation of this IPage method
disposes of this page's control (if it has one and it has not already
been disposed). |
protected void |
disposeContributor()
Dispose the contributor with the provided contributor id.
|
protected void |
disposeTabs(Collection tabs)
Disposes the TabContents objects passed to this method.
|
ITabDescriptor[] |
getActiveTabs()
Returns the list of currently active tabs.
|
Control |
getControl()
The
Page implementation of this IPage method returns
null . |
protected String |
getCurrentContributorId()
Get the currently active contributor id.
|
protected ISelection |
getCurrentSelection()
Get the current selection
|
TabContents |
getCurrentTab()
Get the currently active tab.
|
ITabDescriptor |
getSelectedTab()
Returns the currently selected tab.
|
protected ITabbedPropertySheetPageContributor |
getSelectionContributor()
Get the current selection-contributor if any
|
protected TabContents |
getTabContents(ITabDescriptor tabDescriptor)
Returns the TabContents object corresponding to the given tab-descriptor.
|
protected IStructuredContentProvider |
getTabListContentProvider()
Gets the tab list content provider for the contributor.
|
Image |
getTitleImage(ISelection selection)
Returns the title image for given selection.
|
String |
getTitleText(ISelection selection)
Returns text of the properties title for given selection.
|
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 |
overrideTabs()
Override the tabs with a new set of tabs.
|
void |
refresh()
Refresh the currently active tab.
|
void |
removeTabSelectionListener(ITabSelectionListener listener)
Remove a tab selection listener.
|
void |
resizeScrolledComposite()
Resize the scrolled composite enclosing the sections, which may result in the
addition or removal of scroll bars.
|
void |
selectionChanged(IWorkbenchPart part,
ISelection selection)
Notifies this listener that the selection has changed.
|
void |
setActionBars(IActionBars actionBars)
This method exists for backward compatibility.
|
void |
setFocus()
The
Page implementation of this IPage method
does nothing. |
void |
setSelectedTab(String id)
Set the currently selected tab to be that of the provided tab id.
|
protected void |
updateTabs(ITabDescriptor[] descriptors)
Update the current tabs to represent the given input object.
|
getSite, init, makeContributions
protected IStructuredContentProvider tabListContentProvider
public TabbedPropertySheetPage(ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor)
tabbedPropertySheetPageContributor
- the tabbed property sheet page contributor.public TabbedPropertySheetPage(ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor, boolean showTitleBar)
tabbedPropertySheetPageContributor
- the tabbed property sheet page contributor.showTitleBar
- boolean indicating if the title bar should be shown;
default value is true
protected void handlePartActivated(IWorkbenchPart part)
part
- the new activated part.public void createControl(Composite parent)
IPage
Clients should not call this method (the workbench calls this method when it needs to, which may be never).
createControl
in interface IPage
createControl
in class Page
parent
- the parent controlIPage.createControl(org.eclipse.swt.widgets.Composite)
protected IStructuredContentProvider getTabListContentProvider()
protected void disposeContributor()
public void dispose()
Page
Page
implementation of this IPage
method
disposes of this page's control (if it has one and it has not already
been disposed). Subclasses may extend.dispose
in interface IPage
dispose
in class Page
IPage.dispose()
public Control getControl()
Page
Page
implementation of this IPage
method returns
null
. Subclasses must reimplement.getControl
in interface IPage
getControl
in class Page
null
if this
page does not have a controlIPage.getControl()
public void setActionBars(IActionBars actionBars)
Page
init
.setActionBars
in interface IPage
setActionBars
in class Page
actionBars
- the action bars for this pageIPage.setActionBars(org.eclipse.ui.IActionBars)
public void setFocus()
Page
Page
implementation of this IPage
method
does nothing. Subclasses must implement.setFocus
in interface IPage
setFocus
in class Page
IPage.setFocus()
public void selectionChanged(IWorkbenchPart part, ISelection selection)
ISelectionListener
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.
selectionChanged
in interface ISelectionListener
part
- the workbench part containing the selectionselection
- the current selection. This may be null
if INullSelectionListener
is implemented.ISelectionListener.selectionChanged(org.eclipse.ui.IWorkbenchPart,
org.eclipse.jface.viewers.ISelection)
public void resizeScrolledComposite()
protected void disposeTabs(Collection tabs)
tabs
- protected void updateTabs(ITabDescriptor[] descriptors)
protected TabContents createTab(ITabDescriptor tabDescriptor)
tabDescriptor
- the tab descriptor.public void refresh()
public TabContents getCurrentTab()
public void addTabSelectionListener(ITabSelectionListener listener)
listener
- a tab selection listener.public void removeTabSelectionListener(ITabSelectionListener listener)
listener
- a tab selection listener.public void overrideTabs()
AbstractOverridableTabListPropertySection
by the
IOverridableTabListContentProvider
.public TabbedPropertySheetWidgetFactory getWidgetFactory()
public void labelProviderChanged(LabelProviderChangedEvent event)
ILabelProviderListener
A typical response would be to refresh all labels by re-requesting them from the label provider.
labelProviderChanged
in interface ILabelProviderListener
event
- the label provider change eventILabelProviderListener.labelProviderChanged(org.eclipse.jface.viewers.LabelProviderChangedEvent)
public ITabDescriptor getSelectedTab()
null
if there is no
tab selected.public ITabDescriptor[] getActiveTabs()
public void setSelectedTab(String id)
id
- The string id of the tab to select.public String getTitleText(ISelection selection)
selection
- Selection whose properties title text is to be returnedpublic Image getTitleImage(ISelection selection)
selection
- Selection whose properties title image is to be returnedprotected TabContents getTabContents(ITabDescriptor tabDescriptor)
tabDescriptor
- tab-descriptor whose TabContents object is to be returnedprotected ITabbedPropertySheetPageContributor getSelectionContributor()
protected String getCurrentContributorId()
protected ISelection getCurrentSelection()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.