Class BorderSection


  • public final class BorderSection
    extends Section
    A border with an optional title around a single child, insetting the child's bounds by one cell. The frame is drawn in the focused style while the child is on the focus path.
    • Constructor Detail

      • BorderSection

        public BorderSection​(Section child)
        Creates a border around the given child.
        Parameters:
        child - the wrapped child section
    • Method Detail

      • around

        public static BorderSection around​(Section child)
        Wraps a section in a border.
        Parameters:
        child - the wrapped child section
        Returns:
        a new border around the child
      • around

        public static BorderSection around​(Section child,
                                           java.lang.String title)
        Wraps a section in a titled border.
        Parameters:
        child - the wrapped child section
        title - the border title
        Returns:
        a new titled border around the child
      • title

        public BorderSection title​(java.lang.String title)
        Sets the border title drawn into the top edge.
        Parameters:
        title - the title text
        Returns:
        this BorderSection for chaining
      • focusedStyle

        public BorderSection focusedStyle​(Style style)
        Sets the frame style used when the child is on the focus path.
        Parameters:
        style - the focused frame style
        Returns:
        this BorderSection for chaining
      • unfocusedStyle

        public BorderSection unfocusedStyle​(Style style)
        Sets the frame style used when the child is not on the focus path.
        Parameters:
        style - the unfocused frame style
        Returns:
        this BorderSection for chaining
      • focusedStyle

        public Style focusedStyle()
        Returns:
        the frame style used when the child is on the focus path
      • unfocusedStyle

        public Style unfocusedStyle()
        Returns:
        the frame style used when the child is not on the focus path