Class ColumnLayout

java.lang.Object
com.teamten.typeset.ColumnLayout

public class ColumnLayout extends Object
Describes the number and sizes of columns.
  • Constructor Details

    • ColumnLayout

      public ColumnLayout(int columnCount, long columnWidth, long margin)
      Create a new column layout.
      Parameters:
      columnCount - the number of columns.
      columnWidth - the width of each column. Can be 0 for a single column.
      margin - the space between columns.
  • Method Details

    • single

      public static ColumnLayout single()
      Create a new single-column layout of zero width.
    • single

      public static ColumnLayout single(long width)
      Create a new single-column layout of the specified width.
    • fromBodyWidth

      public static ColumnLayout fromBodyWidth(int columnCount, long bodyWidth, long margin)
      Create a multi-column layout from the specified body width and margin.
    • getColumnCount

      public int getColumnCount()
    • getColumnWidth

      public long getColumnWidth()
    • getMargin

      public long getMargin()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object