lv.lumii.layoutengine

## Interface Connectible

- All Known Implementing Classes:
    Box, Diagram, Line

      public interface Connectible

  Specifies elements that can be connected to a line, and the methods common to such elements.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Line` | `connectTo(Connectible element, Line.LineType lineType, double spacing)` Adds a line to this diagram.
    `Line` | `connectTo(Connectible element, Line.LineType lineType, double spacing, java.util.ArrayList<java.awt.geom.Point2D.Double> points)` Adds a line to this diagram going along the given points.
    `Line` | `connectTo(Connectible element, Line.LineType lineType, double spacing, java.util.ArrayList<java.awt.geom.Point2D.Double> points, boolean cleanup)` Adds a line to this diagram going along the given points.
    `java.util.ArrayList<Line>` | `getIncidentLines()` Returns a list of all lines incident to this element.

- - ### Method Detail

    - #### connectTo

          Line connectTo(Connectible element,
                         Line.LineType lineType,
                         double spacing)

      Adds a line to this diagram. A line can connect boxes or other lines. The whole diagram is reordered afterwards, or at the end of the current transaction.
      Parameters:
        `element` - the element to connect to this Connectible
        `lineType` - the type of the new line
        `spacing` - the width of the empty buffer around the line
      Returns:
        the new line connecting this Connectible with the given element.

    - #### connectTo

          Line connectTo(Connectible element,
                         Line.LineType lineType,
                         double spacing,
                         java.util.ArrayList<java.awt.geom.Point2D.Double> points)

      Adds a line to this diagram going along the given points. A line can connect boxes or other lines. The whole diagram is reordered afterwards, or at the end of the current transaction.
      Parameters:
        `element` - the element to connect to this Connectible
        `lineType` - the type of the new line
        `spacing` - the width of the empty buffer around the line
        `points` - the desired vertices of the new line
      Returns:
        the new line connecting this Connectible with the given element.

    - #### connectTo

          Line connectTo(Connectible element,
                         Line.LineType lineType,
                         double spacing,
                         java.util.ArrayList<java.awt.geom.Point2D.Double> points,
                         boolean cleanup)

      Adds a line to this diagram going along the given points. A line can connect boxes or other lines. The whole diagram is reordered afterwards, or at the end of the current transaction.
      Parameters:
        `element` - the element to connect to this Connectible
        `lineType` - the type of the new line
        `spacing` - the width of the empty buffer around the line
        `points` - the desired vertices of the new line
        `cleanup` - whether to clean up the given line, removing unnecessary corners
      Returns:
        the new line connecting this Connectible with the given element.

    - #### getIncidentLines

          java.util.ArrayList<Line> getIncidentLines()

      Returns a list of all lines incident to this element.
      Returns:
        a list of all lines incident to this element.