public abstract class AbstractRulerActionDelegate extends ActionDelegate implements IEditorActionDelegate, IActionDelegate2, MouseListener, IMenuListener
IVerticalRulerInfo. The adapter updates the
adapter (inner) action on menu and mouse action on the vertical ruler.
Extending classes must implement the factory method
createAction(ITextEditor editor, IVerticalRulerInfo).
| Constructor and Description |
|---|
AbstractRulerActionDelegate() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract IAction |
createAction(ITextEditor editor,
IVerticalRulerInfo rulerInfo)
The factory method creating the underlying action.
|
void |
menuAboutToShow(IMenuManager manager)
Notifies this listener that the menu is about to be shown by
the given menu manager.
|
void |
mouseDoubleClick(MouseEvent e)
Sent when a mouse button is pressed twice within the
(operating system specified) double click period.
|
void |
mouseDown(MouseEvent e)
Sent when a mouse button is pressed.
|
void |
mouseUp(MouseEvent e)
Sent when a mouse button is released.
|
void |
run(IAction callerAction)
The
ActionDelegate implementation of this
IActionDelegate method does nothing. |
void |
runWithEvent(IAction action,
Event event)
The
ActionDelegate implementation of this
IActionDelegate2 method redirects to the run
method. |
void |
selectionChanged(IAction action,
ISelection selection)
The
ActionDelegate implementation of this
IActionDelegate method does nothing. |
void |
setActiveEditor(IAction callerAction,
IEditorPart targetEditor)
Sets the active editor for the delegate.
|
dispose, initclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdispose, initprotected abstract IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo)
editor - the editor the action to be created will work onrulerInfo - the vertical ruler the action to be created will work onpublic void setActiveEditor(IAction callerAction, IEditorPart targetEditor)
IEditorActionDelegatesetActiveEditor in interface IEditorActionDelegatecallerAction - the action proxy that handles presentation portion of the actiontargetEditor - the new editor targetpublic void run(IAction callerAction)
ActionDelegateActionDelegate implementation of this
IActionDelegate method does nothing. Subclasses may
reimplement.
Note: This method is not called directly by the proxy action. Only
by the default implementation of runWithEvent of this
abstract class.
run in interface IActionDelegaterun in class ActionDelegatecallerAction - the action proxy that handles the presentation portion of the
actionpublic void runWithEvent(IAction action, Event event)
ActionDelegateActionDelegate implementation of this
IActionDelegate2 method redirects to the run
method. Subclasses may reimplement.runWithEvent in interface IActionDelegate2runWithEvent in class ActionDelegateaction - the action proxy that handles the presentation portion of
the actionevent - the SWT event which triggered this action being runpublic void selectionChanged(IAction action, ISelection selection)
ActionDelegateActionDelegate implementation of this
IActionDelegate method does nothing. Subclasses may
reimplement.selectionChanged in interface IActionDelegateselectionChanged in class ActionDelegateaction - the action proxy that handles presentation portion of
the actionselection - the current selection, or null if there
is no selection.public void menuAboutToShow(IMenuManager manager)
IMenuListenermenuAboutToShow in interface IMenuListenermanager - the menu managerpublic void mouseDoubleClick(MouseEvent e)
MouseListenermouseDoubleClick in interface MouseListenere - an event containing information about the mouse double clickDisplay.getDoubleClickTime()public void mouseDown(MouseEvent e)
MouseListenermouseDown in interface MouseListenere - an event containing information about the mouse button presspublic void mouseUp(MouseEvent e)
MouseListenermouseUp in interface MouseListenere - an event containing information about the mouse button releaseGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.