|
Eclipse Platform 2.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.eclipse.ui.part.WorkbenchPart
Abstract base implementation of all workbench parts.
This class is not intended to be subclassed by clients outside this
package; clients should instead subclass ViewPart or
EditorPart.
ViewPart,
EditorPart| Field Summary |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
| Constructor Summary | |
protected |
WorkbenchPart()
Creates a new workbench part. |
| Method Summary | |
void |
addPropertyListener(IPropertyListener l)
Adds a listener for changes to properties of this workbench part. |
abstract void |
createPartControl(Composite parent)
Creates the SWT controls for this workbench part. |
void |
dispose()
The WorkbenchPart implementation of this
IWorkbenchPart method disposes the title image
loaded by setInitializationData. |
protected void |
firePropertyChange(int propertyId)
Fires a property changed event. |
Object |
getAdapter(Class adapter)
This implementation of the method declared by IAdaptable
passes the request along to the platform's adapter manager; roughly
Platform.getAdapterManager().getAdapter(this, adapter). |
protected IConfigurationElement |
getConfigurationElement()
Returns the configuration element for this part. |
protected Image |
getDefaultImage()
Returns the default title image. |
IWorkbenchPartSite |
getSite()
Returns the site for this workbench part. |
String |
getTitle()
Returns the title of this workbench part. |
Image |
getTitleImage()
Returns the title image of this workbench part. |
String |
getTitleToolTip()
Returns the title tool tip text of this workbench part. |
void |
removePropertyListener(IPropertyListener l)
Removes the given property listener from this workbench part. |
abstract void |
setFocus()
Asks this part to take focus within the workbench. |
void |
setInitializationData(IConfigurationElement cfig,
String propertyName,
Object data)
The WorkbenchPart implementation of this
IExecutableExtension records the configuration element in
and internal state variable (accessible via getConfigElement). |
protected void |
setSite(IWorkbenchPartSite site)
Sets the part site. |
protected void |
setTitle(String title)
Sets or clears the title of this part. |
protected void |
setTitleImage(Image titleImage)
Sets or clears the title image of this part. |
protected void |
setTitleToolTip(String text)
Sets or clears the title tool tip text of this part. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected WorkbenchPart()
| Method Detail |
public void addPropertyListener(IPropertyListener l)
IWorkbenchPartThe properties ids are as follows:
IWorkbenchPart.PROP_TITLE IEditorPart.PROP_INPUT IEditorPart.PROP_DIRTY
addPropertyListener in interface IWorkbenchPartl - a property listenerpublic abstract void createPartControl(Composite parent)
IWorkbenchPartClients should not call this method (the workbench calls this method when it needs to, which may be never).
For implementors this is a multi-step process:
IActionService.IActionService.ISelectionService
(optional).
createPartControl in interface IWorkbenchPartparent - the parent controlpublic void dispose()
WorkbenchPart implementation of this
IWorkbenchPart method disposes the title image
loaded by setInitializationData. Subclasses may extend.
dispose in interface IWorkbenchPartprotected void firePropertyChange(int propertyId)
propertyId - the id of the property that changedpublic Object getAdapter(Class adapter)
IAdaptable
passes the request along to the platform's adapter manager; roughly
Platform.getAdapterManager().getAdapter(this, adapter).
Subclasses may override this method (however, if they do so, they
should invoke the method on their superclass to ensure that the
Platform's adapter manager is consulted).
getAdapter in interface IAdaptableadapter - the adapter class to look up
null if this object does not
have an adapter for the given classprotected IConfigurationElement getConfigurationElement()
protected Image getDefaultImage()
public IWorkbenchPartSite getSite()
IWorkbenchPart
getSite in interface IWorkbenchPartpublic String getTitle()
IWorkbenchPartPROP_TITLE.
The title is used to populate the title bar of this part's visual container.
getTitle in interface IWorkbenchPartpublic Image getTitleImage()
IWorkbenchPartPROP_TITLE.
The title image is usually used to populate the title bar of this part's visual container. Since this image is managed by the part itself, callers must not dispose the returned image.
getTitleImage in interface IWorkbenchPartpublic String getTitleToolTip()
IWorkbenchPartPROP_TITLE.
The tool tip text is used to populate the title bar of this part's visual container.
getTitleToolTip in interface IWorkbenchPartpublic void removePropertyListener(IPropertyListener l)
IWorkbenchPart
removePropertyListener in interface IWorkbenchPartl - a property listenerpublic abstract void setFocus()
IWorkbenchPartClients should not call this method (the workbench calls this method at appropriate times).
setFocus in interface IWorkbenchPart
public void setInitializationData(IConfigurationElement cfig,
String propertyName,
Object data)
WorkbenchPart implementation of this
IExecutableExtension records the configuration element in
and internal state variable (accessible via getConfigElement).
It also loads the title image, if one is specified in the configuration element.
Subclasses may extend.
Should not be called by clients. It is called by the core plugin when creating
this executable extension.
setInitializationData in interface IExecutableExtensioncfig - the configuration element used to trigger this execution.
It can be queried by the executable extension for specific
configuration propertiespropertyName - the name of an attribute of the configuration element
used on the createExecutableExtension(String) call. This
argument can be used in the cases where a single configuration element
is used to define multiple executable extensions.data - adapter data in the form of a String,
a Hashtable, or null.IConfigurationElement.createExecutableExtension(java.lang.String)protected void setSite(IWorkbenchPartSite site)
Subclasses must invoke this method from IEditorPart.init
and IViewPart.init.
site - the workbench part siteprotected void setTitle(String title)
title - the title, or null to clearprotected void setTitleImage(Image titleImage)
titleImage - the title image, or null to clearprotected void setTitleToolTip(String text)
text - the new tool tip text
|
Eclipse Platform 2.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||