|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.jface.action.ContributionItem
org.eclipse.jface.action.ToolBarContributionItem
The ToolBarContributionItem class provides a wrapper for tool
bar managers when used in cool bar managers. It extends ContributionItem
but and provides some additional methods to customize the size of the cool
item and to retrieve the underlying tool bar manager.
This class may be instantiated; it is not intended to be subclassed.
| Field Summary | |
|---|---|
static int |
SHOW_ALL_ITEMS
A constant used by setMinimumItemsToShow and getMinimumItemsToShow
to indicate that all tool items should be shown in the cool item. |
| Constructor Summary | |
|---|---|
ToolBarContributionItem()
Convenience method equivalent to ToolBarContributionItem(new ToolBarManager(), null). |
|
ToolBarContributionItem(IToolBarManager toolBarManager)
Convenience method equivalent to ToolBarContributionItem(toolBarManager, null). |
|
ToolBarContributionItem(IToolBarManager toolBarManager,
String id)
Creates a tool bar contribution item. |
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes of this contribution item. |
void |
fill(CoolBar coolBar,
int index)
Fills the given cool bar with controls representing this contribution item. |
int |
getCurrentHeight()
Returns the current height of the corresponding cool item. |
int |
getCurrentWidth()
Returns the current width of the corresponding cool item. |
int |
getMinimumItemsToShow()
Returns the minimum number of tool items to show in the cool item. |
IToolBarManager |
getToolBarManager()
Returns the internal tool bar manager of the contribution item. |
boolean |
getUseChevron()
Returns whether chevron support is enabled. |
boolean |
isVisible()
A contribution item is visible iff its internal state is visible or the tool bar manager contains something other than group markers and separators. |
void |
saveWidgetState()
Saves any state information of the control(s) owned by this contribution item. |
void |
setCurrentHeight(int currentHeight)
Sets the current height of the cool item. |
void |
setCurrentWidth(int currentWidth)
Sets the current width of the cool item. |
void |
setMinimumItemsToShow(int minimumItemsToShow)
Sets the minimum number of tool items to show in the cool item. |
void |
setUseChevron(boolean value)
Enables or disables chevron support for the cool item. |
void |
update(String propertyName)
Updates any SWT controls cached by this contribution item with changes for the the given property. |
| Methods inherited from class org.eclipse.jface.action.ContributionItem |
|---|
fill, fill, fill, getId, getParent, isDirty, isDynamic, isEnabled, isGroupMarker, isSeparator, setParent, setVisible, toString, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.internal.provisional.action.IToolBarContributionItem |
|---|
getParent |
| Methods inherited from interface org.eclipse.jface.action.IContributionItem |
|---|
fill, fill, fill, getId, isDirty, isDynamic, isEnabled, isGroupMarker, isSeparator, setParent, setVisible, update |
| Field Detail |
public static final int SHOW_ALL_ITEMS
setMinimumItemsToShow and getMinimumItemsToShow
to indicate that all tool items should be shown in the cool item.
| Constructor Detail |
public ToolBarContributionItem()
ToolBarContributionItem(new ToolBarManager(), null).
public ToolBarContributionItem(IToolBarManager toolBarManager)
ToolBarContributionItem(toolBarManager, null).
toolBarManager - the tool bar manager
public ToolBarContributionItem(IToolBarManager toolBarManager,
String id)
toolBarManager - the tool bar manager to wrapid - the contribution item id, or null if none| Method Detail |
public void dispose()
IContributionItem
dispose in interface IContributionItemdispose in class ContributionItem
public void fill(CoolBar coolBar,
int index)
IContributionItemCoolBarManager.
fill in interface IContributionItemfill in class ContributionItempublic int getCurrentHeight()
getCurrentHeight in interface org.eclipse.jface.internal.provisional.action.IToolBarContributionItempublic int getCurrentWidth()
getCurrentWidth in interface org.eclipse.jface.internal.provisional.action.IToolBarContributionItempublic int getMinimumItemsToShow()
getMinimumItemsToShow in interface org.eclipse.jface.internal.provisional.action.IToolBarContributionItemSHOW_ALL_ITEMS
if a value was not setsetMinimumItemsToShow(int)public IToolBarManager getToolBarManager()
getToolBarManager in interface org.eclipse.jface.internal.provisional.action.IToolBarContributionItemnull if one is not
defined.IToolBarManagerpublic boolean getUseChevron()
getUseChevron in interface org.eclipse.jface.internal.provisional.action.IToolBarContributionItemtrue if chevron support is enabled, false
otherwisepublic boolean isVisible()
isVisible in interface IContributionItemisVisible in class ContributionItemtrue if the tool bar manager contains something
other than group marks and separators, and the internal state is
set to be visible.public void saveWidgetState()
IContributionItem
saveWidgetState in interface IContributionItemsaveWidgetState in class ContributionItempublic void setCurrentHeight(int currentHeight)
setCurrentHeight in interface org.eclipse.jface.internal.provisional.action.IToolBarContributionItemcurrentHeight - the current height to setpublic void setCurrentWidth(int currentWidth)
setCurrentWidth in interface org.eclipse.jface.internal.provisional.action.IToolBarContributionItemcurrentWidth - the current width to setpublic void setMinimumItemsToShow(int minimumItemsToShow)
setMinimumItemsToShow in interface org.eclipse.jface.internal.provisional.action.IToolBarContributionItemminimumItemsToShow - the minimum number of tool items to show.getMinimumItemsToShow(),
setUseChevron(boolean)public void setUseChevron(boolean value)
setUseChevron in interface org.eclipse.jface.internal.provisional.action.IToolBarContributionItemvalue - true to enable chevron support, false
otherwise.public void update(String propertyName)
IContributionItem
update in interface IContributionItemupdate in class ContributionItem
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.