Class CoolBarToTrimManager
- All Implemented Interfaces:
- IContributionManager,- ICoolBarManager,- org.eclipse.jface.internal.provisional.action.ICoolBarManager2
- Since:
- 3.5
- 
Field SummaryFieldsFields inherited from interface org.eclipse.jface.action.ICoolBarManagerSIZE
- 
Constructor SummaryConstructorsConstructorDescriptionCoolBarToTrimManager(MApplication app, MTrimmedWindow window, List<MTrimElement> workbenchTrimElements, IRendererFactory rf) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds an action as a contribution item to this manager.voidadd(IContributionItem item) Adds a contribution item to this manager.voidadd(IToolBarManager toolBarManager) A convenience method to add a tool bar as a contribution item to this cool bar manager.voidappendToGroup(String groupName, IAction action) Adds a contribution item for the given action at the end of the group with the given name.voidappendToGroup(String groupName, IContributionItem item) Adds a contribution item to this manager at the end of the group with the given name.createControl2(Composite parent) Creates and returns this manager's control.voiddispose()Disposes the resources for this manager.Finds the contribution item with the given id.Returns the context menu manager used by this cool bar manager.Returns the bar control for this manager.getItems()Returns all contribution items known to this manager.booleanReturns whether the layout of the underlying cool bar widget is locked.TheContributionManagerimplementation of this method declared onIContributionManagerreturns the current overrides.intgetStyle()Returns the style of the underlying cool bar widget.static StringgetToolbarLabel(MApplication application, MUIElement elt) voidinsertAfter(String id, IAction action) Inserts a contribution item for the given action after the item with the given id.voidinsertAfter(String id, IContributionItem item) Inserts a contribution item after the item with the given id.voidinsertBefore(String id, IAction action) Inserts a contribution item for the given action before the item with the given id.voidinsertBefore(String id, IContributionItem item) Inserts a contribution item before the item with the given id.booleanisDirty()Returns whether the list of contributions has recently changed and has yet to be reflected in the corresponding widgets.booleanisEmpty()Returns whether this manager has any contribution items.voidMarks this contribution manager as dirty.voidprependToGroup(String groupName, IAction action) Adds a contribution item for the given action at the beginning of the group with the given name.voidprependToGroup(String groupName, IContributionItem item) Adds a contribution item to this manager at the beginning of the group with the given name.voidrefresh()Synchronizes the visual order of the cool items in the control with this manager's internal data structures.Removes and returns the contribution item with the given id from this manager.remove(IContributionItem item) Removes the given contribution item from the contribution items known to this manager.voidRemoves all contribution items from this manager.voidRestores the canonical order of this cool bar manager.voidsetContextMenuManager(IMenuManager menuManager) Sets the context menu of this cool bar manager to the given menu manager.voidsetItems(IContributionItem[] newItems) Replaces the current items with the given items.voidsetLockLayout(boolean value) Locks or unlocks the layout of the underlying cool bar widget.voidsetOverrides(IContributionManagerOverrides newOverrides) Sets the overrides for this contribution managervoidupdate(boolean force) Updates this manager's underlying widget(s) with any changes which have been made to it or its items.Methods inherited from class org.eclipse.jface.action.ContributionManagerallowItem, dumpStatistics, getSize, hasDynamicItems, indexOf, indexOf, insert, internalSetItems, itemAdded, itemRemoved, replaceItem, setDirty
- 
Field Details- 
OBJECT- See Also:
 
 
- 
- 
Constructor Details- 
CoolBarToTrimManagerpublic CoolBarToTrimManager(MApplication app, MTrimmedWindow window, List<MTrimElement> workbenchTrimElements, IRendererFactory rf) 
 
- 
- 
Method Details- 
addDescription copied from interface:IContributionManagerAdds an action as a contribution item to this manager. Equivalent toadd(new ActionContributionItem(action)).- Specified by:
- addin interface- IContributionManager
- Overrides:
- addin class- ContributionManager
- Parameters:
- action- the action, this cannot be- null
 
- 
addDescription copied from interface:IContributionManagerAdds a contribution item to this manager.- Specified by:
- addin interface- IContributionManager
- Overrides:
- addin class- ContributionManager
- Parameters:
- item- the contribution item, this cannot be- null
 
- 
getToolbarLabel
- 
addDescription copied from interface:ICoolBarManagerA convenience method to add a tool bar as a contribution item to this cool bar manager. Equivalent toadd(new ToolBarContributionManager(toolBarManager)).- Specified by:
- addin interface- ICoolBarManager
- Parameters:
- toolBarManager- the tool bar manager to be added
- See Also:
 
- 
appendToGroupDescription copied from interface:IContributionManagerAdds a contribution item for the given action at the end of the group with the given name. Equivalent toappendToGroup(groupName,new ActionContributionItem(action)).- Specified by:
- appendToGroupin interface- IContributionManager
- Overrides:
- appendToGroupin class- ContributionManager
- Parameters:
- groupName- the name of the group
- action- the action
 
