public interface IIntroPart extends IAdaptable
The intro part implementation is contributed to the workbench via the
org.eclipse.ui.intro
extension point. There can be several
intro part implementations, and associations between intro part
implementations and products. The workbench will only make use of the intro
part implementation for the current product (as given by
Platform.getProduct()
. There is at most one
intro part instance in the entire workbench, and it resides in exactly one
workbench window at a time.
This interface in not intended to be directly implemented. Rather, clients
providing a intro part implementation should subclass
IntroPart
.
IIntroManager.showIntro(org.eclipse.ui.IWorkbenchWindow, boolean)
Modifier and Type | Field and Description |
---|---|
static int |
PROP_TITLE
The property id for
getTitleImage and
getTitle . |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyListener(IPropertyListener listener)
Adds a listener for changes to properties of this intro part.
|
void |
createPartControl(Composite parent)
Creates the SWT controls for this intro part.
|
void |
dispose()
Disposes of this intro part.
|
IIntroSite |
getIntroSite()
Returns the site for this intro part.
|
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)
Initializes this intro part with the given intro site.
|
void |
removePropertyListener(IPropertyListener listener)
Removes the given property listener from this intro part.
|
void |
saveState(IMemento memento)
Saves the object state within a memento.
|
void |
setFocus()
Asks this part to take focus within the workbench.
|
void |
standbyStateChanged(boolean standby)
Sets the standby state of this intro part.
|
getAdapter
static final int PROP_TITLE
getTitleImage
and
getTitle
.getTitle
in
addition to getTitleImage
IIntroSite getIntroSite()
void init(IIntroSite site, IMemento memento) throws PartInitException
This method is automatically called by the workbench shortly after part construction. It marks the start of the intro's lifecycle. Clients must not call this method.
site
- the intro sitememento
- the intro part state or null
if there is no previous
saved statePartInitException
- if this part was not initialized
successfullyvoid standbyStateChanged(boolean standby)
This method is automatically called by the workbench at appropriate
times. Clients must not call this method directly (call
IIntroManager.setIntroStandby(IIntroPart, boolean)
instead.
standby
- true
to put this part in its partially
visible standy mode, and false
to make it fully visiblevoid saveState(IMemento memento)
This method is automatically called by the workbench at appropriate times. Clients must not call this method directly.
memento
- a memento to receive the object statevoid addPropertyListener(IPropertyListener listener)
The properties ids are as follows:
IIntroPart.PROP_TITLE
listener
- a property listenervoid createPartControl(Composite parent)
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). parent
- the parent controlvoid dispose()
This is the last method called on the IIntroPart
. At this
point the part controls (if they were ever created) have been disposed as part
of an SWT composite. There is no guarantee that createPartControl() has been
called, so the part controls may never have been created.
Within this method a part may release any resources, fonts, images, etc. held by this part. It is also very important to deregister all listeners from the workbench.
Clients should not call this method (the workbench calls this method at appropriate times).
Image getTitleImage()
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.
String getTitle()
PROP_TITLE
.
The title is used to populate the title bar of this part's visual container.
null
)void removePropertyListener(IPropertyListener listener)
listener
- a property listenervoid setFocus()
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)
.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.