|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.actions.TextActionHandler
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 | |
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 | |
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. |
void |
dispose()
Dispose of this action handler |
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. |
void |
setCopyAction(IAction action)
Set the default IAction handler for the Copy
action. |
void |
setCutAction(IAction action)
Set the default IAction handler for the Cut
action. |
void |
setDeleteAction(IAction action)
Set the default IAction handler for the Delete
action. |
void |
setPasteAction(IAction action)
Set the default IAction handler for the Paste
action. |
void |
setSelectAllAction(IAction action)
Set the default IAction handler for the Select All
action. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextActionHandler(IActionBars actionBar)
Text
control action handler
for the global Cut, Copy, Paste, Delete, and Select All
of the action bar.
actionBar
- the action bar to register global
action handlers for Cut, Copy, Paste, Delete,
and Select AllMethod Detail |
public void addText(Text textControl)
Text
control to the handler
so that the Cut, Copy, Paste, Delete, and Select All
actions are redirected to it when active.
textControl
- the inline Text
controlpublic void dispose()
public void removeText(Text textControl)
Text
control from the handler
so that the Cut, Copy, Paste, Delete, and Select All
actions are no longer redirected to it when active.
textControl
- the inline Text
controlpublic void setCopyAction(IAction action)
IAction
handler for the Copy
action. This IAction
is run only if no active
inline text control.
action
- the IAction
to run for the
Copy action, or null if not interested.
public void setCutAction(IAction action)
IAction
handler for the Cut
action. This IAction
is run only if no active
inline text control.
action
- the IAction
to run for the
Cut action, or null if not interested.
public void setPasteAction(IAction action)
IAction
handler for the Paste
action. This IAction
is run only if no active
inline text control.
action
- the IAction
to run for the
Paste action, or null if not interested.
public void setSelectAllAction(IAction action)
IAction
handler for the Select All
action. This IAction
is run only if no active
inline text control.
action
- the IAction
to run for the
Select All action, or null if not interested.
public void setDeleteAction(IAction action)
IAction
handler for the Delete
action. This IAction
is run only if no active
inline text control.
action
- the IAction
to run for the
Delete action, or null if not interested.
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |