|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.EventDispatcher | +--org.eclipse.draw2d.SWTEventDispatcher
The SWTEventDispatcher provides draw2d with the ability to dispatch SWT Events. The
LightweightSystem
adds SWT event listeners on its Canvas.
When the Canvas receives an SWT event, it calls the appropriate dispatcher method in
SWTEventDispatcher.
Nested Class Summary | |
protected class |
SWTEventDispatcher.FigureAccessibilityDispatcher
Implements EventDispatcher.AccessibilityDispatcher but does nothing in the implementation. |
Nested classes inherited from class org.eclipse.draw2d.EventDispatcher |
|
Field Summary | |
protected static int |
ANY_BUTTON
Used to tell if any button is pressed without regard to the specific button. |
protected Control |
control
The control this dispatcher is listening to. |
Constructor Summary | |
SWTEventDispatcher()
|
Method Summary | |
void |
dispatchFocusGained(FocusEvent e)
Dispatches a focus gained event. |
void |
dispatchFocusLost(FocusEvent e)
Dispatches a focus lost event. |
void |
dispatchKeyPressed(KeyEvent e)
Dispatches a key pressed event. |
void |
dispatchKeyReleased(KeyEvent e)
Dispatches a key released event. |
void |
dispatchKeyTraversed(TraverseEvent e)
Dispatches a key traversed event. |
void |
dispatchMouseDoubleClicked(MouseEvent me)
Dispatches a mouse double clicked event. |
void |
dispatchMouseEntered(MouseEvent me)
Dispatches a mouse entered event. |
void |
dispatchMouseExited(MouseEvent me)
Dispatches a mouse exited event. |
void |
dispatchMouseHover(MouseEvent me)
Dispatches a mouse hover event. |
void |
dispatchMouseMoved(MouseEvent me)
Dispatches a moved event event. |
void |
dispatchMousePressed(MouseEvent me)
Dispatches a mouse pressed event. |
void |
dispatchMouseReleased(MouseEvent me)
Dispatches a mouse released event. |
protected EventDispatcher.AccessibilityDispatcher |
getAccessibilityDispatcher()
Returns the AccessibilityDispatcher. |
protected MouseEvent |
getCurrentEvent()
Returns the current mouse event. |
protected IFigure |
getCursorTarget()
Returns the figure that the cursor is over. |
protected FocusTraverseManager |
getFocusTraverseManager()
Returns the FocusTraverseManager which is used to determine which figure will get focus when a TAB or ALT+TAB key sequence occurs. |
protected IFigure |
getMouseTarget()
Returns the figure that is the target of mouse events. |
protected IFigure |
getRoot()
Returns the root figure for this dispatcher. |
protected ToolTipHelper |
getToolTipHelper()
Returns the ToolTipHelper used to display tooltips on hover events. |
boolean |
isCaptured()
|
protected void |
releaseCapture()
Releases capture initiated by setCapture(IFigure) . |
void |
requestFocus(IFigure fig)
Requests focus for the given figure. |
void |
requestRemoveFocus(IFigure fig)
Requests focus to be removed from the given figure. |
protected void |
setCapture(IFigure figure)
Sets capture to the given figure. |
void |
setControl(Control c)
Sets the contol associated with this event dispatcher. |
protected void |
setCursor(Cursor c)
Sets the mouse cursor. |
void |
setEnableKeyTraversal(boolean traverse)
Enables key traversal via TAB and ALT+TAB if traverse is true .
|
protected void |
setFigureUnderCursor(IFigure f)
Sets the figure under the mouse cursor. |
protected void |
setFocus(IFigure fig)
Sets the focus figure. |
protected void |
setHoverSource(Figure figure,
MouseEvent me)
Sets the figure that the mouse cursor is hovering over. |
protected void |
setMouseTarget(IFigure figure)
Sets the given figure to be the target of future mouse events. |
void |
setRoot(IFigure figure)
Sets the root figure for this dispatcher. |
protected void |
updateCursor()
Updates the cursor. |
protected void |
updateFigureUnderCursor(MouseEvent me)
Updates the figure under the cursor, unless the mouse is captured, in which case all mouse events will be routed to the figure that captured the mouse. |
protected void |
updateHoverSource(MouseEvent me)
Updates the figure that will receive hover events. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int ANY_BUTTON
protected Control control
Constructor Detail |
public SWTEventDispatcher()
Method Detail |
public void dispatchFocusGained(FocusEvent e)
EventDispatcher
dispatchFocusGained
in class EventDispatcher
e
- the eventEventDispatcher.dispatchFocusGained(FocusEvent)
public void dispatchFocusLost(FocusEvent e)
EventDispatcher
dispatchFocusLost
in class EventDispatcher
e
- the eventEventDispatcher.dispatchFocusLost(FocusEvent)
public void dispatchKeyPressed(KeyEvent e)
EventDispatcher
dispatchKeyPressed
in class EventDispatcher
e
- the eventEventDispatcher.dispatchKeyPressed(KeyEvent)
public void dispatchKeyReleased(KeyEvent e)
EventDispatcher
dispatchKeyReleased
in class EventDispatcher
e
- the eventEventDispatcher.dispatchKeyReleased(KeyEvent)
public void dispatchKeyTraversed(TraverseEvent e)
EventDispatcher
dispatchKeyTraversed
in class EventDispatcher
e
- the eventEventDispatcher.dispatchKeyTraversed(TraverseEvent)
public void dispatchMouseHover(MouseEvent me)
EventDispatcher
dispatchMouseHover
in class EventDispatcher
me
- the eventEventDispatcher.dispatchMouseHover(MouseEvent)
public void dispatchMouseDoubleClicked(MouseEvent me)
EventDispatcher
dispatchMouseDoubleClicked
in class EventDispatcher
me
- the eventEventDispatcher.dispatchMouseDoubleClicked(MouseEvent)
public void dispatchMouseEntered(MouseEvent me)
EventDispatcher
dispatchMouseEntered
in class EventDispatcher
me
- the eventEventDispatcher.dispatchMouseEntered(MouseEvent)
public void dispatchMouseExited(MouseEvent me)
EventDispatcher
dispatchMouseExited
in class EventDispatcher
me
- the eventEventDispatcher.dispatchMouseExited(MouseEvent)
public void dispatchMousePressed(MouseEvent me)
EventDispatcher
dispatchMousePressed
in class EventDispatcher
me
- the eventEventDispatcher.dispatchMousePressed(MouseEvent)
public void dispatchMouseMoved(MouseEvent me)
EventDispatcher
dispatchMouseMoved
in class EventDispatcher
me
- the eventEventDispatcher.dispatchMouseMoved(MouseEvent)
public void dispatchMouseReleased(MouseEvent me)
EventDispatcher
dispatchMouseReleased
in class EventDispatcher
me
- the eventEventDispatcher.dispatchMouseReleased(MouseEvent)
protected EventDispatcher.AccessibilityDispatcher getAccessibilityDispatcher()
EventDispatcher
getAccessibilityDispatcher
in class EventDispatcher
EventDispatcher.getAccessibilityDispatcher()
protected MouseEvent getCurrentEvent()
protected IFigure getCursorTarget()
protected ToolTipHelper getToolTipHelper()
protected final FocusTraverseManager getFocusTraverseManager()
protected IFigure getMouseTarget()
protected IFigure getRoot()
public boolean isCaptured()
isCaptured
in class EventDispatcher
EventDispatcher.isCaptured()
protected void releaseCapture()
EventDispatcher
EventDispatcher.setCapture(IFigure)
.
releaseCapture
in class EventDispatcher
EventDispatcher.releaseCapture()
public void requestFocus(IFigure fig)
EventDispatcher
requestFocus
in class EventDispatcher
fig
- the figure requesting focusEventDispatcher.requestFocus(IFigure)
public void requestRemoveFocus(IFigure fig)
EventDispatcher
requestRemoveFocus
in class EventDispatcher
fig
- the figure requesting focus be removedEventDispatcher.requestRemoveFocus(IFigure)
protected void setCapture(IFigure figure)
EventDispatcher
EventDispatcher.releaseCapture()
is called.
setCapture
in class EventDispatcher
figure
- the figure capturing the eventsEventDispatcher.setCapture(IFigure)
public void setControl(Control c)
EventDispatcher
setControl
in class EventDispatcher
c
- the controlEventDispatcher.setControl(Control)
protected void setCursor(Cursor c)
c
- the new cursorpublic void setEnableKeyTraversal(boolean traverse)
true
.
Disables it otherwise.
traverse
- whether key traversal should be enabledprotected void setFigureUnderCursor(IFigure f)
f
- the new figure under the cursorprotected void setFocus(IFigure fig)
null
,
IFigure.handleFocusLost(FocusEvent)
is called on the current focused figure. If
the new focus figure is not null
, this will call
IFigure.handleFocusGained(FocusEvent)
on the new focused figure.
fig
- the new focus figureprotected void setHoverSource(Figure figure, MouseEvent me)
figure
- the new hover sourceme
- the mouse eventprotected void setMouseTarget(IFigure figure)
figure
- the new mouse targetpublic void setRoot(IFigure figure)
EventDispatcher
setRoot
in class EventDispatcher
figure
- the root figureEventDispatcher.setRoot(IFigure)
protected void updateCursor()
EventDispatcher
updateCursor
in class EventDispatcher
EventDispatcher.updateCursor()
protected void updateFigureUnderCursor(MouseEvent me)
me
- the mouse eventprotected void updateHoverSource(MouseEvent me)
me
- the mouse event
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |