public interface IContributionItem
A contribution item can realize itself in different SWT widgets, using the different
fill
methods. The same type of contribution item can be used with a
MenuBarManager
, ToolBarManager
, CoolBarManager
,
or a StatusLineManager
.
This interface is internal to the framework; it should not be implemented outside the framework.
IContributionManager
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes of this contribution item.
|
void |
fill(Composite parent)
Fills the given composite control with controls representing this
contribution item.
|
void |
fill(CoolBar parent,
int index)
Fills the given cool bar with controls representing this contribution item.
|
void |
fill(Menu parent,
int index)
Fills the given menu with controls representing this contribution item.
|
void |
fill(ToolBar parent,
int index)
Fills the given tool bar with controls representing this contribution item.
|
String |
getId()
Returns the identifier of this contribution item.
|
boolean |
isDirty()
Returns whether this contribution item is dirty.
|
boolean |
isDynamic()
Returns whether this contribution item is dynamic.
|
boolean |
isEnabled()
Returns whether this contribution item is enabled.
|
boolean |
isGroupMarker()
Returns whether this contribution item is a group marker.
|
boolean |
isSeparator()
Returns whether this contribution item is a separator.
|
boolean |
isVisible()
Returns whether this contribution item is visibile within its manager.
|
void |
saveWidgetState()
Saves any state information of the control(s) owned by this contribution item.
|
void |
setParent(IContributionManager parent)
Sets the parent manager of this item
|
void |
setVisible(boolean visible)
Sets whether this contribution item is visibile within its manager.
|
void |
update()
Updates any SWT controls cached by this contribution item with any
changes which have been made to this contribution item since the last update.
|
void |
update(String id)
Updates any SWT controls cached by this contribution item with changes
for the the given property.
|
void dispose()
void fill(Composite parent)
StatusLineManager
.parent
- the parent controlvoid fill(Menu parent, int index)
MenuManager
.parent
- the parent menuindex
- the index where the controls are inserted,
or -1
to insert at the endvoid fill(ToolBar parent, int index)
ToolBarManager
.parent
- the parent tool barindex
- the index where the controls are inserted,
or -1
to insert at the endvoid fill(CoolBar parent, int index)
CoolBarManager
.parent
- the parent cool barindex
- the index where the controls are inserted,
or -1
to insert at the endString getId()
null
if noneboolean isEnabled()
true
if this item is enabledboolean isDirty()
true
if this item is dirtyboolean isDynamic()
true
if this item is dynamic, and
false
for normal itemsboolean isGroupMarker()
true
if this item is a group marker, and
false
for normal itemsGroupMarker
,
IContributionManager.appendToGroup(String, IContributionItem)
,
IContributionManager.prependToGroup(String, IContributionItem)
boolean isSeparator()
true
if this item is a separator, and
false
for normal itemsSeparator
boolean isVisible()
true
if this item is visible, and
false
otherwisevoid saveWidgetState()
void setParent(IContributionManager parent)
parent
- the parent contribution managervoid setVisible(boolean visible)
visible
- true
if this item should be visible, and
false
otherwisevoid update()
void update(String id)
id
- the id of the changed property
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.