org.eclipse.ui.presentations
Interface IPresentablePart
-
All Superinterfaces:
-
ISizeProvider
-
public interface IPresentablePart
- extends
ISizeProvider
This is a skin's interface to the contents of a view or editor. Note that this
is essentially the same as IWorkbenchPart, except it does not provide access
to lifecycle events and allows repositioning of the part.
Not intended to be implemented by clients.
-
Since:
- 3.0, 3.4 now extends
ISizeProvider
-
Restriction:
- This interface is not intended to be implemented by clients.
Field Summary
|
static int
|
PROP_BUSY
The property id for isBusy . |
static int
|
PROP_CONTENT_DESCRIPTION
The property id for IWorkbenchPart2.getContentDescription()
|
static int
|
PROP_DIRTY
The property id for isDirty . |
static int
|
PROP_HIGHLIGHT_IF_BACK
The property id for highlighting the
part if it is not in front. |
static int
|
PROP_INPUT
The property id for getEditorInput . |
static int
|
PROP_PANE_MENU
The property id for pane menu changes |
static int
|
PROP_PART_NAME
The property id for IWorkbenchPart2.getContentDescription()
|
static int
|
PROP_PREFERRED_SIZE
The property id for preferred size changes |
static int
|
PROP_TITLE
The property id for getTitle , getTitleImage
and getTitleToolTip . |
static int
|
PROP_TOOLBAR
The property id for toolbar changes |
PROP_DIRTY
static final int PROP_DIRTY
- The property id for
isDirty
.
-
See Also:
-
Constant Field Values
PROP_INPUT
static final int PROP_INPUT
- The property id for
getEditorInput
.
-
See Also:
-
Constant Field Values
PROP_TITLE
static final int PROP_TITLE
- The property id for
getTitle
, getTitleImage
and getTitleToolTip
.
-
See Also:
-
Constant Field Values
PROP_CONTENT_DESCRIPTION
static final int PROP_CONTENT_DESCRIPTION
- The property id for
IWorkbenchPart2.getContentDescription()
-
See Also:
-
Constant Field Values
PROP_PART_NAME
static final int PROP_PART_NAME
- The property id for
IWorkbenchPart2.getContentDescription()
-
See Also:
-
Constant Field Values
PROP_BUSY
static final int PROP_BUSY
- The property id for
isBusy
.
-
See Also:
-
Constant Field Values
PROP_TOOLBAR
static final int PROP_TOOLBAR
- The property id for toolbar changes
-
See Also:
-
Constant Field Values
PROP_HIGHLIGHT_IF_BACK
static final int PROP_HIGHLIGHT_IF_BACK
- The property id for highlighting the
part if it is not in front.
-
See Also:
-
Constant Field Values
PROP_PANE_MENU
static final int PROP_PANE_MENU
- The property id for pane menu changes
-
See Also:
-
Constant Field Values
PROP_PREFERRED_SIZE
static final int PROP_PREFERRED_SIZE
- The property id for preferred size changes
-
Since:
- 3.4
-
See Also:
-
Constant Field Values
setBounds
void setBounds(
Rectangle bounds)
- Sets the bounds of this part.
-
-
-
Parameters:
-
bounds
- bounding rectangle (not null)
setVisible
void setVisible(boolean isVisible)
- Notifies the part whether or not it is visible in the current
perspective. A part is visible iff any part of its widgetry can
be seen.
-
-
-
Parameters:
-
isVisible
- true if the part has just become visible, false
if the part has just become hidden
setFocus
void setFocus()
- Forces this part to have focus.
-
-
addPropertyListener
void addPropertyListener(
IPropertyListener listener)
- Adds a listener for changes to properties of this workbench part.
Has no effect if an identical listener is already registered.
The properties ids are defined by the PROP_* constants, above.
-
-
-
Parameters:
-
listener
- a property listener (not null)
removePropertyListener
void removePropertyListener(
IPropertyListener listener)
- Remove a listener that was previously added using addPropertyListener.
-
-
-
Parameters:
-
listener
- a property listener (not null)
getName
String getName()
- Returns the short name of the part. This is used as the text on
the tab when this part is stacked on top of other parts.
-
-
-
Returns:
- the short name of the part (not null)
getTitle
String getTitle()
- Returns the title of this workbench part. If this value changes
the part must fire a property listener event with
PROP_TITLE
.
The title is used to populate the title bar of this part's visual
container.
-
-
-
Returns:
- the workbench part title (not null)
getTitleStatus
String getTitleStatus()
- Returns the status message from the part's title, or the empty string if none.
This is a substring of the part's title. A typical title will consist of
the part name, a separator, and a status message describing the current contents.
Presentations can query getName() and getTitleStatus() if they want to display
the status message and name separately, or they can use getTitle() if they want
to display the entire title.
-
-
-
Returns:
- the status message or the empty string if none (not null)
getTitleImage
Image getTitleImage()
- Returns the title image of this workbench part. If this value changes
the part must fire a property listener event with
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.
-
-
-
Returns:
- the title image
getTitleToolTip
String getTitleToolTip()
- Returns the title tool tip text of this workbench part. If this value
changes the part must fire a property listener event with
PROP_TITLE
.
The tool tip text is used to populate the title bar of this part's
visual container.
-
-
-
Returns:
- the workbench part title tool tip (not null)
isDirty
boolean isDirty()
- Returns true iff the contents of this part have changed recently. For
editors, this indicates that the part has changed since the last save.
For views, this indicates that the view contains interesting changes
that it wants to draw the user's attention to.
-
-
-
Returns:
- true iff the part is dirty
isBusy
boolean isBusy()
- Return true if the the receiver is currently in a busy state.
-
-
-
Returns:
- boolean true if busy
isCloseable
boolean isCloseable()
- Returns true iff this part can be closed
-
-
-
Returns:
- true iff this part can be closed
-
Since:
- 3.1
getToolBar
Control getToolBar()
- Returns the local toolbar for this part, or null if this part does not
have a local toolbar. Callers must not dispose or downcast the return value.
-
-
-
Returns:
- the local toolbar for the part, or null if none
getMenu
IPartMenu getMenu()
- Returns the menu for this part or null if none
-
-
-
Returns:
- the menu for this part or null if none
getControl
Control getControl()
- Returns an SWT control that can be used to indicate the tab order for
this part. This can be returned as part of the result to
StackPresentation.getTabList(IPresentablePart)
. Any other use of this control is
unsupported. This may return a placeholder control that is only
meaningful in the context of getTabList
.
-
-
-
Returns:
- the part's control (not null)
getPartProperty
String getPartProperty(
String key)
- Get a property from the part's arbitrary property set.
Note: this is a different set of properties than the ones covered
by the PROP_* constants.
-
-
-
Parameters:
-
key
- The property key to retrieve. Must not be null
.
-
Returns:
- the property, or
null
if that property is not set. -
Since:
- 3.3
addPartPropertyListener
void addPartPropertyListener(
IPropertyChangeListener listener)
- Add a listener for changes in the arbitrary properties set.
Note: this is a different set of properties than the ones covered
by the PROP_* constants.
-
-
-
Parameters:
-
listener
- Must not be null
. -
Since:
- 3.3
removePartPropertyListener
void removePartPropertyListener(
IPropertyChangeListener listener)
- Remove a change listener from the arbitrary properties set.
Note: this is a different set of properties than the ones covered
by the PROP_* constants.
-
-
-
Parameters:
-
listener
- Must not be null
. -
Since:
- 3.3
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.