Class AbstractVisualVertex

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getAlpha()
      Get the alpha, which determines how much of the vertex is visible/see through.
      double getEmphasis()
      Returns the emphasis value of this vertex.
      java.awt.geom.Point2D getLocation()
      Returns the location of this vertex in the view
      boolean isFocused()
      Returns true if this vertex is focused (see VisualVertex.setFocused(boolean)
      boolean isGrabbable​(java.awt.Component c)
      Returns true if the given component of this vertex is grabbable, which means that mouse drags on that component will move the vertex.
      boolean isHovered()
      Returns true if this vertex is being hovered by the mouse
      boolean isSelected()
      Returns true if this vertex is selected
      void setAlpha​(double alpha)
      Set the alpha, which determines how much of the vertex is visible/see through.
      void setEmphasis​(double emphasisLevel)
      Sets the emphasis value for this vertex.
      void setFocused​(boolean focused)
      Sets this vertex to be focused.
      void setHovered​(boolean hovered)
      Sets this vertex to be hovered
      void setLocation​(java.awt.geom.Point2D location)
      Sets the location of this vertex in the view
      void setSelected​(boolean selected)
      Sets this vertex selected
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractVisualVertex

        public AbstractVisualVertex()
    • Method Detail

      • setFocused

        public void setFocused​(boolean focused)
        Description copied from interface: VisualVertex
        Sets this vertex to be focused. This differs from being selected in that multiple vertices in a graph can be selected, but only one can be the focused vertex.
        Specified by:
        setFocused in interface VisualVertex
        Parameters:
        focused - true to focus; false to be marked as not focused
      • setSelected

        public void setSelected​(boolean selected)
        Description copied from interface: VisualVertex
        Sets this vertex selected
        Specified by:
        setSelected in interface VisualVertex
        Parameters:
        selected - true to select this vertex; false to de-select this vertex
      • isSelected

        public boolean isSelected()
        Description copied from interface: VisualVertex
        Returns true if this vertex is selected
        Specified by:
        isSelected in interface VisualVertex
        Returns:
        true if this vertex is selected
      • setHovered

        public void setHovered​(boolean hovered)
        Description copied from interface: VisualVertex
        Sets this vertex to be hovered
        Specified by:
        setHovered in interface VisualVertex
        Parameters:
        hovered - true to be marked as hovered; false to be marked as not hovered
      • isHovered

        public boolean isHovered()
        Description copied from interface: VisualVertex
        Returns true if this vertex is being hovered by the mouse
        Specified by:
        isHovered in interface VisualVertex
        Returns:
        true if this vertex is being hovered by the mouse
      • setEmphasis

        public void setEmphasis​(double emphasisLevel)
        Description copied from interface: VisualVertex
        Sets the emphasis value for this vertex. A value of 0 indicates no emphasis.
        Specified by:
        setEmphasis in interface VisualVertex
        Parameters:
        emphasisLevel - the emphasis
      • getEmphasis

        public double getEmphasis()
        Description copied from interface: VisualVertex
        Returns the emphasis value of this vertex. 0 if not emphasized.
        Specified by:
        getEmphasis in interface VisualVertex
        Returns:
        the emphasis value of this vertex.
      • getLocation

        public java.awt.geom.Point2D getLocation()
        Description copied from interface: VisualVertex
        Returns the location of this vertex in the view
        Specified by:
        getLocation in interface VisualVertex
        Returns:
        the location of this vertex in the view
      • setLocation

        public void setLocation​(java.awt.geom.Point2D location)
        Description copied from interface: VisualVertex
        Sets the location of this vertex in the view
        Specified by:
        setLocation in interface VisualVertex
        Parameters:
        location - the location of this vertex in the view
      • setAlpha

        public void setAlpha​(double alpha)
        Description copied from interface: VisualVertex
        Set the alpha, which determines how much of the vertex is visible/see through. 0 is completely transparent. This attribute allows transitional for animations.
        Specified by:
        setAlpha in interface VisualVertex
      • getAlpha

        public double getAlpha()
        Description copied from interface: VisualVertex
        Get the alpha, which determines how much of the vertex is visible/see through. 0 is completely transparent. This attribute allows transitional for animations.
        Specified by:
        getAlpha in interface VisualVertex
        Returns:
        the alpha value
      • isGrabbable

        public boolean isGrabbable​(java.awt.Component c)
        Description copied from interface: VisualVertex
        Returns true if the given component of this vertex is grabbable, which means that mouse drags on that component will move the vertex.

        This is used to differentiate components within a vertex that should receive mouse events versus those components that will not be given mouse events.

        Specified by:
        isGrabbable in interface VisualVertex
        Parameters:
        c - the component
        Returns:
        true if the component is grabbable