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.properties
Class PropertySheetPage


java.lang.Object
  extended by 

org.eclipse.ui.part.Page
      extended by 
org.eclipse.ui.views.properties.PropertySheetPage
All Implemented Interfaces:
EventListener, IAdaptable, ISelectionListener, IPage, IPageBookViewPage, IPropertySheetPage

public class PropertySheetPage
extends Page
implements IPropertySheetPage, IAdaptable

The standard implementation of property sheet page which presents a table of property names and values obtained from the current selection in the active workbench part.

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:
IPropertySource
Restriction:
This class is not intended to be subclassed by clients.

Field Summary
static  String HELP_CONTEXT_PROPERTY_SHEET_PAGE
          Help context id (value "org.eclipse.ui.property_sheet_page_help_context").
 
Constructor Summary
PropertySheetPage ()
          Creates a new property sheet page.
 
Method Summary
 void createControl ( Composite parent)
          Creates the SWT control for this page under the given parent control.
 void dispose ()
          The PropertySheetPage implementation of this IPage method disposes of this page's entries.
  Object getAdapter ( Class adapter)
          The PropertySheetPage implementation of this IAdaptable method handles the ISaveablePart adapter by delegating to the source part.
  Control getControl ()
          The Page implementation of this IPage method returns null.
protected   ISaveablePart getSaveablePart ()
          Returns an ISaveablePart that delegates to the source part for the current page if it implements ISaveablePart, or null otherwise.
 void handleEntrySelection ( ISelection selection)
          Handles a selection change in the entry table.
protected  void initDragAndDrop ()
          Adds drag and drop support.
 void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)
           
 void refresh ()
          Updates the model for the viewer.
 void selectionChanged ( IWorkbenchPart part, ISelection selection)
          Notifies this listener that the selection has changed.
 void setActionBars ( IActionBars actionBars)
          The PropertySheetPage implementation of this IPage method calls makeContributions for backwards compatibility with previous versions of IPage.
 void setFocus ()
          Sets focus to a part in the page.
 void setPropertySourceProvider ( IPropertySourceProvider newProvider)
          Sets the given property source provider as the property source provider.
 void setRootEntry ( IPropertySheetEntry entry)
          Sets the given entry as the model for the page.
protected  void setSorter ( PropertySheetSorter sorter)
          Sets the sorter used for sorting categories and entries in the viewer of this page.
 
Methods inherited from class org.eclipse.ui.part. Page
getSite, init
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HELP_CONTEXT_PROPERTY_SHEET_PAGE

public static final 
String HELP_CONTEXT_PROPERTY_SHEET_PAGE
Help context id (value "org.eclipse.ui.property_sheet_page_help_context").

See Also:
Constant Field Values
Constructor Detail

PropertySheetPage

public PropertySheetPage()
Creates a new property sheet page.

Method Detail

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
Parameters:
parent - the parent control

dispose

public void dispose()
The PropertySheetPage implementation of this IPage method disposes of this page's entries.

Specified by:
dispose in interface IPage
Overrides:
dispose in class Page

getAdapter

public 
Object getAdapter(
Class adapter)
The PropertySheetPage implementation of this IAdaptable method handles the ISaveablePart adapter by delegating to the source part.

Specified by:
getAdapter in interface IAdaptable
Parameters:
adapter - the adapter class to look up
Returns:
a object castable to the given class, or null if this object does not have an adapter for the given class
Since:
3.2

getSaveablePart

protected 
ISaveablePart getSaveablePart()
Returns an ISaveablePart that delegates to the source part for the current page if it implements ISaveablePart, or null otherwise.

Returns:
an ISaveablePart or null
Since:
3.2

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

handleEntrySelection

public void handleEntrySelection(
ISelection selection)
Handles a selection change in the entry table.

Parameters:
selection - the new selection

initDragAndDrop

protected void initDragAndDrop()
Adds drag and drop support.


makeContributions

public void makeContributions(
IMenuManager menuManager,
                              
IToolBarManager toolBarManager,
                              
IStatusLineManager statusLineManager)
Overrides:
makeContributions in class Page

refresh

public void refresh()
Updates the model for the viewer.

Note that this means ensuring that the model reflects the state of the current viewer input.


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.

setActionBars

public void setActionBars(
IActionBars actionBars)
The PropertySheetPage implementation of this IPage method calls makeContributions for backwards compatibility with previous versions of IPage.

Subclasses may reimplement.

Specified by:
setActionBars in interface IPage
Overrides:
setActionBars in class Page
Parameters:
actionBars - the action bars for this page

setFocus

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

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

setPropertySourceProvider

public void setPropertySourceProvider(
IPropertySourceProvider newProvider)
Sets 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

setRootEntry

public void setRootEntry(
IPropertySheetEntry entry)
Sets the given entry as the model for the page.

Parameters:
entry - the root entry

setSorter

protected void setSorter(
PropertySheetSorter sorter)
Sets 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 (null will reset to the default sorter)
Since:
3.1

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