|
Eclipse Platform Pre-release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.jface.action.ContributionManager
org.eclipse.jface.action.CoolBarManager
A cool bar manager is a contribution manager which realizes itself and its items in a cool bar control.
This class may be instantiated; it may also be subclassed.
#ICoolBarManager| Field Summary | |
static String |
USER_SEPARATOR
A separator created by the end user. |
| Fields inherited from interface org.eclipse.jface.action.ICoolBarManager |
SIZE, VISIBILITY |
| Constructor Summary | |
CoolBarManager()
Creates a new cool bar manager with the default style. |
|
CoolBarManager(CoolBar coolBar)
Creates a cool bar manager for an existing cool bar control. |
|
CoolBarManager(int style)
Creates a cool bar manager with the given SWT style. |
|
| Method Summary | |
void |
add(IToolBarManager toolBarManager)
A convenience method to add a tool bar as a contribution item to this cool bar manager. |
CoolBar |
createControl(Composite parent)
Creates and returns this manager's cool bar control. |
void |
dispose()
Disposes of this cool bar manager and frees all allocated SWT resources. |
IMenuManager |
getContextMenuManager()
Returns the context menu manager used by this cool bar manager. |
CoolBar |
getControl()
Returns the cool bar control for this manager. |
boolean |
getLockLayout()
Returns whether the layout of the underlying cool bar widget is locked. |
int |
getStyle()
Returns the style of the underlying cool bar widget. |
protected void |
itemAdded(IContributionItem item)
Subclasses may extend this ContributionManager method, but
must call super.itemAdded. |
protected void |
itemRemoved(IContributionItem item)
Subclasses may extend this ContributionManager method, but
must call super.itemRemoved. |
void |
refresh()
Synchronizes the visual order of the cool items in the control with this manager's internal data structures. |
void |
resetLayout()
Restores the canonical order of this cool bar manager. |
void |
setContextMenuManager(IMenuManager contextMenuManager)
Sets the context menu of this cool bar manager to the given menu manager. |
void |
setLayout(ArrayList newLayout)
Replaces the internal data structure with the given new order. |
void |
setLockLayout(boolean value)
Locks or unlocks the layout of the underlying cool bar widget. |
void |
update(boolean force)
Subclasses may extend this IContributionManager method, but
must call super.update. |
| Methods inherited from class org.eclipse.jface.action.ContributionManager |
add, add, appendToGroup, appendToGroup, dumpStatistics, find, getItems, getOverrides, hasDynamicItems, indexOf, indexOf, insert, insertAfter, insertAfter, insertBefore, insertBefore, internalSetItems, isDirty, isEmpty, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll, setDirty, setOverrides |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.action.IContributionManager |
add, add, appendToGroup, appendToGroup, find, getItems, getOverrides, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll |
| Field Detail |
public static final String USER_SEPARATOR
| Constructor Detail |
public CoolBarManager()
CoolBarManager(SWT.NONE).
public CoolBarManager(int style)
createControl will create the cool bar control.
style - the cool bar item style; see
CoolBar for for valid style bitspublic CoolBarManager(CoolBar coolBar)
coolBar - the cool bar control| Method Detail |
public void add(IToolBarManager toolBarManager)
ICoolBarManageradd(new ToolBarContributionManager(toolBarManager)).
add in interface ICoolBarManagertoolBarManager - the tool bar manager to be addedToolBarContributionItempublic CoolBar createControl(Composite parent)
parent - the parent control
protected void itemAdded(IContributionItem item)
ContributionManager method, but
must call super.itemAdded.
itemAdded in class ContributionManagerContributionManager.itemAdded(org.eclipse.jface.action.IContributionItem)public void resetLayout()
public void dispose()
removeAll for that purpose.
public CoolBar getControl()
null if noneprotected void itemRemoved(IContributionItem item)
ContributionManager method, but
must call super.itemRemoved.
itemRemoved in class ContributionManagerContributionManager.itemRemoved(org.eclipse.jface.action.IContributionItem)public int getStyle()
ICoolBarManager
getStyle in interface ICoolBarManagerpublic void refresh()
Note that update() and refresh() are converses:
update() changes the visual order to match the internal
structures, and refresh changes the internal structures to
match the visual order.
public void update(boolean force)
IContributionManager method, but
must call super.update.
update in interface IContributionManagerforce - true means update even if not dirty,
and false for normal incremental updatingIContributionManager.update(boolean)public IMenuManager getContextMenuManager()
ICoolBarManager
getContextMenuManager in interface ICoolBarManagernull if noneICoolBarManager.setContextMenuManager(org.eclipse.jface.action.IMenuManager)public void setContextMenuManager(IMenuManager contextMenuManager)
ICoolBarManager
setContextMenuManager in interface ICoolBarManagercontextMenuManager - the context menu manager, or null if noneICoolBarManager.getContextMenuManager()public boolean getLockLayout()
ICoolBarManager
getLockLayout in interface ICoolBarManagertrue if cool bar layout is locked,
false otherwisepublic void setLockLayout(boolean value)
ICoolBarManagerNote that items can be added or removed programmatically even while the cool bar is locked.
setLockLayout in interface ICoolBarManagervalue - true to lock the cool bar, false to unlockpublic void setLayout(ArrayList newLayout)
newLayout - a list of new order of contribution items.
|
Eclipse Platform Pre-release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||