Class Size

java.lang.Object
org.jline.terminal.Size

public class Size extends Object
  • Field Details

    • rows

      private int rows
    • cols

      private int cols
  • Constructor Details

    • Size

      public Size()
    • Size

      public Size(int columns, int rows)
  • Method Details

    • getColumns

      public int getColumns()
    • setColumns

      public void setColumns(int columns)
    • getRows

      public int getRows()
    • setRows

      public void setRows(int rows)
    • cursorPos

      public int cursorPos(int row, int col)
      A cursor position combines a row number with a column position.

      Note each row has col+1 different column positions, including the right margin.

      Parameters:
      row - the new row
      col - the new column
      Returns:
      the cursor position
    • copy

      public void copy(Size size)
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object