|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.action.ContributionManager | +--org.eclipse.jface.action.ToolBarManager
A tool bar manager is a contribution manager which realizes itself and its items in a tool bar control.
This class may be instantiated; it may also be subclassed if a more sophisticated layout is required.
Constructor Summary | |
ToolBarManager()
Creates a new tool bar manager with the default SWT button style. |
|
ToolBarManager(int style)
Creates a tool bar manager with the given SWT button style. |
|
ToolBarManager(ToolBar toolbar)
Creates a tool bar manager for an existing tool bar control. |
Method Summary | |
ToolBar |
createControl(Composite parent)
Creates and returns this manager's tool bar control. |
void |
dispose()
Disposes of this tool bar manager and frees all allocated SWT resources. |
ToolBar |
getControl()
Returns the tool bar control for this manager. |
protected void |
relayout(ToolBar toolBar,
int oldCount,
int newCount)
Re-lays out the tool bar. |
void |
update(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.ContributionManager |
add, add, appendToGroup, appendToGroup, dumpStatistics, find, getItems, getOverrides, hasDynamicItems, insertAfter, insertAfter, insertBefore, insertBefore, 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 |
Constructor Detail |
public ToolBarManager()
createControl
method to create the
tool bar control.
public ToolBarManager(int style)
createControl
method to create the
tool bar control.
style
- the tool bar item stylefor valid style bits
public ToolBarManager(ToolBar toolbar)
toolbar
- the tool bar controlMethod Detail |
public ToolBar createControl(Composite parent)
parent
- the parent control
public void dispose()
removeAll
for that purpose.
public ToolBar getControl()
null
if none (before creating or after disposal)protected void relayout(ToolBar toolBar, int oldCount, int newCount)
The default implementation of this framework method re-lays out the parent when the number of items crosses the zero threshold. Subclasses should override this method to implement their own re-layout strategy
toolBar
- the tool bar controloldCount
- the old number of itemsnewCount
- the new number of itemspublic void update(boolean force)
IContributionManager
update
in interface IContributionManager
force
- true
means update even if not dirty,
and false
for normal incremental updating
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |