|
Eclipse Platform 2.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.eclipse.ui.texteditor.TextNavigationAction
An IAction wrapper for text widget navigational and selection actions.
| 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, IMAGE, TEXT, TOOL_TIP_TEXT |
| Constructor Summary | |
TextNavigationAction(StyledText textWidget,
int action)
Creates a new TextNavigationAction. |
|
| Method Summary | |
void |
addPropertyChangeListener(IPropertyChangeListener listener)
Adds a property change listener to this action. |
int |
getAccelerator()
Returns the accelerator keycode for this action. |
String |
getActionDefinitionId()
Returns the action definition id of this action. |
String |
getDescription()
Returns the action's description if it has one. |
ImageDescriptor |
getDisabledImageDescriptor()
Returns the disabled image for this action as an image descriptor. |
HelpListener |
getHelpListener()
Returns a help listener for this action. |
ImageDescriptor |
getHoverImageDescriptor()
Returns the hover image for this action as an image descriptor. |
String |
getId()
Returns a unique identifier for this action, or null if it has
none. |
ImageDescriptor |
getImageDescriptor()
Returns the image for this action as an image descriptor. |
IMenuCreator |
getMenuCreator()
Returns the menu creator for this action. |
int |
getStyle()
Return this action's style. |
String |
getText()
Returns the text for this action. |
String |
getToolTipText()
Returns the tool tip text for this action. |
boolean |
isChecked()
Returns the checked status of this action. |
boolean |
isEnabled()
Returns whether this action is enabled. |
void |
removePropertyChangeListener(IPropertyChangeListener listener)
Removes the given listener from this action. |
void |
run()
Runs this action. |
void |
runWithEvent(Event event)
Runs this action, passing the triggering SWT event. |
void |
setAccelerator(int keycode)
Sets the accelerator keycode that this action maps to. |
void |
setActionDefinitionId(String id)
Sets the action definition id of this action. |
void |
setChecked(boolean checked)
Sets the checked status of this action. |
void |
setDescription(String text)
Sets this action's description. |
void |
setDisabledImageDescriptor(ImageDescriptor newImage)
Sets the disabled image for this action, as an image descriptor. |
void |
setEnabled(boolean enabled)
Sets the enabled state of this action. |
void |
setHelpListener(HelpListener listener)
Sets a help listener for this action. |
void |
setHoverImageDescriptor(ImageDescriptor newImage)
Sets the hover image for this action, as an image descriptor. |
void |
setId(String id)
Sets the unique identifier for this action. |
void |
setImageDescriptor(ImageDescriptor newImage)
Sets the image for this action, as an image descriptor. |
void |
setMenuCreator(IMenuCreator creator)
Sets the menu creator for this action. |
void |
setText(String text)
Sets the text for this action. |
void |
setToolTipText(String text)
Sets the tool tip text for this action. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextNavigationAction(StyledText textWidget,
int action)
TextNavigationAction.
textWidget - the text widgetaction - the styled text widget action| Method Detail |
public void run()
IActionAction
does nothing.
run in interface IActionpublic void runWithEvent(Event event)
IActionActionContributionItem calls this method
instead of run().
The default implementation of this method in Action
simply calls run() for backwards compatibility.
NOTE: This is experimental API, which may change in the future.
runWithEvent in interface IActionevent - the SWT event which triggered this action being runpublic void setActionDefinitionId(String id)
IAction
setActionDefinitionId in interface IActionid - the action definition idpublic String getActionDefinitionId()
IAction
getActionDefinitionId in interface IActionnull if nonepublic void setId(String id)
IAction
setId in interface IActionid - the action idActionContributionItem,
IContributionItem.getId()public String getId()
IActionnull if it has
none.
getId in interface IActionnull if nonepublic void addPropertyChangeListener(IPropertyChangeListener listener)
IAction
addPropertyChangeListener in interface IActionlistener - a property change listenerpublic int getAccelerator()
IActionMenuItem.getAccelerator.
getAccelerator in interface IActionMenuItem.getAccelerator()public String getDescription()
IActiongetToolTipText().
getDescription in interface IActionpublic ImageDescriptor getDisabledImageDescriptor()
IAction
This method is associated with the IMAGE property;
property change events are reported when its value changes.
getDisabledImageDescriptor in interface IActionnull if this action has no imageIAction.IMAGEpublic HelpListener getHelpListener()
IAction
getHelpListener in interface IActionpublic ImageDescriptor getHoverImageDescriptor()
IAction
Hover images will be used on platforms that support changing the image
when the user hovers over the item. This method is associated with
the IMAGE property;
property change events are reported when its value changes.
getHoverImageDescriptor in interface IActionnull if this action has no imageIAction.IMAGEpublic ImageDescriptor getImageDescriptor()
IAction
This method is associated with the IMAGE property;
property change events are reported when its value changes.
getImageDescriptor in interface IActionnull if this action has no imageIAction.IMAGEpublic IMenuCreator getMenuCreator()
IAction
getMenuCreator in interface IActionnull if nonepublic int getStyle()
IAction
getStyle in interface IActionAS_PUSH_BUTTON, AS_CHECK_BOX,
AS_RADIO_BUTTON and AS_DROP_DOWN_MENU.public String getText()
IAction
This method is associated with the TEXT property;
property change events are reported when its value changes.
getText in interface IActionnull if noneIAction.TEXTpublic String getToolTipText()
IAction
This method is associated with the TOOL_TIP_TEXT property;
property change events are reported when its value changes.
getToolTipText in interface IActionnull if noneIAction.TOOL_TIP_TEXTpublic boolean isChecked()
IActionAS_CHECK_BOX or AS_RADIO_BUTTON.
This method is associated with the CHECKED property;
property change events are reported when its value changes.
isChecked in interface IActionIAction.CHECKEDpublic boolean isEnabled()
IAction
This method is associated with the ENABLED property;
property change events are reported when its value changes.
isEnabled in interface IActiontrue if enabled, and
false if disabledIAction.ENABLEDpublic void removePropertyChangeListener(IPropertyChangeListener listener)
IAction
removePropertyChangeListener in interface IActionlistener - a property change listenerpublic void setAccelerator(int keycode)
IActionSWT.CTRL | 'Z'.
Use 0 for no accelerator.
setAccelerator in interface IActionpublic void setChecked(boolean checked)
IActionAS_CHECK_BOX or AS_RADIO_BUTTON.
Fires a property change event for the CHECKED property
if the checked status actually changes as a consequence.
setChecked in interface IActionchecked - the new checked statusIAction.CHECKEDpublic void setDescription(String text)
IAction
Fires a property change event for the DESCRIPTION property
if the description actually changes as a consequence.
setDescription in interface IActiontext - the description, or null to clear the descriptionIAction.DESCRIPTIONpublic void setDisabledImageDescriptor(ImageDescriptor newImage)
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 IActionnewImage - the image, or null if this
action should not have an imageIAction.IMAGEpublic void setEnabled(boolean enabled)
IAction
When an action is in the enabled state, the control associated with
it is active; triggering it will end up inkoking this action's
run method.
Fires a property change event for the ENABLED property
if the enabled state actually changes as a consequence.
setEnabled in interface IActionenabled - true to enable, and
false to disableIAction.ENABLEDpublic void setHelpListener(HelpListener listener)
IAction
setHelpListener in interface IActionlistener - a help listener for this actionpublic void setHoverImageDescriptor(ImageDescriptor newImage)
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 IActionnewImage - the image, or null if this
action should not have an imageIAction.IMAGEpublic void setImageDescriptor(ImageDescriptor newImage)
IAction
Fires a property change event for the IMAGE property
if the image actually changes as a consequence.
setImageDescriptor in interface IActionnewImage - the image, or null if this
action should not have an imageIAction.IMAGEpublic void setMenuCreator(IMenuCreator creator)
IActionAS_DROP_DOWN_MENU.
setMenuCreator in interface IActioncreator - the menu creator, or null if nonepublic void setText(String text)
IActionAn accelerator specification may follow the actual text, separated from it by an '@' or a '\t' character. An accelerator specification consists of zero or more modifier tokens followed by a key code token. The tokens are separated by a '+' character.
Fires a property change event for the TEXT property
if the text actually changes as a consequence.
setText in interface IActiontext - the text, or null if noneIAction.TEXT,
Action.findModifier(java.lang.String),
Action.findKeyCode(java.lang.String)public void setToolTipText(String text)
IAction
Fires a property change event for the TOOL_TIP_TEXT property
if the tool tip text actually changes as a consequence.
setToolTipText in interface IActiontext - the tool tip text, or null if noneIAction.TOOL_TIP_TEXT
|
Eclipse Platform 2.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||