|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.IntroPart
public abstract class IntroPart
Abstract base implementation of an intro part.
Subclasses must implement the following methods:
createPartControl- to create the intro part's controls
setFocus- to accept focusstandbyStateChanged- to change the standby modeSubclasses may extend or reimplement the following methods as required:
setInitializationData- extend to provide additional
initialization when the intro extension is instantiatedinit(IIntroSite, IMemento)- extend to provide additional
initialization when intro is assigned its sitedispose- extend to provide additional cleanupgetAdapter- reimplement to make their intro adaptable
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.ui.intro.IIntroPart |
|---|
PROP_TITLE |
| Constructor Summary | |
|---|---|
protected |
IntroPart()
Creates a new intro part. |
| Method Summary | |
|---|---|
void |
addPropertyListener(IPropertyListener l)
Adds a listener for changes to properties of this intro part. |
abstract void |
createPartControl(Composite parent)
Creates the SWT controls for this intro part. |
void |
dispose()
The IntroPart implementation of this
IIntroPart method disposes the title image loaded by
setInitializationData. |
protected void |
firePropertyChange(int propertyId)
Fires a property changed event. |
java.lang.Object |
getAdapter(java.lang.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. |
IIntroSite |
getIntroSite()
Returns the site for this intro part. |
java.lang.String |
getTitle()
Returns the title of this intro part. |
Image |
getTitleImage()
Returns the title image of this intro part. |
void |
init(IIntroSite site,
IMemento memento)
The base implementation of this IIntroPartmethod ignores the
memento and initializes the part in a fresh state. |
void |
removePropertyListener(IPropertyListener l)
Removes the given property listener from this intro part. |
void |
saveState(IMemento memento)
The base implementation of this IIntroPart method does nothing. |
abstract void |
setFocus()
Asks this part to take focus within the workbench. |
void |
setInitializationData(IConfigurationElement cfig,
java.lang.String propertyName,
java.lang.Object data)
The IntroPart implementation of this
IExecutableExtension records the configuration element in
and internal state variable (accessible via getConfigElement). |
protected void |
setSite(IIntroSite site)
Sets the part site. |
protected void |
setTitle(java.lang.String titleLabel)
Set the title string for this part. |
protected void |
setTitleImage(Image titleImage)
Sets or clears the title image of this part. |
| 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.intro.IIntroPart |
|---|
standbyStateChanged |
| Constructor Detail |
|---|
protected IntroPart()
| Method Detail |
|---|
public void addPropertyListener(IPropertyListener l)
IIntroPartThe properties ids are as follows:
IIntroPart.PROP_TITLE
addPropertyListener in interface IIntroPartl - a property listenerpublic abstract void createPartControl(Composite parent)
IIntroPartClients 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 IIntroPartparent - the parent controlpublic void dispose()
IntroPart implementation of this
IIntroPart method disposes the title image loaded by
setInitializationData. Subclasses may extend.
dispose in interface IIntroPartprotected void firePropertyChange(int propertyId)
propertyId - the id of the property that changedpublic java.lang.Object getAdapter(java.lang.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 final IIntroSite getIntroSite()
IIntroPart
getIntroSite in interface IIntroPartpublic Image getTitleImage()
IIntroPartIIntroPart.PROP_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 IIntroPartpublic java.lang.String getTitle()
IIntroPartIIntroPart.PROP_TITLE.
The title is used to populate the title bar of this part's visual container.
getTitle in interface IIntroPartnull)
public void init(IIntroSite site,
IMemento memento)
throws PartInitException
IIntroPartmethod ignores the
memento and initializes the part in a fresh state. Subclasses may extend
to perform any state restoration, but must call the super method.
init in interface IIntroPartsite - the intro sitememento - the intro part state or null if there is no
previous saved state
PartInitException - if this part was not initialized successfullyprotected void setSite(IIntroSite site)
Subclasses must invoke this method from IIntroPart.init(IIntroSite, IMemento).
site - the intro part sitepublic void removePropertyListener(IPropertyListener l)
IIntroPart
removePropertyListener in interface IIntroPartl - a property listenerpublic void saveState(IMemento memento)
IIntroPart method does nothing.
Subclasses may override.
saveState in interface IIntroPartmemento - a memento to receive the object statepublic abstract void setFocus()
IIntroPart
Clients should not call this method (the workbench calls this method at
appropriate times). To have the workbench activate a part, use
IIntroManager.showIntro(IWorkbenchWindow, boolean).
setFocus in interface IIntroPart
public void setInitializationData(IConfigurationElement cfig,
java.lang.String propertyName,
java.lang.Object data)
IntroPart 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(String)protected void setTitleImage(Image titleImage)
titleImage - the title image, or null to clearprotected void setTitle(java.lang.String titleLabel)
titleLabel - the title string. Must not be null.
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.