Class TableBuilder.Borders

java.lang.Object
com.jagrosh.jdautilities.commons.utils.TableBuilder.Borders
Enclosing class:
TableBuilder

public static class TableBuilder.Borders extends Object
A data class whose instances store the characters needed to create a table with the enclosing TableBuilder.
Instances can be created via the factory methods provided by this class.
Some default instances are already given as public static final fields. All of them use box drawing characters.
  • Field Details

    • HEADER_ROW_FRAME

      public static final TableBuilder.Borders HEADER_ROW_FRAME
      An instance that can be used for framed tables with a header row and a columns with row names, for it provides special delimiters for the first row and column.
    • HEADER_FRAME

      public static final TableBuilder.Borders HEADER_FRAME
      An instance that can be used for framed tables with a header row, for it provides a special delimiter for the first row.
    • FRAME

      public static final TableBuilder.Borders FRAME
      An instance that can be used for framed tables without any special characters for headers or row name columns.
    • HEADER_ROW_PLAIN

      public static final TableBuilder.Borders HEADER_ROW_PLAIN
      An instance that can be used for tables without a frame that have a header row and a row name column, for this provides special delimiters for the first row and column.
    • HEADER_PLAIN

      public static final TableBuilder.Borders HEADER_PLAIN
      An instance that can be used for tables without a frame that have a header, for this provides a special delimiter for the first row.
    • PLAIN

      public static final TableBuilder.Borders PLAIN
      An instance that can be used for plain tables without a frame that do not have any special delimiters for headers or row name columns.
    • UNKNOWN

      public static final String UNKNOWN
      See Also:
    • rowDelimiter

      public final String rowDelimiter
    • columnDelimiter

      public final String columnDelimiter
    • crossDelimiter

      public final String crossDelimiter
    • leftIntersection

      public final String leftIntersection
    • rightIntersection

      public final String rightIntersection
    • upperIntersection

      public final String upperIntersection
    • lowerIntersection

      public final String lowerIntersection
    • upLeftCorner

      public final String upLeftCorner
    • upRightCorner

      public final String upRightCorner
    • lowLeftCorner

      public final String lowLeftCorner
    • lowRightCorner

      public final String lowRightCorner
    • headerDelimiter

      public final String headerDelimiter
    • headerCrossDelimiter

      public final String headerCrossDelimiter
    • headerLeftIntersection

      public final String headerLeftIntersection
    • headerRightIntersection

      public final String headerRightIntersection
    • firstColumnDelimiter

      public final String firstColumnDelimiter
    • firstColumnCrossDelimiter

      public final String firstColumnCrossDelimiter
    • firstColumnUpperIntersection

      public final String firstColumnUpperIntersection
    • firstColumnLowerIntersection

      public final String firstColumnLowerIntersection
    • headerColumnCrossDelimiter

      public final String headerColumnCrossDelimiter
    • horizontalOutline

      public final String horizontalOutline
    • verticalOutline

      public final String verticalOutline
  • Method Details

    • newHeaderRowNamesFrameBorders

      public static TableBuilder.Borders newHeaderRowNamesFrameBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter, String leftIntersection, String rightIntersection, String upperIntersection, String lowerIntersection, String upLeftCorner, String upRightCorner, String lowLeftCorner, String lowRightCorner, String headerDelimiter, String headerCrossDelimiter, String headerLeftIntersection, String headerRightIntersection, String firstColumnDelimiter, String firstColumnCrossDelimiter, String firstColumnUpperIntersection, String firstColumnLowerIntersection, String headerColumnCrossDelimiter, String horizontalOutline, String verticalOutline)
      The factory method for Borders instances that should support framing as well as special characters for a header row and a row name column.
      Parameters:
      rowDelimiter - The character used to separate normal rows from each other
      columnDelimiter - The character used to separate normal columns form each other
      crossDelimiter - The character to be placed where the vertical and horizontal lines inside the table cross
      leftIntersection - The character for frame intersections at the left
      rightIntersection - The character for frame intersections at the right
      upperIntersection - The character for upper frame intersections
      lowerIntersection - The character for lower frame intersections
      upLeftCorner - The character for the upper left frame corner
      upRightCorner - The character for the upper right frame corner
      lowLeftCorner - The character for the lower left frame corner
      lowRightCorner - The character for the lower right frame corner
      headerDelimiter - The normal character to be placed between the first row and the second row
      headerCrossDelimiter - The character to be placed where the header delimiter and the column delimiters cross
      headerLeftIntersection - The character to be placed at the very left of the header delimiter
      headerRightIntersection - The character to be placed at the very right of the header delimiter
      firstColumnDelimiter - The normal character to be placed between the first and the second column
      firstColumnCrossDelimiter - The character to be placed after the first column where the row delimiters are crossed
      firstColumnUpperIntersection - The character to be placed at the very top of the first column delimiter
      firstColumnLowerIntersection - The character to be placed at the very bottom of the first column delimiter
      headerColumnCrossDelimiter - The character to be placed at the intersection first row x first column
      horizontalOutline - The character to use for the upper and lower frame outline
      verticalOutline - The character to use for the left and right frame outline
      Returns:
      Borders instance
    • newHeaderFrameBorders

      public static TableBuilder.Borders newHeaderFrameBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter, String leftIntersection, String rightIntersection, String upperIntersection, String lowerIntersection, String upLeftCorner, String upRightCorner, String lowLeftCorner, String lowRightCorner, String headerDelimiter, String headerCrossDelimiter, String headerLeftIntersection, String headerRightIntersection, String horizontalOutline, String verticalOutline)
      The factory method for Borders instances that should support framing and special characters for a header row.
      Parameters:
      rowDelimiter - The character used to separate normal rows from each other
      columnDelimiter - The character used to separate normal columns form each other
      crossDelimiter - The character to be placed where the vertical and horizontal lines inside the table cross
      leftIntersection - The character for frame intersections at the left
      rightIntersection - The character for frame intersections at the right
      upperIntersection - The character for upper frame intersections
      lowerIntersection - The character for lower frame intersections
      upLeftCorner - The character for the upper left frame corner
      upRightCorner - The character for the upper right frame corner
      lowLeftCorner - The character for the lower left frame corner
      lowRightCorner - The character for the lower right frame corner
      headerDelimiter - The normal character to be placed between the first row and the second row
      headerCrossDelimiter - The character to be placed where the header delimiter and the column delimiters cross
      headerLeftIntersection - The character to be placed at the very left of the header delimiter
      headerRightIntersection - The character to be placed at the very right of the header delimiter
      horizontalOutline - The character to use for the upper and lower frame outline
      verticalOutline - The character to use for the left and right frame outline
      Returns:
      Borders instance
    • newFrameBorders

      public static TableBuilder.Borders newFrameBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter, String leftIntersection, String rightIntersection, String upperIntersection, String lowerIntersection, String upLeftCorner, String upRightCorner, String lowLeftCorner, String lowRightCorner, String horizontalOutline, String verticalOutline)
      The factory method for Borders instances that should support framing and don't have any special characters for headers or row names.
      Parameters:
      rowDelimiter - The character used to separate normal rows from each other
      columnDelimiter - The character used to separate normal columns form each other
      crossDelimiter - The character to be placed where the vertical and horizontal lines inside the table cross
      leftIntersection - The character for frame intersections at the left
      rightIntersection - The character for frame intersections at the right
      upperIntersection - The character for upper frame intersections
      lowerIntersection - The character for lower frame intersections
      upLeftCorner - The character for the upper left frame corner
      upRightCorner - The character for the upper right frame corner
      lowLeftCorner - The character for the lower left frame corner
      lowRightCorner - The character for the lower right frame corner
      horizontalOutline - The character to use for the upper and lower frame outline
      verticalOutline - The character to use for the left and right frame outline
      Returns:
      Borders instance
    • newHeaderRowNamesPlainBorders

      public static TableBuilder.Borders newHeaderRowNamesPlainBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter, String headerDelimiter, String headerCrossDelimiter, String firstColumnDelimiter, String firstColumnCrossDelimiter, String headerColumnCrossDelimiter)
      The factory method for Borders instances that should not support framing but special characters for a header row and a row name column.

      Warning: using this or the other plain Borders for a framed table will not lead to a satisfying result, since all the framing characters are unknown unicode characters here.

      Parameters:
      rowDelimiter - The character used to separate normal rows from each other
      columnDelimiter - The character used to separate normal columns form each other
      crossDelimiter - The character to be placed where the vertical and horizontal lines inside the table cross
      headerDelimiter - The normal character to be placed between the first row and the second row
      headerCrossDelimiter - The character to be placed where the header delimiter and the column delimiters cross
      firstColumnDelimiter - The normal character to be placed between the first and the second column
      firstColumnCrossDelimiter - The character to be placed after the first column where the row delimiters are crossed
      headerColumnCrossDelimiter - The character to be placed at the intersection first row x first column
      Returns:
      Borders instance
    • newHeaderPlainBorders

      public static TableBuilder.Borders newHeaderPlainBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter, String headerDelimiter, String headerCrossDelimiter)
      The factory method for Borders instances that should not support framing but special characters for a header row.
      Parameters:
      rowDelimiter - The character used to separate normal rows from each other
      columnDelimiter - The character used to separate normal columns form each other
      crossDelimiter - The character to be placed where the vertical and horizontal lines inside the table cross
      headerDelimiter - The normal character to be placed between the first row and the second row
      headerCrossDelimiter - The character to be placed where the header delimiter and the column delimiters cross
      Returns:
      Borders instance
    • newPlainBorders

      public static TableBuilder.Borders newPlainBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter)
      The factory method for Borders instances that should not support framing and no special characters for a header row or a row name column.
      Parameters:
      rowDelimiter - The character used to separate normal rows from each other
      columnDelimiter - The character used to separate normal columns form each other
      crossDelimiter - The character to be placed where the vertical and horizontal lines inside the table cross
      Returns:
      Borders instance