HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.transform.regions
Class BlockScreenRegion

java.lang.Object
  extended by com.ibm.hats.transform.regions.ScreenRegion
      extended by com.ibm.hats.transform.regions.BlockScreenRegion
All Implemented Interfaces:
Cloneable

public class BlockScreenRegion
extends ScreenRegion

This class represents a rectangular block screen region, such that if the screen was to be considered a coordinate system of rows and columns, the BlcokScreenRegion representation of the region would own all items for the start to end of each column and row as indicated by the idividual start and end rows and columns.

See Also:
ScreenRegion

Field Summary
 
Fields inherited from class com.ibm.hats.transform.regions.ScreenRegion
endCol, endRow, startCol, startRow, type
 
Constructor Summary
BlockScreenRegion(int startRow, int startCol, int endRow, int endCol)
          constructor- sets the region data to the given values
 
Method Summary
static BlockScreenRegion[] blockArrayfromBlockScreenRegion(BlockScreenRegion br)
          a static method that creates an array of smaller rectangular regions by dividing the given block region along the rows
static BlockScreenRegion[] blockArrayfromLinearScreenRegion(com.ibm.hats.transform.regions.LinearScreenRegion lr)
          a static method that creates an array of smaller rectangular regions by dividing the given linear region along the rows
 Object clone()
          An abstract method to require overriding of the clone method.
static ScreenRegion compound(ComponentElement[] cea)
          override of the ScrenRegion compound method for rectangular operations
static ScreenRegion compound(ScreenRegion[] sr)
          ScreenRegion compound method for special linear operations
 int endCol()
          retrieves the end column
 int endRow()
          retrieves the end row
 boolean equals(BlockScreenRegion sr)
          Implementation of equality for ScreenRegion objects.
 boolean equals(com.ibm.hats.transform.regions.LinearScreenRegion sr)
          implementation of equality for ScreenRegion objects.
 int height()
          retrieves the height of the rectangle
 boolean isInRegion(int row, int col)
          an abstract method for detecting whether a point coordinate is inside the screen region
 int size()
          an abstract method for determining the amount of single coordinates are inside the screen region
 int startCol()
          retrieves the start col
 int startRow()
          retrieves the start row
 String toString()
          An abstract method to require overriding of the toString method.
static int type()
          an override of the ScreenRegion type, always returns the indicator for BlockScreenRegion
 int width()
          retrieves the width of the rectangle
 
Methods inherited from class com.ibm.hats.transform.regions.ScreenRegion
adjustForDefault, compound, equals
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlockScreenRegion

public BlockScreenRegion(int startRow,
                         int startCol,
                         int endRow,
                         int endCol)
constructor- sets the region data to the given values

Parameters:
startRow - - start row of the line
startCol - - start column of the line
endRow - - end row of the line
endCol - - end column of the line
Method Detail

blockArrayfromLinearScreenRegion

public static BlockScreenRegion[] blockArrayfromLinearScreenRegion(com.ibm.hats.transform.regions.LinearScreenRegion lr)
a static method that creates an array of smaller rectangular regions by dividing the given linear region along the rows

Parameters:
lr - - the given linear screen region
Returns:
BLockScreenRegion[] bsrArray - the new rectangular screen regions which do not span rows

blockArrayfromBlockScreenRegion

public static BlockScreenRegion[] blockArrayfromBlockScreenRegion(BlockScreenRegion br)
a static method that creates an array of smaller rectangular regions by dividing the given block region along the rows

Parameters:
br - - the given rectangular screen region
Returns:
BLockScreenRegion[] bsrArray - the new rectangular screen regions which do not span rows

toString

public String toString()
Description copied from class: ScreenRegion
An abstract method to require overriding of the toString method.

Specified by:
toString in class ScreenRegion
Returns:
The screen region information in a user discernable form
See Also:
ScreenRegion.toString()

isInRegion

public boolean isInRegion(int row,
                          int col)
Description copied from class: ScreenRegion
an abstract method for detecting whether a point coordinate is inside the screen region

Specified by:
isInRegion in class ScreenRegion
Parameters:
row - - the row of the coordinate
col - - the column of the coordinate
Returns:
boolean matches - if the coordinate is encompassed by the region, the value returned is true
See Also:
ScreenRegion.isInRegion(int,int)

width

public int width()
retrieves the width of the rectangle

Returns:
int width - the width of the BlockScreenRegion

height

public int height()
retrieves the height of the rectangle

Returns:
int height - the height of the BlockScreenRegion

size

public int size()
Description copied from class: ScreenRegion
an abstract method for determining the amount of single coordinates are inside the screen region

Specified by:
size in class ScreenRegion
Returns:
int size - the amount of coordinates encompassed by the screen region
See Also:
ScreenRegion.size()

startCol

public int startCol()
retrieves the start col

Returns:
int startCol - the start column

startRow

public int startRow()
retrieves the start row

Returns:
int startRow - the start row

endCol

public int endCol()
retrieves the end column

Returns:
int endCol - the end column

endRow

public int endRow()
retrieves the end row

Returns:
int endRow - the end row

compound

public static ScreenRegion compound(ComponentElement[] cea)
override of the ScrenRegion compound method for rectangular operations

Parameters:
cea - - the array of ComponentElements whose consumed screen regions are to be compounded
Returns:
ScreenRegion regionSum - the screen region consumed by the total of the ComponentElements
See Also:
ScreenRegion.compound(ComponentElement[])

compound

public static ScreenRegion compound(ScreenRegion[] sr)
ScreenRegion compound method for special linear operations

Parameters:
sr - - the array of ScreenRegions who are to be compounded
Returns:
ScreenRegion regionSum - the screen region consumed by the total of the ScreenRegions
See Also:
for a comparision

type

public static int type()
an override of the ScreenRegion type, always returns the indicator for BlockScreenRegion

See Also:
ScreenRegion.type()

clone

public Object clone()
Description copied from class: ScreenRegion
An abstract method to require overriding of the clone method.

Specified by:
clone in class ScreenRegion
Returns:
The region information in a new object.
See Also:
ScreenRegion.clone()

equals

public boolean equals(BlockScreenRegion sr)
Implementation of equality for ScreenRegion objects.

Parameters:
sr - The ScreenRegion to compare against.
Returns:
Returns true if equal, false otherwise.

equals

public boolean equals(com.ibm.hats.transform.regions.LinearScreenRegion sr)
implementation of equality for ScreenRegion objects.

Parameters:
sr - The ScreenRegion to compare against.
Returns:
Returns true if equal, false otherwise.

HATS 7.5.1 (201005110649)