public class SubCoolBarManager extends SubContributionManager implements ICoolBarManager
SubCoolBarManager
monitors the additional and removal of
items from a parent manager so that visibility of the entire set can be changed as a
unit.SIZE
Constructor and Description |
---|
SubCoolBarManager(ICoolBarManager mgr)
Constructs a new manager.
|
Modifier and Type | Method and Description |
---|---|
void |
add(IToolBarManager toolBarManager)
A convenience method to add a tool bar as a contribution item to this
cool bar manager.
|
IMenuManager |
getContextMenuManager()
Returns the context menu manager used by this cool bar manager.
|
boolean |
getLockLayout()
Returns whether the layout of the underlying cool bar widget is locked.
|
protected ICoolBarManager |
getParentCoolBarManager()
Returns the parent cool bar manager that this sub-manager contributes to.
|
int |
getStyle()
Returns the style of the underlying cool bar widget.
|
void |
setContextMenuManager(IMenuManager menuManager)
Sets the context menu of this cool bar manager to the given menu
manager.
|
void |
setLockLayout(boolean value)
Locks or unlocks the layout of the underlying cool bar widget.
|
void |
update(boolean force)
Updates this manager's underlying widget(s) with any changes which
have been made to it or its items.
|
add, add, appendToGroup, appendToGroup, disposeManager, find, getItems, getOverrides, getParent, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, isVisible, itemAdded, itemRemoved, items, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll, setVisible, unwrap, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, add, appendToGroup, appendToGroup, find, getItems, getOverrides, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll
public SubCoolBarManager(ICoolBarManager mgr)
mgr
- the parent manager. All contributions made to the
SubCoolBarManager
are forwarded and appear in the
parent manager.public void add(IToolBarManager toolBarManager)
ICoolBarManager
add(new ToolBarContributionManager(toolBarManager))
.add
in interface ICoolBarManager
toolBarManager
- the tool bar manager to be addedToolBarContributionItem
public int getStyle()
ICoolBarManager
getStyle
in interface ICoolBarManager
protected final ICoolBarManager getParentCoolBarManager()
public boolean getLockLayout()
ICoolBarManager
getLockLayout
in interface ICoolBarManager
true
if cool bar layout is locked, false
otherwisepublic void setLockLayout(boolean value)
ICoolBarManager
Note that items can be added or removed programmatically even while the cool bar is locked.
setLockLayout
in interface ICoolBarManager
value
- true
to lock the cool bar, false
to unlockpublic IMenuManager getContextMenuManager()
ICoolBarManager
getContextMenuManager
in interface ICoolBarManager
null
if noneICoolBarManager.setContextMenuManager(org.eclipse.jface.action.IMenuManager)
public void setContextMenuManager(IMenuManager menuManager)
ICoolBarManager
setContextMenuManager
in interface ICoolBarManager
menuManager
- the context menu manager, or null
if noneICoolBarManager.getContextMenuManager()
public void update(boolean force)
IContributionManager
update
in interface IContributionManager
force
- true
means update even if not dirty,
and false
for normal incremental updating
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.