Package org.eclipse.jface.action
Class SubContributionItem
java.lang.Object
org.eclipse.jface.action.SubContributionItem
- All Implemented Interfaces:
- IContributionItem
- Direct Known Subclasses:
- ActionSetContributionItem
A 
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 SummaryConstructorsConstructorDescriptionCreates a newSubContributionItem.
- 
Method SummaryModifier and TypeMethodDescriptionvoiddispose()The default implementation of thisIContributionItemdelegates to the inner item.voidFills the given composite control with controls representing this contribution item.voidFills the given cool bar with controls representing this contribution item.voidFills the given menu with controls representing this contribution item.voidFills the given tool bar with controls representing this contribution item.getId()Returns the identifier of this contribution item.Returns the inner contribution item.booleanisDirty()Returns whether this contribution item is dirty.booleanReturns whether this contribution item is dynamic.booleanReturns whether this contribution item is enabled.booleanReturns whether this contribution item is a group marker.booleanReturns whether this contribution item is a separator.booleanReturns whether this contribution item is visibile within its manager.voidSaves any state information of the control(s) owned by this contribution item.voidsetParent(IContributionManager parent) Sets the parent manager of this itemvoidsetVisible(boolean visible) Sets whether this contribution item is visibile within its manager.toString()voidupdate()Updates any SWT controls cached by this contribution item with any changes which have been made to this contribution item since the last update.voidUpdates any SWT controls cached by this contribution item with changes for the the given property.
- 
Constructor Details- 
SubContributionItemCreates a newSubContributionItem.- Parameters:
- item- the contribution item to be wrapped
 
 
- 
- 
Method Details- 
disposepublic void dispose()The default implementation of thisIContributionItemdelegates to the inner item. Subclasses may override.- Specified by:
- disposein interface- IContributionItem
 
- 
fillDescription copied from interface:IContributionItemFills the given composite control with controls representing this contribution item. Used byStatusLineManager.- Specified by:
- fillin interface- IContributionItem
- Parameters:
- parent- the parent control
 
- 
fillDescription copied from interface:IContributionItemFills the given menu with controls representing this contribution item. Used byMenuManager.- Specified by:
- fillin interface- IContributionItem
- Parameters:
- parent- the parent menu
- index- the index where the controls are inserted, or- -1to insert at the end
 
- 
fillDescription copied from interface:IContributionItemFills the given tool bar with controls representing this contribution item. Used byToolBarManager.- Specified by:
- fillin interface- IContributionItem
- Parameters:
- parent- the parent tool bar
- index- the index where the controls are inserted, or- -1to insert at the end
 
- 
getIdDescription copied from interface:IContributionItemReturns the identifier of this contribution item. The id is used for retrieving an item from its manager.- Specified by:
- getIdin interface- IContributionItem
- Returns:
- the contribution item identifier, or nullif none
 
- 
getInnerItemReturns the inner contribution item.- Returns:
- the inner contribution item
 
- 
isEnabledpublic boolean isEnabled()Description copied from interface:IContributionItemReturns whether this contribution item is enabled.- Specified by:
- isEnabledin interface- IContributionItem
- Returns:
- trueif this item is enabled
 
- 
isDirtypublic boolean isDirty()Description copied from interface:IContributionItemReturns whether this contribution item is dirty. A dirty item will be recreated when the action bar is updated.- Specified by:
- isDirtyin interface- IContributionItem
- Returns:
- trueif this item is dirty
 
- 
isDynamicpublic boolean isDynamic()Description copied from interface:IContributionItemReturns whether this contribution item is dynamic. A dynamic contribution item contributes items conditionally, dependent on some internal state.- Specified by:
- isDynamicin interface- IContributionItem
- Returns:
- trueif this item is dynamic, and- falsefor normal items
 
- 
isGroupMarkerpublic boolean isGroupMarker()Description copied from interface:IContributionItemReturns whether this contribution item is a group marker. This information is used when adding items to a group.- Specified by:
- isGroupMarkerin interface- IContributionItem
- Returns:
- trueif this item is a group marker, and- falsefor normal items
- See Also:
 
- 
isSeparatorpublic boolean isSeparator()Description copied from interface:IContributionItemReturns whether this contribution item is a separator. This information is used to enable hiding of unnecessary separators.- Specified by:
- isSeparatorin interface- IContributionItem
- Returns:
- trueif this item is a separator, and- falsefor normal items
- See Also:
 
- 
isVisiblepublic boolean isVisible()Description copied from interface:IContributionItemReturns whether this contribution item is visibile within its manager.- Specified by:
- isVisiblein interface- IContributionItem
- Returns:
- trueif this item is visible, and- falseotherwise
 
- 
setParentDescription copied from interface:IContributionItemSets the parent manager of this item- Specified by:
- setParentin interface- IContributionItem
- Parameters:
- parent- the parent contribution manager
 
- 
setVisiblepublic void setVisible(boolean visible) Description copied from interface:IContributionItemSets whether this contribution item is visibile within its manager.- Specified by:
- setVisiblein interface- IContributionItem
- Parameters:
- visible-- trueif this item should be visible, and- falseotherwise
 
- 
updatepublic void update()Description copied from interface:IContributionItemUpdates any SWT controls cached by this contribution item with any changes which have been made to this contribution item since the last update. Called by contribution manager update methods.- Specified by:
- updatein interface- IContributionItem
 
- 
updateDescription copied from interface:IContributionItemUpdates any SWT controls cached by this contribution item with changes for the the given property.- Specified by:
- updatein interface- IContributionItem
- Parameters:
- id- the id of the changed property
 
- 
fillDescription copied from interface:IContributionItemFills the given cool bar with controls representing this contribution item. Used byCoolBarManager.- Specified by:
- fillin interface- IContributionItem
- Parameters:
- parent- the parent cool bar
- index- the index where the controls are inserted, or- -1to insert at the end
 
- 
saveWidgetStatepublic void saveWidgetState()Description copied from interface:IContributionItemSaves any state information of the control(s) owned by this contribution item. The contribution manager calls this method before disposing of the controls.- Specified by:
- saveWidgetStatein interface- IContributionItem
 
- 
toString
 
-