All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eNetwork.ECL.ECLField

java.lang.Object
   |
   +----com.ibm.eNetwork.ECL.ECLField

public class ECLField
extends Object
implements ECLConstants, iOhioField
A field is the fundamental element of a presentation space. A field includes both contents and attributes. The ECLField class encapsulates a presentation space field and provides methods for accessing and manipulating field attributes and contents.

For 3270, 5250, and CICS sessions, ECLField correlates to the fields defined in their respective datastreams. For VT emulation, the entire presentation space is represented in a single field.

ECLField objects can be accessed through ECLFieldList objects.

See Also:
ECLFieldList

Method Index

 o GetAttribute()
Gets the field's raw attribute byte.
 o GetEnd()
Gets the ending linear position of the field.
 o GetEndCol()
Gets the ending column of the field.
 o GetEndRow()
Gets the ending row of the field.
 o GetLength()
Gets the length of the field.
 o GetScreen(char[], int, int)
Retrieves information from the different planes (text, color, extended attributes, DBCS, and grid) associated with a field.
 o GetStart()
Gets the starting linear position of the field.
 o GetStartCol()
Gets the starting column of the field.
 o GetStartRow()
Gets the starting row of the field.
 o GetString(char[], int)
Retrieves text plane information from the field similarly to GetScreen using the TEXT_PLANE parameter, but it handles DBCS characters differently.
 o IsDisplay()
Determines whether or not the field is displayable.
 o IsHighIntensity()
Determines whether or not the field is high-intensity.
 o IsModified()
Determines whether or not the field has been modified.
 o IsNumeric()
Determines whether or not the field is numeric-only.
 o IsPenDetectable()
Determines whether or not the field is pen-detectable.
 o IsProtected()
Determines whether or not the field is protected.
 o SetString(String)
Sets the field's text plane to the specified string similarly to SetText, but it handles DBCS characters differently.
 o SetText(String)
Sets the field's text plane to the specified string.

Methods

 o GetStart
 public int GetStart()
Gets the starting linear position of the field. The linear positions can range from 1 to the size of the presentation space. The starting linear position of a field is the position of the first character in the field. If the field is zero-length, the linear position of the field's attribute byte is returned.

Returns:
The starting linear position of the field.
See Also:
GetEnd
 o GetStartRow
 public int GetStartRow()
Gets the starting row of the field. The row can range from 1 to the number of rows in the presentation space. The starting row of a field is the row which contains the first character in the field. If the field is zero-length, the row of the field's attribute byte is returned.

Returns:
The starting row of the field within the PS.
See Also:
GetEndRow, GetStartCol
 o GetStartCol
 public int GetStartCol()
Gets the starting column of the field. The column can range from 1 to the number of columns in the presentation space. The starting column of a field is the column which contains the first character in the field. If the field is zero-length, the column of the field's attribute byte is returned.

Returns:
The starting column of the field within the PS.
See Also:
GetEndCol, GetStartRow
 o GetEnd
 public int GetEnd()
Gets the ending linear position of the field. The linear positions can range from 1 to the size of the presentation space. The ending linear position of a field is the position of the last character in the field. If the field is zero-length, the linear position of the field's attribute byte is returned.

Returns:
The ending linear position of the field.
See Also:
GetStart
 o GetEndRow
 public int GetEndRow()
Gets the ending row of the field. The row can range from 1 to the number of rows in the presentation space. The ending row of a field is the row which contains the last character in the field. If the field is zero-length, the row of the field's attribute byte is returned.

Returns:
The ending row of the field within the PS.
See Also:
GetStartRow, GetEndCol
 o GetEndCol
 public int GetEndCol()
Gets the ending column of the field. The column can range from 1 to the number of columns in the presentation space. The ending column of a field is the column which contains the last character in the field. If the field is zero-length, the column of the field's attribute byte is returned.

Returns:
The ending column of the field within the PS.
See Also:
GetStartCol, GetEndRow
 o GetLength
 public final int GetLength()
