com.wrq.vhi.script.api
Interface RectangularTerminalRegion

All Superinterfaces:
TerminalRegion

public interface RectangularTerminalRegion
extends TerminalRegion

Represents a rectangular terminal region. A rectangular terminal region is defined by a row and column location along with a height and width.


Method Summary
 int getHeight()
          Gets the number of rows in the region measured in characters.
 int getLeft()
          Gets the leftmost column in the region.
 TerminalCell getTerminalCell(int row, int column)
          Provide additional information about a single character within this screen region as a separate immutable object.
 java.lang.String getText(int row)
          Gets the screen text for the specified row in the region.
 int getTop()
          Gets the topmost row in the region.
 int getWidth()
          Gets the number of columns in the region measured in characters.
 
Methods inherited from interface com.wrq.vhi.script.api.TerminalRegion
getLength, getTerminalCell, getText
 

Method Detail

getLeft

int getLeft()
Gets the leftmost column in the region.

Returns:
the leftmost column

getTop

int getTop()
Gets the topmost row in the region.

Returns:
the topmost row

getWidth

int getWidth()
Gets the number of columns in the region measured in characters.

Returns:
the number of columns

getHeight

int getHeight()
Gets the number of rows in the region measured in characters.

Returns:
the number of rows

getText

java.lang.String getText(int row)
Gets the screen text for the specified row in the region.

Parameters:
row - one-based row within the region (not the row number on the screen)
Returns:
the text contents of the specified row
Throws:
java.lang.IllegalArgumentException - if the row is invalid

getTerminalCell

TerminalCell getTerminalCell(int row,
                             int column)
Provide additional information about a single character within this screen region as a separate immutable object.

Parameters:
row - one-based row number of the character within the region
column - one-based column number of character within the region
Returns:
TerminalCell object defining terminal screen information for this character
Throws:
java.lang.IllegalArgumentException - if the row or column is invalid