- 
appendToGroupDescription copied from interface:IContributionManagerAdds a contribution item to this manager at the end of the group with the given name.- Specified by:
- appendToGroupin interface- IContributionManager
- Overrides:
- appendToGroupin class- ContributionManager
- Parameters:
- groupName- the name of the group
- item- the contribution item
 
- 
createControl2Description copied from interface:org.eclipse.jface.internal.provisional.action.ICoolBarManager2Creates and returns this manager's control. Does not create a new control if one already exists.- Specified by:
- createControl2in interface- org.eclipse.jface.internal.provisional.action.ICoolBarManager2
- Parameters:
- parent- the parent control
- Returns:
- the control
 
- 
disposepublic void dispose()Description copied from interface:org.eclipse.jface.internal.provisional.action.ICoolBarManager2Disposes the resources for this manager.EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/UI team. - Specified by:
- disposein interface- org.eclipse.jface.internal.provisional.action.ICoolBarManager2
 
- 
findDescription copied from interface:IContributionManagerFinds the contribution item with the given id.- Specified by:
- findin interface- IContributionManager
- Overrides:
- findin class- ContributionManager
- Parameters:
- id- the contribution item id
- Returns:
- the contribution item, or nullif no item with the given id can be found
 
- 
getContextMenuManagerDescription copied from interface:ICoolBarManagerReturns the context menu manager used by this cool bar manager. This context menu manager is used by the cool bar manager except for cool items that provide their own.- Specified by:
- getContextMenuManagerin interface- ICoolBarManager
- Returns:
- the context menu manager, or nullif none
- See Also:
 
- 
getControl2Description copied from interface:org.eclipse.jface.internal.provisional.action.ICoolBarManager2Returns the bar control for this manager.EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/UI team. - Specified by:
- getControl2in interface- org.eclipse.jface.internal.provisional.action.ICoolBarManager2
- Returns:
- the bar control, or nullif none
 
- 
getItemsDescription copied from interface:IContributionManagerReturns all contribution items known to this manager.- Specified by:
- getItemsin interface- IContributionManager
- Overrides:
- getItemsin class- ContributionManager
- Returns:
- a list of contribution items
 
- 
getLockLayoutpublic boolean getLockLayout()Description copied from interface:ICoolBarManagerReturns whether the layout of the underlying cool bar widget is locked.- Specified by:
- getLockLayoutin interface- ICoolBarManager
- Returns:
- trueif cool bar layout is locked,- falseotherwise
 
- 
getOverridesDescription copied from class:ContributionManagerTheContributionManagerimplementation of this method declared onIContributionManagerreturns the current overrides. If there is no overrides it lazily creates one which overrides no item state.- Specified by:
- getOverridesin interface- IContributionManager
- Overrides:
- getOverridesin class- ContributionManager
- Returns:
- the overrides for the items of this manager
 
- 
getStylepublic int getStyle()Description copied from interface:ICoolBarManagerReturns the style of the underlying cool bar widget.- Specified by:
- getStylein interface- ICoolBarManager
- Returns:
- the style of the cool bar
 
- 
insertAfterDescription copied from interface:IContributionManagerInserts a contribution item for the given action after the item with the given id. Equivalent toinsertAfter(id,new ActionContributionItem(action)).- Specified by:
- insertAfterin interface- IContributionManager
- Overrides:
- insertAfterin class- ContributionManager
- Parameters:
- id- the contribution item id
- action- the action to insert
 
- 
insertAfterDescription copied from interface:IContributionManagerInserts a contribution item after the item with the given id.- Specified by:
- insertAfterin interface- IContributionManager
- Overrides:
- insertAfterin class- ContributionManager
- Parameters:
- id- the contribution item id
- item- the contribution item to insert
 
- 
insertBeforeDescription copied from interface:IContributionManagerInserts a contribution item for the given action before the item with the given id. Equivalent toinsertBefore(id,new ActionContributionItem(action)).- Specified by:
- insertBeforein interface- IContributionManager
- Overrides:
- insertBeforein class- ContributionManager
- Parameters:
- id- the contribution item id
- action- the action to insert
 
- 
insertBeforeDescription copied from interface:IContributionManagerInserts a contribution item before the item with the given id.- Specified by:
- insertBeforein interface- IContributionManager
- Overrides:
- insertBeforein class- ContributionManager
- Parameters:
- id- the contribution item id
- item- the contribution item to insert
 
- 
isDirtypublic boolean isDirty()Description copied from interface:IContributionManagerReturns whether the list of contributions has recently changed and has yet to be reflected in the corresponding widgets.- Specified by:
- isDirtyin interface- IContributionManager
- Overrides:
- isDirtyin class- ContributionManager
- Returns:
- trueif this manager is dirty, and- falseif it is up-to-date
 
