Class EventDispatcher

java.lang.Object
org.eclipse.draw2d.EventDispatcher
Direct Known Subclasses:
SWTEventDispatcher

public abstract class EventDispatcher extends Object
Listens to various SWT events and dispatches these events to interested Draw2d objects.
  • Constructor Details

    • EventDispatcher

      public EventDispatcher()
  • Method Details

    • dispatchFocusGained

      public abstract void dispatchFocusGained(FocusEvent e)
      Dispatches a focus gained event.
      Parameters:
      e - the event
    • dispatchFocusLost

      public abstract void dispatchFocusLost(FocusEvent e)
      Dispatches a focus lost event.
      Parameters:
      e - the event
    • dispatchKeyPressed

      public abstract void dispatchKeyPressed(KeyEvent e)
      Dispatches a key pressed event.
      Parameters:
      e - the event
    • dispatchKeyReleased

      public abstract void dispatchKeyReleased(KeyEvent e)
      Dispatches a key released event.
      Parameters:
      e - the event
    • dispatchKeyTraversed

      public abstract void dispatchKeyTraversed(TraverseEvent e)
      Dispatches a key traversed event.
      Parameters:
      e - the event
    • dispatchMouseDoubleClicked

      public abstract void dispatchMouseDoubleClicked(MouseEvent me)
      Dispatches a mouse double clicked event.
      Parameters:
      me - the event
    • dispatchMouseEntered

      public abstract void dispatchMouseEntered(MouseEvent e)
      Dispatches a mouse entered event.
      Parameters:
      e - the event
    • dispatchMouseExited

      public abstract void dispatchMouseExited(MouseEvent e)
      Dispatches a mouse exited event.
      Parameters:
      e - the event
    • dispatchMouseHover

      public abstract void dispatchMouseHover(MouseEvent me)
      Dispatches a mouse hover event.
      Parameters:
      me - the event
    • dispatchMouseMoved

      public abstract void dispatchMouseMoved(MouseEvent me)
      Dispatches a moved event event.
      Parameters:
      me - the event
    • dispatchMousePressed

      public abstract void dispatchMousePressed(MouseEvent me)
      Dispatches a mouse pressed event.
      Parameters:
      me - the event
    • dispatchMouseReleased

      public abstract void dispatchMouseReleased(MouseEvent me)
      Dispatches a mouse released event.
      Parameters:
      me - the event
    • dispatchMouseWheelScrolled

      public void dispatchMouseWheelScrolled(Event event)
      Dispatches a MouseWheel event. Does nothing by default.
      Parameters:
      event - the SWT event
      Since:
      3.1
    • getAccessibilityDispatcher

      protected abstract EventDispatcher.AccessibilityDispatcher getAccessibilityDispatcher()
      Returns the AccessibilityDispatcher.
      Returns:
      the AccessibilityDispatcher
    • getFocusOwner

      public abstract IFigure 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 by setCapture(IFigure).
    • requestFocus

      public abstract void requestFocus(IFigure fig)
      Requests focus for the given figure.
      Parameters:
      fig - the figure requesting focus
    • requestRemoveFocus

      public abstract void requestRemoveFocus(IFigure fig)
      Requests focus to be removed from the given figure.
      Parameters:
      fig - the figure requesting focus be removed
    • setCapture

      protected abstract void setCapture(IFigure figure)
      Sets capture to the given figure. All subsequent events will be sent to the given figure until releaseCapture() is called.
      Parameters:
      figure - the figure capturing the events
    • setControl

      public abstract void setControl(Control control)
      Sets the contol associated with this event dispatcher.
      Parameters:
      control - the control
    • setRoot

      public abstract void setRoot(IFigure figure)
      Sets the root figure for this dispatcher.
      Parameters:
      figure - the root figure
    • updateCursor

      protected abstract void updateCursor()
      Updates the cursor.