|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.part.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. |
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. |
IIntroSite |
getIntroSite()
Returns the site for this intro part. |
Image |
getTitleImage()
Returns the title image of this intro part. |
void |
init(IIntroSite site,
IMemento memento)
The base implementation of this IIntroPart method 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,
String propertyName,
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 |
setTitleImage(Image titleImage)
Sets or clears the title image of this part. |
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)
IIntroPart
The properties ids are as follows:
IIntroPart.PROP_TITLE
addPropertyListener
in interface IIntroPart
l
- a property listenerpublic abstract void createPartControl(Composite parent)
IIntroPart
Clients 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 IIntroPart
parent
- the parent controlpublic void dispose()
IntroPart
implementation of this
IIntroPart
method disposes the title image loaded by
setInitializationData
. Subclasses may extend.
dispose
in interface IIntroPart
protected 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 IAdaptable
adapter
- 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 IIntroPart
public Image getTitleImage()
IIntroPart
IIntroPart.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 IIntroPart
public void init(IIntroSite site, IMemento memento) throws PartInitException
IIntroPart
method 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 IIntroPart
site
- 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 IIntroPart
l
- a property listenerpublic void saveState(IMemento memento)
IIntroPart
method does nothing.
Subclasses may override.
saveState
in interface IIntroPart
memento
- 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, String propertyName, 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 IExecutableExtension
cfig
- 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 clear
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.