public void dispatch()

in cell/src/main/java/jetbrains/jetpad/cell/event/CellEventSpec.java [51:81]


  public void dispatch(Cell c, EventT e, CellTrait ct) {
    if (this == CellEventSpec.FOCUS_GAINED) {
      ct.onFocusGained(c, (FocusEvent) e);
    } else if (this == CellEventSpec.FOCUS_LOST) {
      ct.onFocusLost(c, (FocusEvent) e);
    } else if (this == CellEventSpec.MOUSE_CLICKED) {
      ct.onMouseClicked(c, (MouseEvent) e);
    } else if (this == CellEventSpec.MOUSE_PRESSED) {
      ct.onMousePressed(c, (MouseEvent) e);
    } else if (this == CellEventSpec.MOUSE_RELEASED) {
      ct.onMouseReleased(c, (MouseEvent) e);
    } else if (this == CellEventSpec.MOUSE_MOVED) {
      ct.onMouseMoved(c, (MouseEvent) e);
    } else if (this == CellEventSpec.MOUSE_DRAGGED) {
      ct.onMouseDragged(c, (MouseEvent) e);
    } else if (this == CellEventSpec.MOUSE_ENTERED) {
      ct.onMouseEntered(c, (MouseEvent) e);
    } else if (this == CellEventSpec.MOUSE_LEFT) {
      ct.onMouseLeft(c, (MouseEvent) e);
    } else if (this == CellEventSpec.COPY) {
      ct.onCopy(c, (CopyCutEvent) e);
    } else if (this == CellEventSpec.CUT) {
      ct.onCut(c, (CopyCutEvent) e);
    } else if (this == CellEventSpec.PASTE) {
      ct.onPaste(c, (PasteEvent) e);
    } else if (this == CellEventSpec.COMPLETE) {
      ct.onComplete(c, (CompletionEvent) e);
    } else {
      throw new IllegalStateException("Unknown event type " + e);
    }
  }