Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.actions
Class LabelRetargetAction


java.lang.Object
  extended by 

org.eclipse.core.commands.common.EventManager
      extended by 

org.eclipse.jface.action.AbstractAction
          extended by 

org.eclipse.jface.action.Action
              extended by 

org.eclipse.ui.actions.PartEventAction
                  extended by 

org.eclipse.ui.actions.RetargetAction
                      extended by 
org.eclipse.ui.actions.LabelRetargetAction
All Implemented Interfaces:
IAction, ActionFactory.IWorkbenchAction, IPartListener

public class LabelRetargetAction
extends RetargetAction

A 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.

Since:
2.0
Restriction:
This class is not intended to be subclassed by clients.

Field Summary
 
Fields inherited from interface org.eclipse.jface.action. IAction
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 Summary
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.
 
Method Summary
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.
 
Methods inherited from class org.eclipse.ui.actions. RetargetAction
dispose, enableAccelerator, getAccelerator, getActionHandler, isHandled, partActivated, partClosed, partDeactivated, run, runWithEvent, setChecked, setHelpListener, toString
 
Methods inherited from class org.eclipse.ui.actions. PartEventAction
getActivePart, partBroughtToTop, partOpened
 
Methods inherited from class org.eclipse.jface.action. Action
convertAccelerator, 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, setMenuCreator
 
Methods inherited from class org.eclipse.jface.action. AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.eclipse.core.commands.common. EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action. IAction
addPropertyChangeListener, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, removePropertyChangeListener, setAccelerator, setActionDefinitionId, setDescription, setEnabled, setId, setMenuCreator
 

Constructor Detail

LabelRetargetAction

public LabelRetargetAction(
String actionID,
                           
String text)
Constructs a LabelRetargetAction with the given action id and text.

Parameters:
actionID - the retargetable action id
text - the action's text, or null if there is no text

LabelRetargetAction

public LabelRetargetAction(
String actionID,
                           
String text,
                           int style)
Constructs a RetargetAction with the given action id, text and style.

Parameters:
actionID - the retargetable action id
text - the action's text, or null if there is no text
style - one of AS_PUSH_BUTTON, AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_RADIO_BUTTON, and AS_UNSPECIFIED.
Since:
3.0
Method Detail

propagateChange

protected void propagateChange(
PropertyChangeEvent event)
The action handler has changed. Update self.

Overrides:
propagateChange in class RetargetAction

setActionHandler

protected void setActionHandler(
IAction handler)
Sets the action handler. Update self.

Overrides:
setActionHandler in class RetargetAction

setDisabledImageDescriptor

public void setDisabledImageDescriptor(
ImageDescriptor image)
Description copied from interface: IAction
Sets the disabled image for this action, as an image descriptor.

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.

Specified by:
setDisabledImageDescriptor in interface IAction
Overrides:
setDisabledImageDescriptor in class Action
Parameters:
image - the image, or null if this action should not have an image
See Also:
IAction.IMAGE

setHoverImageDescriptor

public void setHoverImageDescriptor(
ImageDescriptor image)
Description copied from interface: IAction
Sets the hover image for this action, as an image descriptor.

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.

Specified by:
setHoverImageDescriptor in interface IAction
Overrides:
setHoverImageDescriptor in class Action
Parameters:
image - the image, or null if this action should not have an image
See Also:
IAction.IMAGE

setImageDescriptor

public void setImageDescriptor(
ImageDescriptor image)
Description copied from interface: IAction
Sets the image for this action, as an image descriptor.

Fires a property change event for the IMAGE property if the image actually changes as a consequence.

Note: This operation is a hint and is not supported in all contexts on platforms that do not have this concept (for example, Windows NT). Furthermore, some platforms (such as GTK), cannot display both a check box and an image at the same time. Instead, they hide the image and display the check box.

Specified by:
setImageDescriptor in interface IAction
Overrides:
setImageDescriptor in class Action
Parameters:
image - the image, or null if this action should not have an image
See Also:
IAction.IMAGE

setText

public void setText(
String text)
Sets the action's label text to the given value.

Specified by:
setText in interface IAction
Overrides:
setText in class Action
Parameters:
text - the text, or null if none
See Also:
IAction.TEXT, Action.findModifier(java.lang.String), Action.findKeyCode(java.lang.String)

setToolTipText

public void setToolTipText(
String text)
Sets the tooltip text to the given text. The value null clears the tooltip text.

Specified by:
setToolTipText in interface IAction
Overrides:
setToolTipText in class Action
Parameters:
text - the tool tip text, or null if none
See Also:
IAction.TOOL_TIP_TEXT

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire