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 Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addMouseMotionListener​(java.awt.event.MouseMotionListener l)
      Adds the given mouse motion listener to the graph component.
      E getEdge​(java.awt.event.MouseEvent event)
      Returns an edge for the given event
      java.awt.Window getPopupParent()
      Returns a suitable window parent for the popup window
      ToolTipInfo<?> getToolTipInfo​(java.awt.event.MouseEvent event)
      Returns the tool tip info object for the given mouse event.
      V getVertex​(java.awt.event.MouseEvent event)
      Returns a vertex for the given event
      void repaint()
      Signals that the graph needs to repaint
    • Method Detail

      • getToolTipInfo

        ToolTipInfo<?> getToolTipInfo​(java.awt.event.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​(java.awt.event.MouseEvent event)
        Returns a vertex for the given event
        Parameters:
        event - the event
        Returns:
        the vertex or null
      • getEdge

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

        void addMouseMotionListener​(java.awt.event.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

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