Class AbsoluteWidthSizeConstraints

java.lang.Object
org.springframework.shell.table.AbsoluteWidthSizeConstraints
All Implemented Interfaces:
SizeConstraints

public class AbsoluteWidthSizeConstraints extends Object implements SizeConstraints
A cell sizing strategy that forces a fixed width, expressed in number of characters.
  • Constructor Details

    • AbsoluteWidthSizeConstraints

      public AbsoluteWidthSizeConstraints(int width)
  • Method Details

    • width

      public SizeConstraints.Extent width(String[] raw, int previous, int tableWidth)
      Specified by:
      width in interface SizeConstraints
      Parameters:
      raw - the raw String representation of the cell contents (may be reformatted later, eg wrapped)
      previous - the whole available width for the table
      tableWidth - the number of columns in the table
      Returns:
      the minimum and maximum width of the cell, given its raw content.