Interface PopupSource<V,E>

Type Parameters:
V - the vertex type
E - the edge type

public interface PopupSource<V,E>
An interface that provides graph and component information to the PopupRegulator
  • Method Details

    • getToolTipInfo

      ToolTipInfo<?> getToolTipInfo(MouseEvent event)
      Returns the tool tip info object for the given mouse event. Implementations will use the event to determine whether a popup should be created for a vertex, edge, the graph or not at all.
      Parameters:
      event - the event
      Returns:
      the info; null for no popup
    • getVertex

      V getVertex(MouseEvent event)
      Returns a vertex for the given event
      Parameters:
      event - the event
      Returns:
      the vertex or null
    • getEdge

      E getEdge(MouseEvent event)
      Returns an edge for the given event
      Parameters:
      event - the event
      Returns:
      the edge or null
    • addMouseMotionListener

      void addMouseMotionListener(MouseMotionListener l)
      Adds the given mouse motion listener to the graph component. This allows the popup regulator to decided when to show and hide popups.
      Parameters:
      l - the listener
    • repaint

      void repaint()
      Signals that the graph needs to repaint
    • getPopupParent

      Window getPopupParent()
      Returns a suitable window parent for the popup window
      Returns:
      the window parent