Interface Aligner

All Known Implementing Classes:
DebugAligner, KeyValueHorizontalAligner, SimpleHorizontalAligner, SimpleVerticalAligner

public interface Aligner
A strategy interface for performing text alignment.
  • Method Summary

    Modifier and Type
    Method
    Description
    align(String[] text, int cellWidth, int cellHeight)
    Perform text alignment, returning a String array that MUST contain cellHeight lines, each of which MUST be cellWidth chars in length.
  • Method Details

    • align

      String[] align(String[] text, int cellWidth, int cellHeight)
      Perform text alignment, returning a String array that MUST contain cellHeight lines, each of which MUST be cellWidth chars in length.

      Input array is guaranteed to contain lines that have length equal to cellWidth. There is no guarantee on the input number of lines though.

      Parameters:
      text - the text to align
      cellWidth - the width of of the table cell
      cellHeight - the height of the table cell
      Returns:
      the aligned text, in a cellHeight element array