|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jface.action.ContributionItem org.eclipse.jface.action.ActionContributionItem
A contribution item which delegates to an action.
This class may be instantiated; it is not intended to be subclassed.
Field Summary | |
static int | MODE_FORCE_TEXT
Mode bit: Show text on tool items, even if an image is present. |
Constructor Summary | |
ActionContributionItem(IAction action)
Creates a new contribution item from the given action. |
Method Summary | |
boolean | equals(Object o)
Compares this action contribution item with another object. |
void | fill(Composite parent)
The ActionContributionItem implementation of this IContributionItem method creates an SWT Button for the action using the action's style. |
void | fill(Menu parent,
int index)
The ActionContributionItem implementation of this IContributionItem method creates an SWT MenuItem for the action using the action's style. |
void | fill(ToolBar parent,
int index)
The ActionContributionItem implementation of this , IContributionItem method creates an SWT ToolItem for the action using the action's style. |
IAction | getAction()
Returns the action associated with this contribution item. |
int | getMode()
Returns the presentation mode, which is the bitwise-or of the MODE_* constants. |
static boolean | getUseColorIconsInToolbars()
Returns whether color icons should be used in toolbars. |
int | hashCode()
|
boolean | isDynamic()
The action item implementation of this IContributionItem method returns true for menu items and false for everything else. |
boolean | isEnabled()
The default implementation of this IContributionItem method returns true. |
protected boolean | isEnabledAllowed()
Returns true if this item is allowed to enable, false otherwise. |
boolean | isVisible()
The ActionContributionItem implementation of this ContributionItem method extends the super implementation by also checking whether the command corresponding to this action is active. |
void | setMode(int mode)
Sets the presentation mode, which is the bitwise-or of the MODE_* constants. |
static void | setUseColorIconsInToolbars(boolean useColorIcons)
Sets whether color icons should be used in toolbars. |
protected String | shortenText(String textValue,
ToolItem item)
Shorten the given text t so that its length doesn't exceed the given width. |
void | update()
The action item implementation of this IContributionItem method calls update(null). |
void | update(String propertyName)
Synchronizes the UI with the given property. |
Methods inherited from class org.eclipse.jface.action.ContributionItem |
dispose, fill, getId, getParent, isDirty, isGroupMarker, isSeparator, saveWidgetState, setParent, setVisible, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static int MODE_FORCE_TEXT
Constructor Detail |
public ActionContributionItem(IAction action)
Method Detail |
public static boolean getUseColorIconsInToolbars()
public static void setUseColorIconsInToolbars(boolean useColorIcons)
public boolean equals(Object o)
public void fill(Composite parent)
public void fill(Menu parent, int index)
public void fill(ToolBar parent, int index)
public IAction getAction()
public int getMode()
public int hashCode()
public boolean isDynamic()
public boolean isEnabled()
protected boolean isEnabledAllowed()
public boolean isVisible()
public void setMode(int mode)
public final void update()
public void update(String propertyName)
protected String shortenText(String textValue, ToolItem item)
|
Eclipse Platform Release 3.0 | ||||||||||
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, 2004. All rights reserved.