Interface DotElement

  • All Superinterfaces:
    java.util.EventListener, java.awt.event.MouseListener
    All Known Implementing Classes:
    AbstractDotElement, Dot, DotCluster, DotEdge, DotNode

    public interface DotElement
    extends java.awt.event.MouseListener
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addMouseListener​(java.awt.event.MouseListener l)
      Please note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes).
      void addSelectionListener​(DotElementSelectionListener listener)
      Add a selection/deselection listener.
      java.lang.String getId()  
      java.lang.String getLabel()  
      java.lang.String getOption​(java.lang.String key)  
      java.util.Set<java.lang.String> getOptionKeySet()  
      java.util.List<DotElementSelectionListener> getSelectionListeners()  
      boolean isSelectable()
      Please note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes).
      void setLabel​(java.lang.String label)  
      void setOption​(java.lang.String key, java.lang.String value)  
      void setSelectable​(boolean selectable)
      Sets whether this node can be selected.
      • Methods inherited from interface java.awt.event.MouseListener

        mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
    • Method Detail

      • getLabel

        java.lang.String getLabel()
      • setLabel

        void setLabel​(java.lang.String label)
      • setOption

        void setOption​(java.lang.String key,
                       java.lang.String value)
      • getOption

        java.lang.String getOption​(java.lang.String key)
        Parameters:
        key -
        Returns:
        the value of the option if it was set, otherwise null.
      • getOptionKeySet

        java.util.Set<java.lang.String> getOptionKeySet()
        Returns:
        the set of options that is set (keys)
      • getId

        java.lang.String getId()
      • addMouseListener

        void addMouseListener​(java.awt.event.MouseListener l)
        Please note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes). Thus, only if a user clicks on the border or label of a node, the click is registered. The same holds for mouseEnter and mouseExit events: these are based on drawn pixels. To avoid this problem, give each node a fill using node.setOption("fillcolor", "#FFFFFF") and node.setOption("style", "filled").
        Parameters:
        l -
      • setSelectable

        void setSelectable​(boolean selectable)
        Sets whether this node can be selected. Please note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes). Thus, only if a user clicks on the border or label of a node, the click is registered. To avoid this problem, give each node a fill using node.setOption("fillcolor", "#FFFFFF") and node.setOption("style", "filled").
        Parameters:
        selectable -
      • isSelectable

        boolean isSelectable()
        Please note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes). Thus, only if a user clicks on the border or label of a node, the click is registered. To avoid this problem, give each node a fill using node.setOption("fillcolor", "#FFFFFF") and node.setOption("style", "filled").
        Returns:
        whether the element is selectable.
      • addSelectionListener

        void addSelectionListener​(DotElementSelectionListener listener)
        Add a selection/deselection listener. Side-effect: enables selection of the element. Thread-safe. Please note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes). Thus, only if a user clicks on the border or label of a node, the click is registered. To avoid this problem, give each node a fill using node.setOption("fillcolor", "#FFFFFF") and node.setOption("style", "filled").
        Parameters:
        listener -