Class InsertEdgeCommand

    • Constructor Detail

      • InsertEdgeCommand

        public InsertEdgeCommand​(AbstractLocation source,
                                 int x,
                                 int y)
        Constructor
        Parameters:
        source - - The source location
        x - - The x value of the edge
        y - - The y value of the edge
    • Method Detail

      • addNail

        public void addNail​(int x,
                            int y)
        Add nail that the graphical layout of the edge.
        Parameters:
        x - - The x value of the edge
        y - - The y value of the edge
      • commitLocation

        public void commitLocation​(int x,
                                   int y)
        Commit the location
        Parameters:
        x - - The x value of the edge
        y - - The y value of the edge
      • commitBranchPoint

        public void commitBranchPoint​(int x,
                                      int y)
        Commit the branch point
        Parameters:
        x - - The x value of the edge
        y - - The y value of the edge
      • commit

        public void commit​(AbstractLocation target)
        Commit setting of the destination of this edge
        Parameters:
        target - - The location
      • hasNails

        public boolean hasNails()
        Does the edge has nails
        Returns:
        True : The edge has the start node and the next node
      • getSource

        public AbstractLocation getSource()
        Get the source of the edge
        Returns:
        The source location of the edge
      • getTarget

        public AbstractLocation getTarget()
        Get the target of the edge
        Returns:
        The target location of the edge
      • getModifiedElement

        public Element getModifiedElement()
        Returns:
        the modified element or its closest relative (sibling or parent) if the element is not displayed.