Class Size

java.lang.Object
org.aesh.terminal.tty.Size

public class Size extends Object
Terminal size
Author:
Ståle W. Pedersen
  • Constructor Details

    • Size

      public Size(int width, int height)
      Creates a new size with the specified dimensions. Values less than or equal to 0 default to 80 for width and 20 for height.
      Parameters:
      width - the terminal width in columns
      height - the terminal height in rows
  • Method Details

    • getWidth

      public int getWidth()
      Get the terminal width in columns.
      Returns:
      the width
    • getHeight

      public int getHeight()
      Get the terminal height in rows.
      Returns:
      the height
    • isPointWithinSize

      public boolean isPointWithinSize(Point pos)
      Check if a point is within this size boundaries.
      Parameters:
      pos - the point to check
      Returns:
      true if the point is within bounds
    • 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