All Packages Class Hierarchy This Package Previous Next Index
Interface org.ohio.iOhioFields
- public interface iOhioFields
- extends iOhio
iOhioFields contains a collection of the fields in the virtual screen. It
provides methods to iterate through the fields, find fields based on location,
and find fields containing a given string. Each element of the collection
is an instance of iOhioField.
iOhioFields can only be accessed through iOhioScreen using the getFields()
method. iOhioFields is a static view of the virtual screen and does not
reflect changes made to the virtual screen after its construction. The field
list can be updated with a new view of the virtual screen using the refresh()
method. Note that zero length fields are not represented in this collection.
Note:All ECLField objects returned by methods in this class
are invalidated when Refresh() is called.
- See Also:
- iOhioField, iOhioScreen
-
findByPosition(iOhioPosition)
- Searches the collection for the target position and returns the iOhioField
object containing that position.
-
findByString(String, iOhioPosition, int, int, boolean)
- Searches the collection for the target string and returns the iOhioField
object containing that string.
-
getCount()
- Returns the number of iOhioField objects contained in this collection.
-
item(int)
- Returns the iOhioField object at the given index.
-
refresh()
- Updates the collection of iOhioField objects.
getCount
public abstract int getCount()
- Returns the number of iOhioField objects contained in this collection.
- Returns:
- The number of iOhioField objects
item
public abstract iOhioField item(int fieldIndex)
- Returns the iOhioField object at the given index. "One based" indexing is
used in all iOhio collections. For example, the first iOhioField in this
collection is at index 1.
- Parameters:
- fieldIndex - The index of the target field
- Returns:
- The iOhioField object at the given index position.
- See Also:
- iOhioField
refresh
public abstract void refresh()
- Updates the collection of iOhioField objects. All iOhioField objects
in the current virtual screen are added to the collection. Indexing
of iOhioField objects will not be preserved across refreshes.
findByString
public abstract iOhioField findByString(String targetString,
iOhioPosition startPos,
int length,
int dir,
boolean ignoreCase)
- Searches the collection for the target string and returns the iOhioField
object containing that string. The string must be totally contained within
the field to be considered a match.
- Parameters:
- targetString - The target string.
- startPos - The row and column where to start the search. The position
is inclusive (for example, row 1, col 1 means that position
1,1 will be used as the starting location and 1,1 will
be included in the search).
- length - The length from startPos to include in the search.
- dir - An OHIO_DIRECTION value:
Constant |
Value |
Description |
OHIO_DIRECTION_FORWARD |
0 |
Forward (beginning towards end) |
OHIO_DIRECTION_BACKWARD |
1 |
Backward (end towards beginning) |
- ignoreCase - Indicates whether the search is case sensitive. True means
that case will be ignored. False means the search will be
case sensitive.
- Returns:
- If found, an iOhioField object containing the target string. If not
found, returns a null.
findByPosition
public abstract iOhioField findByPosition(iOhioPosition targetPosition)
- Searches the collection for the target position and returns the iOhioField
object containing that position.
- Parameters:
- targetPosition - The target row and column.
- Returns:
- If found, an iOhioField object containing the target position. If not
found, returns a null.
All Packages Class Hierarchy This Package Previous Next Index