Package org.eclipse.draw2d
Class EventDispatcher
java.lang.Object
org.eclipse.draw2d.EventDispatcher
- Direct Known Subclasses:
SWTEventDispatcher
Listens to various SWT events and dispatches these events to interested
Draw2d objects.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
CombinesAccessibleControlListener
andAccessibleListener
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Dispatches a focus gained event.abstract void
Dispatches a focus lost event.abstract void
Dispatches a key pressed event.abstract void
Dispatches a key released event.abstract void
Dispatches a key traversed event.abstract void
Dispatches a mouse double clicked event.abstract void
Dispatches a mouse entered event.abstract void
Dispatches a mouse exited event.abstract void
Dispatches a mouse hover event.abstract void
Dispatches a moved event event.abstract void
Dispatches a mouse pressed event.abstract void
Dispatches a mouse released event.void
dispatchMouseWheelScrolled
(Event event) Dispatches a MouseWheel event.protected abstract EventDispatcher.AccessibilityDispatcher
Returns the AccessibilityDispatcher.abstract IFigure
Returns the IFigure that currently has focus.abstract boolean
protected abstract void
Releases capture initiated bysetCapture(IFigure)
.abstract void
requestFocus
(IFigure fig) Requests focus for the given figure.abstract void
Requests focus to be removed from the given figure.protected abstract void
setCapture
(IFigure figure) Sets capture to the given figure.abstract void
setControl
(Control control) Sets the contol associated with this event dispatcher.abstract void
Sets the root figure for this dispatcher.protected abstract void
Updates the cursor.
-
Constructor Details
-
EventDispatcher
public EventDispatcher()
-
-
Method Details
-
dispatchFocusGained
Dispatches a focus gained event.- Parameters:
e
- the event
-
dispatchFocusLost
Dispatches a focus lost event.- Parameters:
e
- the event
-
dispatchKeyPressed
Dispatches a key pressed event.- Parameters:
e
- the event
-
dispatchKeyReleased
Dispatches a key released event.- Parameters:
e
- the event
-
dispatchKeyTraversed
Dispatches a key traversed event.- Parameters:
e
- the event
-
dispatchMouseDoubleClicked
Dispatches a mouse double clicked event.- Parameters:
me
- the event
-
dispatchMouseEntered
Dispatches a mouse entered event.- Parameters:
e
- the event
-
dispatchMouseExited
Dispatches a mouse exited event.- Parameters:
e
- the event
-
dispatchMouseHover
Dispatches a mouse hover event.- Parameters:
me
- the event
-
dispatchMouseMoved
Dispatches a moved event event.- Parameters:
me
- the event
-
dispatchMousePressed
Dispatches a mouse pressed event.- Parameters:
me
- the event
-
dispatchMouseReleased
Dispatches a mouse released event.- Parameters:
me
- the event
-
dispatchMouseWheelScrolled
Dispatches a MouseWheel event. Does nothing by default.- Parameters:
event
- the SWT event- Since:
- 3.1
-
getAccessibilityDispatcher
Returns the AccessibilityDispatcher.- Returns:
- the AccessibilityDispatcher
-
getFocusOwner
Returns the IFigure that currently has focus.- Returns:
- the IFigure that currently has focus
- Since:
- 3.6
-
isCaptured
public abstract boolean isCaptured()- Returns:
- whether events are captured by a figure
-
releaseCapture
protected abstract void releaseCapture()Releases capture initiated bysetCapture(IFigure)
. -
requestFocus
Requests focus for the given figure.- Parameters:
fig
- the figure requesting focus
-
requestRemoveFocus
Requests focus to be removed from the given figure.- Parameters:
fig
- the figure requesting focus be removed
-
setCapture
Sets capture to the given figure. All subsequent events will be sent to the given figure untilreleaseCapture()
is called.- Parameters:
figure
- the figure capturing the events
-
setControl
Sets the contol associated with this event dispatcher.- Parameters:
control
- the control
-
setRoot
Sets the root figure for this dispatcher.- Parameters:
figure
- the root figure
-
updateCursor
protected abstract void updateCursor()Updates the cursor.
-