- 
isEmptypublic boolean isEmpty()Description copied from interface:IContributionManagerReturns whether this manager has any contribution items.- Specified by:
- isEmptyin interface- IContributionManager
- Overrides:
- isEmptyin class- ContributionManager
- Returns:
- trueif there are no items, and- falseotherwise
 
- 
markDirtypublic void markDirty()Description copied from interface:IContributionManagerMarks this contribution manager as dirty.- Specified by:
- markDirtyin interface- IContributionManager
- Overrides:
- markDirtyin class- ContributionManager
 
- 
prependToGroupDescription copied from interface:IContributionManagerAdds a contribution item for the given action at the beginning of the group with the given name. Equivalent toprependToGroup(groupName,new ActionContributionItem(action)).- Specified by:
- prependToGroupin interface- IContributionManager
- Overrides:
- prependToGroupin class- ContributionManager
- Parameters:
- groupName- the name of the group
- action- the action
 
- 
prependToGroupDescription copied from interface:IContributionManagerAdds a contribution item to this manager at the beginning of the group with the given name.- Specified by:
- prependToGroupin interface- IContributionManager
- Overrides:
- prependToGroupin class- ContributionManager
- Parameters:
- groupName- the name of the group
- item- the contribution item
 
- 
refreshpublic void refresh()Description copied from interface:org.eclipse.jface.internal.provisional.action.ICoolBarManager2Synchronizes the visual order of the cool items in the control with this manager's internal data structures. This method should be called before requesting the order of the contribution items to ensure that the order is accurate.Note that update()andrefresh()are converses:update()changes the visual order to match the internal structures, andrefreshchanges the internal structures to match the visual order.EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/UI team. - Specified by:
- refreshin interface- org.eclipse.jface.internal.provisional.action.ICoolBarManager2
 
- 
removeDescription copied from interface:IContributionManagerRemoves the given contribution item from the contribution items known to this manager.- Specified by:
- removein interface- IContributionManager
- Overrides:
- removein class- ContributionManager
- Parameters:
- item- the contribution item
- Returns:
- the itemparameter if the item was removed, andnullif it was not found
 
- 
removeDescription copied from interface:IContributionManagerRemoves and returns the contribution item with the given id from this manager. Returnsnullif this manager has no contribution items with the given id.- Specified by:
- removein interface- IContributionManager
- Overrides:
- removein class- ContributionManager
- Parameters:
- id- the contribution item id
- Returns:
- the item that was found and removed, or nullif none
 
- 
removeAllpublic void removeAll()Description copied from interface:IContributionManagerRemoves all contribution items from this manager.Note: The items will not get disposed. - Specified by:
- removeAllin interface- IContributionManager
- Overrides:
- removeAllin class- ContributionManager
 
- 
resetItemOrderpublic void resetItemOrder()Description copied from interface:org.eclipse.jface.internal.provisional.action.ICoolBarManager2Restores the canonical order of this cool bar manager. The canonical order is the order in which the contribution items where added.EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/UI team. - Specified by:
- resetItemOrderin interface- org.eclipse.jface.internal.provisional.action.ICoolBarManager2
 
- 
setContextMenuManagerDescription copied from interface:ICoolBarManagerSets the context menu of this cool bar manager to the given menu manager.- Specified by:
- setContextMenuManagerin interface- ICoolBarManager
- Parameters:
- menuManager- the context menu manager, or- nullif none
- See Also:
 
- 
setItemsDescription copied from interface:org.eclipse.jface.internal.provisional.action.ICoolBarManager2Replaces the current items with the given items. Forces an update.EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/UI team. - Specified by:
- setItemsin interface- org.eclipse.jface.internal.provisional.action.ICoolBarManager2
- Parameters:
- newItems- the items with which to replace the current items
 
- 
setLockLayoutpublic void setLockLayout(boolean value) Description copied from interface:ICoolBarManagerLocks or unlocks the layout of the underlying cool bar widget. Once the cool bar is locked, cool items cannot be repositioned by the user.Note that items can be added or removed programmatically even while the cool bar is locked. - Specified by:
- setLockLayoutin interface- ICoolBarManager
- Parameters:
- value-- trueto lock the cool bar,- falseto unlock
 
- 
setOverridesDescription copied from class:ContributionManagerSets the overrides for this contribution manager- Specified by:
- setOverridesin interface- org.eclipse.jface.internal.provisional.action.ICoolBarManager2
- Overrides:
- setOverridesin class- ContributionManager
- Parameters:
- newOverrides- the overrides for the items of this manager
 
- 
updatepublic void update(boolean force) Description copied from interface:IContributionManagerUpdates this manager's underlying widget(s) with any changes which have been made to it or its items. Normally changes to a contribution manager merely mark it as dirty, without updating the underlying widgets. This brings the underlying widgets up to date with any changes.- Specified by:
- updatein interface- IContributionManager
- Parameters:
- force-- truemeans update even if not dirty, and- falsefor normal incremental updating
 
- 
getTopTrim
 
-