public class SubContributionItem extends Object implements IContributionItem
SubContributionItem is a wrapper for an IContributionItem.
It is used within a SubContributionManager to control the visibility
of items.
This class is not intended to be subclassed.
| Constructor and Description |
|---|
SubContributionItem(IContributionItem item)
Creates a new
SubContributionItem. |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
The default implementation of this
IContributionItem
delegates to the inner 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.
|
IContributionItem |
getInnerItem()
Returns the inner 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.
|
public SubContributionItem(IContributionItem item)
SubContributionItem.public void dispose()
IContributionItem
delegates to the inner item. Subclasses may override.dispose in interface IContributionItempublic void fill(Composite parent)
IContributionItemStatusLineManager.fill in interface IContributionItemparent - the parent controlpublic void fill(Menu parent, int index)
IContributionItemMenuManager.fill in interface IContributionItemparent - the parent menuindex - the index where the controls are inserted,
or -1 to insert at the endpublic void fill(ToolBar parent, int index)
IContributionItemToolBarManager.fill in interface IContributionItemparent - the parent tool barindex - the index where the controls are inserted,
or -1 to insert at the endpublic String getId()
IContributionItemgetId in interface IContributionItemnull
if nonepublic IContributionItem getInnerItem()
public boolean isEnabled()
IContributionItemisEnabled in interface IContributionItemtrue if this item is enabledpublic boolean isDirty()
IContributionItemisDirty in interface IContributionItemtrue if this item is dirtypublic boolean isDynamic()
IContributionItemisDynamic in interface IContributionItemtrue if this item is dynamic, and
false for normal itemspublic boolean isGroupMarker()
IContributionItemisGroupMarker in interface IContributionItemtrue if this item is a group marker, and
false for normal itemsGroupMarker,
IContributionManager.appendToGroup(String, IContributionItem),
IContributionManager.prependToGroup(String, IContributionItem)public boolean isSeparator()
IContributionItemisSeparator in interface IContributionItemtrue if this item is a separator, and
false for normal itemsSeparatorpublic boolean isVisible()
IContributionItemisVisible in interface IContributionItemtrue if this item is visible, and
false otherwisepublic void setParent(IContributionManager parent)
IContributionItemsetParent in interface IContributionItemparent - the parent contribution managerpublic void setVisible(boolean visible)
IContributionItemsetVisible in interface IContributionItemvisible - true if this item should be visible, and
false otherwisepublic void update()
IContributionItemupdate in interface IContributionItempublic void update(String id)
IContributionItemupdate in interface IContributionItemid - the id of the changed propertypublic void fill(CoolBar parent, int index)
IContributionItemCoolBarManager.fill in interface IContributionItemparent - the parent cool barindex - the index where the controls are inserted,
or -1 to insert at the endpublic void saveWidgetState()
IContributionItemsaveWidgetState in interface IContributionItemGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.