Gets the length of the field. A field's length can range from zero to the size of the presentation space.

Returns:
The length of the field.
 o GetScreen
 public int GetScreen(char buffer[],
                      int length,
                      int plane) throws ECLErr
Retrieves information from the different planes (text, color, extended attributes, DBCS, and grid) associated with a field. The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the beginning of the field and continuing until the buffer is full, or the entire field contents have been copied. The buffer must include one extra position for the addition of a terminating null character.

Parameters:
buffer - An array of characters used to store the return values.
length - The number of characters to copy to the buffer.
plane - The plane to return. The valid values follow:
TEXT_PLANE - The character contents of the field. The text plane contains no null or non-printable characters.
COLOR_PLANE - The color attributes for each character in the plane.
EXFIELD_PLANE - The extended field attributes for each character in the plane.
DBCS_PLANE - The double byte character set (DBCS) character and field attribute data.
GRID_PLANE - The DBCS grid information.
Returns:
The number of characters copied to the buffer, not including the terminating null when the text plane is copied.
Throws: ECLErr
Thrown if the buffer parameter is null or if the plane parameter is incorrect.
 o GetString
 public synchronized int GetString(char buffer[],
                                   int length) throws ECLErr
Retrieves text plane information from the field similarly to GetScreen using the TEXT_PLANE parameter, but it handles DBCS characters differently. While GetScreen returns the raw text plane data, GetString removes duplicate DBCS characters before the text plane data is returned.

The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the beginning of the field and continuing until the buffer is full or the entire field contents have been copied. The buffer must include one extra position for the addition of a terminating null character.

Note: GetString functions identically to GetScreen when the field's text plane contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
buffer - An array of characters that contains the returned data.
length - The length of the buffer.
Returns:
The number of characters copied to the buffer, not including the terminating null.
Throws: ECLErr
Thrown if the buffer parameter is null.
 o SetText
 public void SetText(String text) throws ECLErr
Sets the field's text plane to the specified string. If the string is shorter than the length of the field, the rest of the field is cleared. If the string is longer than the field, the text is truncated.

Parameters:
text - The text used to replace the field's current text plane.
Throws: ECLErr
An ECLErr will be thrown if the field is protected.
See Also:
SetString
 o SetString
 public void SetString(String text) throws ECLErr
Sets the field's text plane to the specified string similarly to SetText, but it handles DBCS characters differently. While SetText copies the given string directly to the field's text plane, SetString automatically duplicates DBCS characters before copying the string to the text plane.

If the string is shorter than the length of the field, the rest of the field is cleared. If the string is longer than the field, the text is truncated.

Note: SetString functions identically to SetText when the given text string contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
text - The text used to replace the field's current text plane.
Throws: ECLErr
An ECLErr will be thrown if the field is protected.
See Also:
SetText
 o IsModified
 public final boolean IsModified()
Determines whether or not the field has been modified.

Returns:
True if the field has been modified, false otherwise.
 o IsProtected
 public final boolean IsProtected()
Determines whether or not the field is protected.

Returns:
True if the field is protected, false otherwise.
 o IsNumeric
 public boolean IsNumeric()
Determines whether or not the field is numeric-only.

Returns:
True if the field is numeric only, false otherwise.
 o IsHighIntensity
 public boolean IsHighIntensity()
Determines whether or not the field is high-intensity.

Returns:
True if the field is high intensity, false otherwise.
 o IsPenDetectable
 public final boolean IsPenDetectable()
Determines whether or not the field is pen-detectable.

Returns:
True if the field is pen detectable, false otherwise.
 o IsDisplay
 public final boolean IsDisplay()
Determines whether or not the field is displayable.

Returns:
True if the field is displayable, false otherwise.
 o GetAttribute
 public final short GetAttribute()
Gets the field's raw attribute byte. Refer to the Field Plane for additional information on the format of the field attribute byte.

Returns:
The field's raw attribute byte.

All Packages  Class Hierarchy  This Package  Previous  Next  Index