Package org.aesh.terminal.tty
Class Size
java.lang.Object
org.aesh.terminal.tty.Size
Terminal size
- Author:
- Ståle W. Pedersen
-
Constructor Summary
ConstructorsConstructorDescriptionSize(int width, int height) Creates a new size with the specified dimensions. -
Method Summary
-
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 columnsheight- 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
Check if a point is within this size boundaries.- Parameters:
pos- the point to check- Returns:
- true if the point is within bounds
-
equals
-
hashCode
public int hashCode() -
toString
-