Class BoxGridImpl<T>

  • Type Parameters:
    T - The type of the grid elements for drawing a box grid, may be a char or a sprite or a byte array.
    All Implemented Interfaces:
    BoxGrid<T>

    public class BoxGridImpl<T>
    extends Object
    implements BoxGrid<T>
    Implementation of the BoxGrid interface.
    • Field Detail

      • _leftEdge

        protected T _leftEdge
      • _topLeftEdge

        protected T _topLeftEdge
      • _dividerEdge

        protected T _dividerEdge
      • _topDividerEdge

        protected T _topDividerEdge
      • _bottomDividerEdge

        protected T _bottomDividerEdge
      • _rightEdge

        protected T _rightEdge
      • _topRightEdge

        protected T _topRightEdge
      • _bottomRightEdge

        protected T _bottomRightEdge
      • _bottomLeftEdge

        protected T _bottomLeftEdge
      • _leftLine

        protected T _leftLine
      • _dividerLine

        protected T _dividerLine
      • _rightLine

        protected T _rightLine
      • _topLine

        protected T _topLine
      • _bottomLine

        protected T _bottomLine
      • _innerLine

        protected T _innerLine
    • Constructor Detail

      • BoxGridImpl

        protected BoxGridImpl()
        Default constructor to be used by sub-classes setting the member variables by themselves.
      • BoxGridImpl

        public BoxGridImpl​(T aTopLeftEdge,
                           T aTopLine,
                           T aTopDividerEdge,
                           T aTopRightEdge,
                           T aRightLine,
                           T aRightEdge,
                           T aBottomRightEdge,
                           T aBottomLine,
                           T aBottomDividerEdge,
                           T aBottomLeftEdge,
                           T aLeftLine,
                           T aLeftEdge,
                           T aDividerLine,
                           T aDividerEdge,
                           T aInnerLine)
        Constructs the BoxGrid instance.
        Parameters:
        aTopLeftEdge - the top left edge, for example "├".
        aTopLine - The top line, for example "─" .
        aTopDividerEdge - The top divider edge, for example "┬".
        aTopRightEdge - the top right edge, for example "┐".
        aRightLine - The right line, for example "│".
        aRightEdge - The right edge, for example "┤".
        aBottomRightEdge - the bottom right edge, for example "┘".
        aBottomDividerEdge - The bottom divider edge, for example "┴".
        aBottomLeftEdge - the bottom left edge, for example "└".
        aBottomLine - The bottom line, for example "─".
        aLeftLine - The left line, for example "│".
        aLeftEdge - The top left edge, for example "├".
        aDividerLine - the divider line, for example "│".
        aDividerEdge - The divider edge, for example "┼".
        aInnerLine - The inner line, for example "─".
    • Method Detail

      • getLeftEdge

        public T getLeftEdge()
        Returns the box's left edge character, for example "├".
        Specified by:
        getLeftEdge in interface BoxGrid<T>
        Returns:
        The left edge character.
      • getTopLeftEdge

        public T getTopLeftEdge()
        Returns the box's top left edge character, for example "┌".
        Specified by:
        getTopLeftEdge in interface BoxGrid<T>
        Returns:
        The top left edge character.
      • getBottomLeftEdge

        public T getBottomLeftEdge()
        Returns the box's bottom left edge character, for example "└".
        Specified by:
        getBottomLeftEdge in interface BoxGrid<T>
        Returns:
        The bottom left edge character.
      • getDividerEdge

        public T getDividerEdge()
        Returns the box's divider edge character, for example "┼".
        Specified by:
        getDividerEdge in interface BoxGrid<T>
        Returns:
        The divider edge character.
      • getTopDividerEdge

        public T getTopDividerEdge()
        Returns the box's top divider edge character, for example "┬".
        Specified by:
        getTopDividerEdge in interface BoxGrid<T>
        Returns:
        The top divider edge character.
      • getBottomDividerEdge

        public T getBottomDividerEdge()
        Returns the box's bottom divider edge character, for example "┴".
        Specified by:
        getBottomDividerEdge in interface BoxGrid<T>
        Returns:
        The bottom divider edge character.
      • getRightEdge

        public T getRightEdge()
        Returns the box's right edge character, for example "┤".
        Specified by:
        getRightEdge in interface BoxGrid<T>
        Returns:
        The top left edge character.
      • getTopRightEdge

        public T getTopRightEdge()
        Returns the box's top right edge character, for example "┐".
        Specified by:
        getTopRightEdge in interface BoxGrid<T>
        Returns:
        The top right edge character.
      • getBottomRightEdge

        public T getBottomRightEdge()
        Returns the box's bottom right edge character, for example "┘".
        Specified by:
        getBottomRightEdge in interface BoxGrid<T>
        Returns:
        The bottom left edge character.
      • getLeftLine

        public T getLeftLine()
        Returns the box's left line character, for example "│".
        Specified by:
        getLeftLine in interface BoxGrid<T>
        Returns:
        The left line character.
      • getDividerLine

        public T getDividerLine()
        Returns the box's divider line character, for example "│".
        Specified by:
        getDividerLine in interface BoxGrid<T>
        Returns:
        The divider line character.
      • getRightLine

        public T getRightLine()
        Returns the box row's right line character, for example "│".
        Specified by:
        getRightLine in interface BoxGrid<T>
        Returns:
        The right line character.
      • getTopLine

        public T getTopLine()
        Returns the box's top line character, for example "─" .
        Specified by:
        getTopLine in interface BoxGrid<T>
        Returns:
        The top line character.
      • getBottomLine

        public T getBottomLine()
        Returns the box's bottom line character, for example "─".
        Specified by:
        getBottomLine in interface BoxGrid<T>
        Returns:
        The bottom line character.
      • getInnerLine

        public T getInnerLine()
        Returns the box's inner line character, for example "─".
        Specified by:
        getInnerLine in interface BoxGrid<T>
        Returns:
        The inner line character.