Interface ContextMenuRequest<E extends Edge>

Type Parameters:
E - the edge type of the rendered graph
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ContextMenuRequest<E extends Edge>
Notification fired by CanvasInteraction when the user triggers a context-menu request (right button, or Control+click on macOS). The listener receives the pointer position in view coordinates and the element under the pointer, if any; the actual menu is built in a later phase (N4), so this phase only delivers the request.
Author:
posenato
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    request(Point2D viewPoint, LabeledNode node, E edge)
    Delivers a context-menu request.
  • Method Details

    • request

      void request(@Nonnull Point2D viewPoint, @Nullable LabeledNode node, @Nullable E edge)
      Delivers a context-menu request.
      Parameters:
      viewPoint - the pointer position in view (component) coordinates, not null
      node - the node under the pointer, or null if there is none
      edge - the edge under the pointer, or null if there is none. When node is not null this is always null: a node hit takes precedence over an edge hit