public class LabelRetargetAction extends RetargetAction
LabelRetargetAction extends the behavior of
RetargetAction. It will track the enable state, label, and
tool tip text of the target action..
This class may be instantiated. It is not intented to be subclassed.
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT| Constructor and Description |
|---|
LabelRetargetAction(String actionID,
String text)
Constructs a LabelRetargetAction with the given action id and text.
|
LabelRetargetAction(String actionID,
String text,
int style)
Constructs a RetargetAction with the given action id, text and style.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
propagateChange(PropertyChangeEvent event)
The action handler has changed.
|
protected void |
setActionHandler(IAction handler)
Sets the action handler.
|
void |
setDisabledImageDescriptor(ImageDescriptor image)
Sets the disabled image for this action, as an image descriptor.
|
void |
setHoverImageDescriptor(ImageDescriptor image)
Sets the hover image for this action, as an image descriptor.
|
void |
setImageDescriptor(ImageDescriptor image)
Sets the image for this action, as an image descriptor.
|
void |
setText(String text)
Sets the action's label text to the given value.
|
void |
setToolTipText(String text)
Sets the tooltip text to the given text.
|
dispose, enableAccelerator, getAccelerator, getActionHandler, isHandled, partActivated, partClosed, partDeactivated, run, runWithEvent, setChecked, setHelpListener, toStringgetActivePart, partBroughtToTop, partOpenedconvertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, notifyResult, removeAcceleratorText, removeMnemonics, setAccelerator, setActionDefinitionId, setDescription, setEnabled, setId, setMenuCreatoraddPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListeneraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddPropertyChangeListener, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, removePropertyChangeListener, setAccelerator, setActionDefinitionId, setDescription, setEnabled, setId, setMenuCreatorpublic LabelRetargetAction(String actionID, String text)
actionID - the retargetable action idtext - the action's text, or null if there is no textpublic LabelRetargetAction(String actionID, String text, int style)
actionID - the retargetable action idtext - the action's text, or null if there is no textstyle - one of AS_PUSH_BUTTON, AS_CHECK_BOX,
AS_DROP_DOWN_MENU, AS_RADIO_BUTTON, and
AS_UNSPECIFIED.protected void propagateChange(PropertyChangeEvent event)
propagateChange in class RetargetActionprotected void setActionHandler(IAction handler)
setActionHandler in class RetargetActionpublic void setDisabledImageDescriptor(ImageDescriptor image)
IAction
Disabled images will be used on platforms that support changing the image
when the item is disabled.Fires a property change event for
the IMAGE property
if the image actually changes as a consequence.
setDisabledImageDescriptor in interface IActionsetDisabledImageDescriptor in class Actionimage - the image, or null if this
action should not have an imageIAction.IMAGEpublic void setHoverImageDescriptor(ImageDescriptor image)
IAction
Hover images will be used on platforms that support changing the image
when the user hovers over the item.Fires a property change event for
the IMAGE property
if the image actually changes as a consequence.
setHoverImageDescriptor in interface IActionsetHoverImageDescriptor in class Actionimage - the image, or null if this
action should not have an imageIAction.IMAGEpublic void setImageDescriptor(ImageDescriptor image)
IAction
Fires a property change event for the IMAGE property
if the image actually changes as a consequence.
setImageDescriptor in interface IActionsetImageDescriptor in class Actionimage - the image, or null if this
action should not have an imageIAction.IMAGEpublic void setText(String text)
setText in interface IActionsetText in class Actiontext - the text, or null if noneIAction.TEXT,
Action.findModifier(java.lang.String),
Action.findKeyCode(java.lang.String)public void setToolTipText(String text)
null clears the tooltip text.setToolTipText in interface IActionsetToolTipText in class Actiontext - the tool tip text, or null if noneIAction.TOOL_TIP_TEXTGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.