Class Split

  • Direct Known Subclasses:
    Form

    public class Split
    extends Section
    A section that divides its bounds among child sections along one axis according to their constraints. Children are added at construction, before the split enters the live tree.
    • Method Detail

      • horizontal

        public static Split horizontal​(Slot... slots)
        Creates a horizontal split from the given slots.
        Parameters:
        slots - the constrained children, in order
        Returns:
        the split
      • vertical

        public static Split vertical​(Slot... slots)
        Creates a vertical split from the given slots.
        Parameters:
        slots - the constrained children, in order
        Returns:
        the split
      • add

        public Split add​(Constraint size,
                         Section child)
        Appends a constrained child. Call at construction, before the split enters the tree.
        Parameters:
        size - the constraint sizing the child
        child - the child section
        Returns:
        this Split for chaining