Class TreeOp


  • public class TreeOp
    extends Object
    Implementation of basic area and tree opeations used by the operators.
    Author:
    burgetr
    • Constructor Detail

      • TreeOp

        public TreeOp()
    • Method Detail

      • joinArea

        public static void joinArea​(Area target,
                                    Area other,
                                    Rectangular pos,
                                    boolean horizontal,
                                    boolean flatten)
        Joins the target area with another area and updates the layout in the grid to the given values. Moves the children of the otherarea to the target area.
        Parameters:
        target - The target area
        other - The area to be joined to the target area
        pos - The position of the result in the grid
        horizontal - Horizontal or vertical join?
        flatten - Remove the child areas, preserve the boxes only.
      • join

        public static void join​(Area target,
                                Area other,
                                boolean horizontal)
        Joins another area to the target area. Updates the bounds and the name accordingly.
        Parameters:
        target - The target area.
        other - The area to be joined to target area.
        horizontal - If true, the areas are joined horizontally. This influences the resulting area borders. If false, the areas are joined vertically.
      • joinChild

        public static void joinChild​(Area target,
                                     Area other)
        Joins a child area to this area. Updates the bounds and the name accordingly.
        Parameters:
        other - The child area to be joined to this area.