Class PropertySheetPage
- All Implemented Interfaces:
- EventListener,- IAdaptable,- ISelectionListener,- IPage,- IPageBookViewPage,- IPropertySheetPage
This page obtains the information about what properties to display from the current selection (which it tracks).
 The model for this page is a hierarchy of IPropertySheetEntry.
 The page may be configured with a custom model by setting the root entry.
 
 If no root entry is set then a default model is created which uses the
 IPropertySource interface to obtain the properties of
 the current selection. This requires that the selected objects provide an
 IPropertySource adapter (or implement
 IPropertySource directly). This restiction can be overcome
 by providing this page with an IPropertySourceProvider. If
 supplied, this provider will be used by the default model to obtain a
 property source for the current selection
 
This class may be instantiated; it is not intended to be subclassed.
- See Also:
- Restriction:
- This class is not intended to be subclassed by clients.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringHelp context id (value"org.eclipse.ui.property_sheet_page_help_context").
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcreateControl(Composite parent) Creates the SWT control for this page under the given parent control.voiddispose()ThePropertySheetPageimplementation of thisIPagemethod disposes of this page's entries.<T> TgetAdapter(Class<T> adapter) ThePropertySheetPageimplementation of thisIAdaptablemethod handles theISaveablePartadapter by delegating to the source part.ThePageimplementation of thisIPagemethod returnsnull.protected ISaveablePartReturns anISaveablePartthat delegates to the source part for the current page if it implementsISaveablePart, ornullotherwise.voidhandleEntrySelection(ISelection selection) Handles a selection change in the entry table.protected voidAdds drag and drop support.voidmakeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) This method exists for backward compatibility.voidrefresh()Updates the model for the viewer.voidselectionChanged(IWorkbenchPart part, ISelection selection) Notifies this listener that the selection has changed.voidsetActionBars(IActionBars actionBars) ThePropertySheetPageimplementation of thisIPagemethod callsmakeContributionsfor backwards compatibility with previous versions ofIPage.voidsetFocus()Sets focus to a part in the page.voidsetPropertySourceProvider(IPropertySourceProvider newProvider) Sets the given property source provider as the property source provider.voidsetRootEntry(IPropertySheetEntry entry) Sets the given entry as the model for the page.protected voidsetSorter(PropertySheetSorter sorter) Sets the sorter used for sorting categories and entries in the viewer of this page.
- 
Field Details- 
HELP_CONTEXT_PROPERTY_SHEET_PAGEHelp context id (value"org.eclipse.ui.property_sheet_page_help_context").- See Also:
 
 
- 
- 
Constructor Details- 
PropertySheetPagepublic PropertySheetPage()Creates a new property sheet page.
 
- 
- 
Method Details- 
createControlDescription copied from interface:IPageCreates 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:
- createControlin interface- IPage
- Specified by:
- createControlin class- Page
- Parameters:
- parent- the parent control
 
- 
disposepublic void dispose()ThePropertySheetPageimplementation of thisIPagemethod disposes of this page's entries.
- 
getAdapterThePropertySheetPageimplementation of thisIAdaptablemethod handles theISaveablePartadapter by delegating to the source part.- Specified by:
- getAdapterin interface- IAdaptable
- Type Parameters:
- T- the class type
- Parameters:
- adapter- the adapter class to look up
- Returns:
- a object of the given class, or nullif this object does not have an adapter for the given class
- Since:
- 3.2
 
- 
getSaveablePartReturns anISaveablePartthat delegates to the source part for the current page if it implementsISaveablePart, ornullotherwise.- Returns:
- an ISaveablePartornull
- Since:
- 3.2
 
- 
getControlDescription copied from class:PageThePageimplementation of thisIPagemethod returnsnull. Subclasses must reimplement.- Specified by:
- getControlin interface- IPage
- Specified by:
- getControlin class- Page
- Returns:
- the SWT control for this page, or nullif this page does not have a control
 
- 
handleEntrySelectionHandles a selection change in the entry table.- Parameters:
- selection- the new selection
 
- 
initDragAndDropprotected void initDragAndDrop()Adds drag and drop support.
- 
makeContributionspublic void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) Description copied from class:PageThis method exists for backward compatibility. Subclasses should reimplementinit.- Overrides:
- makeContributionsin class- Page
 
- 
refreshpublic void refresh()Updates the model for the viewer.Note that this means ensuring that the model reflects the state of the current viewer input. 
- 
selectionChangedDescription copied from interface:ISelectionListenerNotifies this listener that the selection has changed.Note: it is important that this method returns as quickly as possible to avoid UI freezes. For example, do not update the UI if the UI is not visible. See the SelectionListenerFactoryfor listeners that are build for this purpose.This method is called when the selection changes to a non-nullvalue, but not when the selection changes tonull. If there is a requirement to be notified in the latter scenario, implementINullSelectionListener. The event will be posted through this method.- Specified by:
- selectionChangedin interface- ISelectionListener
- Parameters:
- part- the workbench part containing the selection
- selection- the current selection. This may be- nullif- INullSelectionListeneris implemented.
- See Also:
 
- 
setActionBarsThePropertySheetPageimplementation of thisIPagemethod callsmakeContributionsfor backwards compatibility with previous versions ofIPage.Subclasses may reimplement. - Specified by:
- setActionBarsin interface- IPage
- Overrides:
- setActionBarsin class- Page
- Parameters:
- actionBars- the action bars for this page
 
- 
setFocuspublic void setFocus()Sets focus to a part in the page.
- 
setPropertySourceProviderSets the given property source provider as the property source provider.Calling this method is only valid if you are using this page's default root entry. - Parameters:
- newProvider- the property source provider
 
- 
setRootEntrySets the given entry as the model for the page.- Parameters:
- entry- the root entry
 
- 
setSorterSets the sorter used for sorting categories and entries in the viewer of this page.The default sorter sorts categories and entries alphabetically. - Parameters:
- sorter- the sorter to set (- nullwill reset to the default sorter)
- Since:
- 3.1
 
 
-