| java.lang.Object org.eclipse.ui.actions.TextActionHandler
TextActionHandler | public class TextActionHandler (Code) | | Handles the redirection of the global Cut, Copy, Paste, and
Select All actions to either the current inline text control
or the part's supplied action handler.
This class may be instantiated; it is not intended to be subclassed.
Example usage:
textActionHandler = new TextActionHandler(this.getViewSite().getActionBars());
textActionHandler.addText((Text)textCellEditor1.getControl());
textActionHandler.addText((Text)textCellEditor2.getControl());
textActionHandler.setSelectAllAction(selectAllAction);
|
Constructor Summary | |
public | TextActionHandler(IActionBars actionBar) Creates a Text control action handler
for the global Cut, Copy, Paste, Delete, and Select All
of the action bar. |
Method Summary | |
public void | addText(Text textControl) Add a Text control to the handler
so that the Cut, Copy, Paste, Delete, and Select All
actions are redirected to it when active. | public void | dispose() | public void | removeText(Text textControl) Removes a Text control from the handler
so that the Cut, Copy, Paste, Delete, and Select All
actions are no longer redirected to it when active. | public void | setCopyAction(IAction action) Set the default IAction handler for the Copy
action. | public void | setCutAction(IAction action) Set the default IAction handler for the Cut
action. | public void | setDeleteAction(IAction action) Set the default IAction handler for the Delete
action. | public void | setPasteAction(IAction action) Set the default IAction handler for the Paste
action. | public void | setSelectAllAction(IAction action) Set the default IAction handler for the Select All
action. |
TextActionHandler | public TextActionHandler(IActionBars actionBar)(Code) | | Creates a Text control action handler
for the global Cut, Copy, Paste, Delete, and Select All
of the action bar.
Parameters: actionBar - the action bar to register globalaction handlers for Cut, Copy, Paste, Delete, and Select All |
addText | public void addText(Text textControl)(Code) | | Add a Text control to the handler
so that the Cut, Copy, Paste, Delete, and Select All
actions are redirected to it when active.
Parameters: textControl - the inline Text control |
dispose | public void dispose()(Code) | | Dispose of this action handler
|
removeText | public void removeText(Text textControl)(Code) | | Removes a Text control from the handler
so that the Cut, Copy, Paste, Delete, and Select All
actions are no longer redirected to it when active.
Parameters: textControl - the inline Text control |
setCopyAction | public void setCopyAction(IAction action)(Code) | | Set the default IAction handler for the Copy
action. This IAction is run only if no active
inline text control.
Parameters: action - the IAction to run for theCopy action, or null if not interested. |
setCutAction | public void setCutAction(IAction action)(Code) | | Set the default IAction handler for the Cut
action. This IAction is run only if no active
inline text control.
Parameters: action - the IAction to run for theCut action, or null if not interested. |
setDeleteAction | public void setDeleteAction(IAction action)(Code) | | Set the default IAction handler for the Delete
action. This IAction is run only if no active
inline text control.
Parameters: action - the IAction to run for theDelete action, or null if not interested. |
setPasteAction | public void setPasteAction(IAction action)(Code) | | Set the default IAction handler for the Paste
action. This IAction is run only if no active
inline text control.
Parameters: action - the IAction to run for thePaste action, or null if not interested. |
setSelectAllAction | public void setSelectAllAction(IAction action)(Code) | | Set the default IAction handler for the Select All
action. This IAction is run only if no active
inline text control.
Parameters: action - the IAction to run for theSelect All action, or null if not interested. |
|
|