lv.lumii.layoutengine.universalLayout

## Class Line

- java.lang.Object
- - lv.lumii.layoutengine.universalLayout.Line

-     public class Line
      extends java.lang.Object

  Class that represents line between BoxInGrid objects used in UniversalLayoutAlgorithm.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `BoxInGrid` | `boxIG` Box where connection is going.
    `boolean` | `endIsOriginal` If it is true then end of the line is connected directly to box represented by object "boxIG".
    `int` | `endX` If !endIsOriginal then these are the coordinates of a place where line is connected.
    `int` | `endY` If !endIsOriginal then these are the coordinates of a place where line is connected.
    `double` | `realEndX` Coordinates of connection in real numbers.
    `double` | `realEndY` Coordinates of connection in real numbers.
    `double` | `realStartX` Coordinates of connection in real numbers.
    `double` | `realStartY` Coordinates of connection in real numbers.
    `boolean` | `startIsOriginal` If it is true then start of the line is connected directly to box that is represented by object that contains this Line object.
    `int` | `startX` If !startIsOriginal then these are the coordinates of a place where line is connected.
    `int` | `startY` If !startIsOriginal then these are the coordinates of a place where line is connected.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Line(BoxInGrid connectedBoxIG, boolean startIsOriginal, boolean endIsOriginal)` Creates Line object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setRealEndPoint(double realX, double realY)` Sets realEndX and realEndY.
    `void` | `setRealStartPoint(double realX, double realY)` Sets realStartX and realStartY.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### boxIG

          public BoxInGrid boxIG

      Box where connection is going.

    - #### endIsOriginal

          public boolean endIsOriginal

      If it is true then end of the line is connected directly to box represented by object "boxIG".

    - #### endX

          public int endX

      If !endIsOriginal then these are the coordinates of a place where line is connected. (0,0) point is boxes left-top corner.

    - #### endY

          public int endY

      If !endIsOriginal then these are the coordinates of a place where line is connected. (0,0) point is boxes left-top corner.

    - #### realEndX

          public double realEndX

      Coordinates of connection in real numbers. Similar to endX and endY.

    - #### realEndY

          public double realEndY

      Coordinates of connection in real numbers. Similar to endX and endY.

    - #### startIsOriginal

          public boolean startIsOriginal

      If it is true then start of the line is connected directly to box that is represented by object that contains this Line object.

    - #### startX

          public int startX

      If !startIsOriginal then these are the coordinates of a place where line is connected. (0,0) point is boxes left-top corner.

    - #### startY

          public int startY

      If !startIsOriginal then these are the coordinates of a place where line is connected. (0,0) point is boxes left-top corner.

    - #### realStartX

          public double realStartX

      Coordinates of connection in real numbers. Similar to startX and startY.

    - #### realStartY

          public double realStartY

      Coordinates of connection in real numbers. Similar to startX and startY.

  - ### Constructor Detail

    - #### Line

          public Line(BoxInGrid connectedBoxIG,
                      boolean startIsOriginal,
                      boolean endIsOriginal)

      Creates Line object. This object will be kept in one of BoxInGrid objects.
      Parameters:
        `connectedBoxIG` - BoxInGrid that is connected to BoxInGrid object that contains this Line.
        `startIsOriginal` - True if line is directly connected to BoxInGrid object that contains this Line object. False if it is connected to one of the Boxes inside this box.
        `endIsOriginal` - True if line is directly connected to BoxInGrid object, link to which is kept in this Line object under name boxIG. False if line is connected to one of the boxes that is inside boxIG.

  - ### Method Detail

    - #### setRealStartPoint

          public void setRealStartPoint(double realX,
                                        double realY)

      Sets realStartX and realStartY.
      Parameters:
        `realX` - Real x coordinate of box from which line is going.
        `realY` - Real y coordinate of box from which line is going.

    - #### setRealEndPoint

          public void setRealEndPoint(double realX,
                                      double realY)

      Sets realEndX and realEndY.
      Parameters:
        `realX` - Real x coordinate of box to which line is going.
        `realY` - Real y coordinate of box to which line is going.