lv.lumii.layoutengine

## Class InsideLabel

- java.lang.Object
- - lv.lumii.layoutengine.Element
  - - lv.lumii.layoutengine.AbstractContainer
    - - lv.lumii.layoutengine.Label
      - - lv.lumii.layoutengine.InsideLabel

-     public class InsideLabel
      extends Label

  This class describes labels that are contained inside some element.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `InsideLabel` | `createInsideLabel(java.awt.geom.Rectangle2D.Double rectangle, LayoutConstraints.ConstraintType constraintType, double spacing, java.lang.Integer row, java.lang.Integer column)` Creates a new inside label as a child of this container.
    `AbstractContainer` | `getOwner()` Each element can be owned by some other element.
    `void` | `move(java.awt.geom.Point2D.Double newCenter, AbstractContainer newOwner, java.awt.geom.Point2D.Double growPoint)` Moves the label, taking it from its current position and placing it at the given position, along with its children.
    `void` | `move(java.awt.geom.Point2D.Double newCenter, AbstractContainer newOwner, java.awt.geom.Point2D.Double growPoint, java.lang.Integer row, java.lang.Integer column)` Moves the label, taking it from its current position and placing it at the given position, along with its children.
    `void` | `resize(java.awt.geom.Rectangle2D.Double rectangle)` Resizes the label, moving it from its current position to the given rectangle, pushing aside other elements as needed.
    `void` | `setSpacing(double spacing)` Sets the spacing value of the label.

    - ### Methods inherited from class lv.lumii.layoutengine.Label

      `_convertToBoxOutsideLabel, _convertToInsideLabel, convertToBoxOutsideLabel, convertToBoxOutsideLabel, convertToInsideLabel, convertToInsideLabel, convertToLineLabel, convertToLineLabel, setMinHeight, setMinSize, setMinWidth`

    - ### Methods inherited from class lv.lumii.layoutengine.AbstractContainer

      `contains, createInsideLabel, createInsideLabel, findDescendantEnclosingRectangle, findNextRectangleEnclosingRectangle, getBottom, getBounds, getCenter, getCenterX, getCenterY, getHeight, getInsideLabels, getLayoutConstraints, getLeft, getMinHeight, getMinWidth, getRight, getTop, getWidth, remove, setConstraintType`

    - ### Methods inherited from class lv.lumii.layoutengine.Element

      `getDiagram, getSpacing, remove`

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

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

- - ### Method Detail

    - #### getOwner

          public AbstractContainer getOwner()

      Description copied from class: `Element`
      Each element can be owned by some other element. When an owner is deleted, it deletes all objects owned by it. A box's owner is a container (or one of its derived classes — another box or diagram), a line is owned by a container. A label is owned by a box, a line, a label or a container. Container's owner is a container. A diagram is not owned by any other element.
      Overrides:
        `getOwner` in class `Element`
      Returns:
        the owner of this object, or possibly `null`, if this element is a diagram.

    - #### createInsideLabel

          public InsideLabel createInsideLabel(java.awt.geom.Rectangle2D.Double rectangle,
                                               LayoutConstraints.ConstraintType constraintType,
                                               double spacing,
                                               java.lang.Integer row,
                                               java.lang.Integer column)

      Description copied from class: `AbstractContainer`
      Creates a new inside label as a child of this container. The minimum size of the new label is the size of the given rectangle. The whole diagram is reordered afterwards, or at the end of the current transaction.
      Overrides:
        `createInsideLabel` in class `AbstractContainer`
      Parameters:
        `rectangle` - the position of the new label
        `constraintType` - the type of the layout constraints for the new label
        `spacing` - the spacing value for the new label
        `row` - the row of the new label in this container's grid
        `column` - the column of the new label in this container's grid
      Returns:
        the new inside label object.

    - #### move

          public void move(java.awt.geom.Point2D.Double newCenter,
                           AbstractContainer newOwner,
                           java.awt.geom.Point2D.Double growPoint,
                           java.lang.Integer row,
                           java.lang.Integer column)

      Moves the label, taking it from its current position and placing it at the given position, along with its children. The actual size may differ due to children. The new owner of the label will be stretched to accommodate the label at its desired new position. The whole diagram is reordered afterwards, or at the end of the current transaction.
      Parameters:
        `newCenter` - the new desired center of the label
        `newOwner` - the new owner of the label
        `growPoint` - the exact point at which to insert the label, it will then be grow from that point to its desired position as per `resize(java.awt.geom.Rectangle2D.Double)`
        `row` - the row of the label in new owner's grid
        `column` - the column of the label in new owner's grid

    - #### move

          public void move(java.awt.geom.Point2D.Double newCenter,
                           AbstractContainer newOwner,
                           java.awt.geom.Point2D.Double growPoint)

      Moves the label, taking it from its current position and placing it at the given position, along with its children. The actual size may differ due to children. The new owner of the label will be stretched to accommodate the label at its desired new position. The whole diagram is reordered afterwards, or at the end of the current transaction.
      Parameters:
        `newCenter` - the new desired center of the label
        `newOwner` - the new owner of the label
        `growPoint` - the exact point at which to insert the label, it will then be grow from that point to its desired position as per `resize(java.awt.geom.Rectangle2D.Double)`

    - #### resize

          public void resize(java.awt.geom.Rectangle2D.Double rectangle)

      Resizes the label, moving it from its current position to the given rectangle, pushing aside other elements as needed. Changes the minimum size of the label to the given size. The actual size may differ due to children. The whole diagram is reordered afterwards, or at the end of the current transaction.
      Parameters:
        `rectangle` - the new position of the label to resize it to

    - #### setSpacing

          public void setSpacing(double spacing)

      Sets the spacing value of the label. The whole diagram is reordered afterwards, or at the end of the current transaction.
      Specified by:
        `setSpacing` in class `Element`
      Parameters:
        `spacing` - the new spacing value