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 PropertySheet


java.lang.Object
  extended by 

org.eclipse.core.commands.common.EventManager
      extended by 

org.eclipse.ui.part.WorkbenchPart
          extended by 

org.eclipse.ui.part.ViewPart
              extended by 

org.eclipse.ui.part.PageBookView
                  extended by 
org.eclipse.ui.views.properties.PropertySheet
All Implemented Interfaces:
EventListener, IAdaptable, IExecutableExtension, IPartListener, IPersistable, ISelectionListener, IViewPart, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, IShowInSource, IShowInTarget, IWorkbenchPartOrientation

public class PropertySheet
extends PageBookView
implements ISelectionListener, IShowInTarget, IShowInSource

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 IPropertySheetPages.

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

Nested Class Summary
 
Nested classes/interfaces 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.
protected   ISaveablePart getSaveablePart ()
          Returns an ISaveablePart that delegates to the source part for the current page if it implements ISaveablePart, or null otherwise.
  ShowInContext getShowInContext ()
          Returns the context to show, or null if there is currently no valid context to show.
protected   Object getViewAdapter ( Class key)
          The PropertySheet implementation of this PageBookView method handles the ISaveablePart adapter case by calling getSaveablePart().
 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.
 boolean isPinned ()
           
 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 partClosed ( IWorkbenchPart part)
          The PageBookView implementation of this IPartListener method deal with the closing of the active part.
protected  void partHidden ( IWorkbenchPart part)
          Make sure that the part is not considered if it is hidden.
protected  void partVisible ( IWorkbenchPart part)
          Make sure that the part is not considered if it is hidden.
 void saveState ( IMemento memento)
          Saves the object state within a memento.
 void selectionChanged ( IWorkbenchPart part, ISelection sel)
          Notifies this listener that the selection has changed.
 void setPinned (boolean pinned)
           
 boolean show ( ShowInContext aContext)
          Shows the given context in this target.
 
Methods inherited from class org.eclipse.ui.part. PageBookView
doesPageExist, getAdapter, getCurrentContributingPart, getCurrentPage, getDefaultPage, getPageBook, getPageRec, getPageRec, getPageSite, getSelectionProvider, initPage, partBroughtToTop, partDeactivated, partOpened, setFocus, showPageRec
 
Methods inherited from class org.eclipse.ui.part. ViewPart
checkSite, getViewSite, init, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part. WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common. EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
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
Parameters:
parent - the parent control

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
Parameters:
site - the view site
Throws:
PartInitException - if this view was not initialized successfully

saveState

public void saveState(
IMemento memento)
Description copied from interface: IViewPart
Saves the object state within a memento.

Specified by:
saveState in interface IPersistable
Specified by:
saveState in interface IViewPart
Overrides:
saveState in class ViewPart
Parameters:
memento - a memento to receive the object state

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

partClosed

public void partClosed(
IWorkbenchPart part)
Description copied from class: PageBookView
The PageBookView implementation of this IPartListener method deal with the closing of the active part. Subclasses may extend.

Specified by:
partClosed in interface IPartListener
Overrides:
partClosed in class PageBookView
Parameters:
part - the part that was closed
See Also:
IWorkbenchPage.hideView(IViewPart)

partVisible

protected void partVisible(
IWorkbenchPart part)
Description copied from class: PageBookView
Make sure that the part is not considered if it is hidden.

Overrides:
partVisible in class PageBookView

partHidden

protected void partHidden(
IWorkbenchPart part)
Description copied from class: PageBookView
Make sure that the part is not considered if it is hidden.

Overrides:
partHidden in class PageBookView

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
Parameters:
part - the part that was activated
See Also:
IWorkbenchPage.activate(org.eclipse.ui.IWorkbenchPart)

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.

getViewAdapter

protected 
Object getViewAdapter(
Class key)
The PropertySheet implementation of this PageBookView method handles the ISaveablePart adapter case by calling getSaveablePart().

Overrides:
getViewAdapter in class PageBookView
Parameters:
key - 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

isPinned

public boolean isPinned()
Returns:
whether this property sheet is currently pinned
Since:
3.4

getShowInContext

public 
ShowInContext getShowInContext()
Returns the context to show, or null if there is currently no valid context to show.

Specified by:
getShowInContext in interface IShowInSource
Returns:
the context to show, or null
Since:
3.4

show

public boolean show(
ShowInContext aContext)
Shows the given context in this target. The target should check the context's selection for elements to show. If there are no relevant elements in the selection, then it should check the context's input.

Specified by:
show in interface IShowInTarget
Parameters:
aContext - the context to show
Returns:
true if the context could be shown, false otherwise
Since:
3.4

setPinned

public void setPinned(boolean pinned)
Parameters:
pinned - Whether this sheet should be pinned
Since:
3.4

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