com.ibm.eNetwork.ECL
Class ECLFieldList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--com.ibm.eNetwork.ECL.ECLFieldList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, ECLConstants, java.util.List, java.io.Serializable

public class ECLFieldList
extends java.util.Vector
implements ECLConstants

ECLFieldList contains a collection of the fields in the presentation space. 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 ECLField.

ECLFieldList can only be accessed through ECLPS using the GetFieldList() method. ECLFieldList is a static view of the presentation space and does not reflect changes made to the presentation space after its construction. The field list can be updated with a new snapshot of the presentation space using the Refresh() method.

Note:All ECLField objects returned by methods in this class are invalidated when Refresh() is called.

See Also:
ECLField, ECLPS, Serialized Form

Fields inherited from interface com.ibm.eNetwork.ECL.ECLConstants
ALL_FIELDS, ALL_PLANES, ALPHANUM_FIELD, ALTCUR_STR, ALTVIEW_STR, ATTN_STR, ATTR_5250_ALPHA_ONLY, ATTR_5250_ALPHANUM, ATTR_5250_ALPHANUM_MASK, ATTR_5250_BIDI_RTL, ATTR_5250_BRIGHT, ATTR_5250_DBCS_KATAKANA, ATTR_5250_DISPLAY, ATTR_5250_MAG_STRIPE, ATTR_5250_MODIFIED, ATTR_5250_NORMAL, ATTR_5250_NUM_ONLY, ATTR_5250_NUM_PLUS, ATTR_5250_NUM_SHIFT, ATTR_5250_NUM_SIGNED, ATTR_5250_PROTECTED, ATTR_ALPHANUM, ATTR_DISPLAY1, ATTR_DISPLAY2, ATTR_MDT, ATTR_PROTECTED, AUTOPUSH_STR, AUTOREV_STR, BACKSP_STR, BACKTAB_STR, BACKTABWORD_STR, BASE_STR, BEGINFLD_STR, BIDI_MODE_OFF_STR, BIDI_MODE_ON_STR, BIDIL_STR, BLUE_3270, CANCELPJOB_STR, CLEAR_STR, CLEARRECT_STR, CLOSE_STR, COLOR_ATTRIBUTES_PLANE, COLOR_PLANE, COLUMNHEAD_STR, CONTEXT_DISP_STR, CONTINUEPJOB_STR, COPY_STR, COPY_TABLE_STR, COPY_VT_HISTORY_STR, COPYALL_STR, COPYAPPEND_STR, CRSEL_STR, CSD_STR, CURDOWN_STR, CURLEFT_STR, CURRIGHT_STR, CURSOR_DIRECTION_STR, CURUP_STR, CUT_STR, DB_CA_EXIST, DB_CLEAR, DB_DB1, DB_DBCS, DB_DBHIGH, DB_DEAD, DB_MIX, DB_SI, DB_SO, DB_SOSI_EXIST, DBATTR_DEFAULT, DBATTR_EITHER, DBATTR_ONLY, DBATTR_OPEN, DBATTR_PURE, DBCS_PLANE, DBCSINP_STR, DBDEFALT, DEF_3270, DELCHAR_STR, DELWORD_STR, DISPLAYABLE_FIELD, DOCMODE_STR, DSPSOSI_STR, DUP_CHAR, DUP_STR, EBC_SI, EBC_SO, ENDLINE_STR, ENDPUSH_STR, ENTER_STR, ENTERRESET_STR, ERASEEOF_STR, ERASEFLD_STR, ERASEINPUT_STR, EXFIELD_PLANE, EXT_ATTR_3270_APL, EXT_ATTR_3270_BLINK, EXT_ATTR_3270_CHAR, EXT_ATTR_3270_DBCS, EXT_ATTR_3270_EBCDIC, EXT_ATTR_3270_REVERSE, EXT_ATTR_3270_UNDERLINE, EXT_ATTR_5250_BLINK, EXT_ATTR_5250_COLUMN_SEP, EXT_ATTR_5250_REVERSE, EXT_ATTR_5250_UNDERLINE, EXT_BLINK, EXT_COL_SEP, EXT_D_BOTH, EXT_D_LEFT, EXT_D_OVER, EXT_D_RIGHT, EXT_D_UNDER, EXT_DBCS, EXT_EFA_APL_SET, EXT_EFA_FG_SET, EXT_G_ALL, EXT_G_LEFT, EXT_G_OVER, EXT_G_RIGHT, EXT_G_UNDER, EXT_LINEATTR_CHECK, EXT_LINEATTR_DBLWID, EXT_LINEATTR_DBLWID_DBLHT_BOT, EXT_LINEATTR_DBLWID_DBLHT_TOP, EXT_LINEATTR_NORMAL, EXT_NON_ERASEABLE, EXT_NORMAL, EXT_OPAQUE, EXT_REVERSE, EXT_UNDERLN, F1_STR, F10_STR, F11_STR, F12_STR, F13_STR, F14_STR, F15_STR, F16_STR, F17_STR, F18_STR, F19_STR, F2_STR, F20_STR, F21_STR, F22_STR, F23_STR, F24_STR, F3_STR, F4_STR, F5_STR, F6_STR, F7_STR, F8_STR, F9_STR, FIELD_MARK, FIELD_PLANE, FINAL_STR, FLDBASE_STR, FLDEXT_STR, FLDMINUS_STR, FLDMRK_STR, FLDPLUS_STR, FLDREV_STR, FLDSHAPE_STR, FORMFEED_STR, FWDTAB_STR, GRCURSOR_STR, GREEN_3270, GRID_PLANE, HELP_STR, HILIGHT_FIELD, HINDIL_STR, HOME_STR, HOST_PLANE, HOSTPRT_STR, INITIAL_STR, INSERT_STR, ISOLATED_STR, JUMP_STR, KEYPAD0_STR, KEYPAD1_STR, KEYPAD2_STR, KEYPAD3_STR, KEYPAD4_STR, KEYPAD5_STR, KEYPAD6_STR, KEYPAD7_STR, KEYPAD8_STR, KEYPAD9_STR, KEYPADCOMMA_STR, KEYPADDOT_STR, KEYPADENTER_STR, KEYPADMINUS_STR, LATINL_STR, LOGICAL_DISP_STR, LOLIGHT_FIELD, MARKDOWN_STR, MARKLEFT_STR, MARKRIGHT_STR, MARKUP_STR, MIDDLE_STR, MODIFIED_FIELD, MOVEDOWN_STR, MOVELEFT_STR, MOVERIGHT_STR, MOVEUP_STR, MSR_STR, NATIONAL_DISP_STR, NEUT_3270, NEWLINE_STR, NEXTWORD_STR, NLS_PLANE, NO_TIMEOUT, NOMINAL_DISP_STR, NON_DISPLAYABLE_FIELD, NON_PENDETECTABLE_FIELD, NUMCONTEXT_STR, NUMERIC_FIELD, NUMNATIONAL_STR, NUMNOMINAL_STR, OICR_STR, PA1_STR, PA2_STR, PA3_STR, PAGEDWN_STR, PAGEUP_STR, PASTE_STR, PASTENEXT_STR, PENDETECTABLE_FIELD, PINK_3270, PREVIOUSWORD_STR, PRINT_STR, PROTECTED_FIELD, PRTESTPAGE_STR, PUSH_STR, RAWTEXT_PLANE, RED_3270, RESET_STR, RETRYPRT_STR, ROUNDTRIP_OFF_STR, ROUNDTRIP_ON_STR, RULE_STR, SCREENREV_STR, SEARCH_BACKWARD, SEARCH_FORWARD, SELECTALL_STR, SHIFT_F1_STR, SHIFT_F10_STR, SHIFT_F11_STR, SHIFT_F12_STR, SHIFT_F13_STR, SHIFT_F14_STR, SHIFT_F15_STR, SHIFT_F16_STR, SHIFT_F17_STR, SHIFT_F18_STR, SHIFT_F19_STR, SHIFT_F2_STR, SHIFT_F20_STR, SHIFT_F3_STR, SHIFT_F4_STR, SHIFT_F5_STR, SHIFT_F6_STR, SHIFT_F7_STR, SHIFT_F8_STR, SHIFT_F9_STR, SMARTORDERING_OFF_STR, SMARTORDERING_ON_STR, START_VT_HISTORY_LOG_STR, STARTMAC_STR, STOP_VT_HISTORY_LOG_STR, SYSREQ_STR, TABWORD_STR, TEST_STR, TEXT_PLANE, THAIL_STR, TOGGLE7HEB_STR, TOGGLEHEB_STR, TOGGLEVTHEBDISP_STR, TURQ_3270, TXTORL2R_STR, TXTORR2L_STR, TXTTYPEL_STR, TXTTYPEV_STR, UNMARK_STR, UNMODIFIED_FIELD, UNPROTECTED_FIELD, VISUAL_DISP_STR, VT_BREAK_STR, VT_KEYPAD_PF1_STR, VT_KEYPAD_PF2_STR, VT_KEYPAD_PF3_STR, VT_KEYPAD_PF4_STR, VTPRINTCONVERT_STR, WORDLFT_STR, WORDRGT_STR, WORDWRAP_STR, YELLOW_3270
 
Method Summary
 ECLField FindField(int pos)
          Finds the field which contains the specified linear position.
 ECLField FindField(int row, int col)
          Finds the field which contains the specified row and column coordinate.
 ECLField FindField(java.lang.String text, int direction)
          Finds the field which contains the given string.
 ECLField FindField(java.lang.String text, int pos, int direction)
          Finds the field which contains the given string.
 ECLField FindField(java.lang.String text, int row, int col, int direction)
          Finds the field which contains the given string.
 int GetFieldCount()
          Gets the number of fields in the field list.
 ECLField GetFirstField()
          Returns the first field in the field list.
 ECLField GetFirstField(int attr)
          Gets the first field in the field list which matches the specified attributes.
 ECLField GetNextField(ECLField afterThis)
          Returns the next field in the field list after the given field.
 ECLField GetNextField(ECLField afterThis, int attr)
          Returns the next field in the field list with the specified attributes.
 void Refresh()
          Refreshes the field list with a snapshot of the fields in the current presentation space.
 void Refresh(int planes)
          Refreshes the field list with a snapshot of the fields in the current presentation space.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Method Detail

Refresh

public void Refresh()
             throws ECLErr
Refreshes the field list with a snapshot of the fields in the current presentation space. All references to the fields previously contained within the field list are invalidated.

The new ECLField objects will contain only TEXT plane information.

Throws:
ECLErr - Thrown if the plane parameter is not valid or error occurred building the field list.
See Also:
Refresh(int)

Refresh

public void Refresh(int planes)
             throws ECLErr
Refreshes the field list with a snapshot of the fields in the current presentation space. All references to the fields previously contained within the field list are invalidated.

The new ECLField objects will only contain information about the presentation space planes specified, except for the text and attribute planes which are always available.

Parameters:
planes - The planes to refresh. The valid values follow and can be ORed together:
TEXT_PLANE - The character contents of the field. The text plane contains no null or non-displayable characters.
FIELD_PLANE - The field attributes for each field in the plane.
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.
ALL_PLANES - Refreshes all planes.
Throws:
ECLErr - Thrown if the planes parameter is not valid or error occurred building the field list.

GetFieldCount

public int GetFieldCount()
Gets the number of fields in the field list.
Returns:
The number fields in the field list.

GetFirstField

public ECLField GetFirstField(int attr)
Gets the first field in the field list which matches the specified attributes.
Parameters:
attr - The attributes of the desired field. The valid values follow:
ALL_FIELDS - all fields, regardless of attributes
These values may be ORed together and take precedence over their counterparts below if both are included in the attribute parameter.
MODIFIED_FIELD - modified
ALPHANUM_FIELD - alphanumeric
HILIGHT_FIELD - high-intensity
PROTECTED_FIELD - protected
DISPLAYABLE_FIELD - displayable
PENDETECTABLE_FIELD - pen-detectable
These values may be ORed together and will be overridden by their counterparts above if both are included in the attribute parameter.
UNMODIFIED_FIELD - unmodified
NUMERIC_FIELD - numeric-only
LOLIGHT_FIELD - not high-intensity
UNPROTECTED_FIELD - unprotected
NON_DISPLAYABLE_FIELD - non-displayable
NON_PENDETECTABLE_FIELD - not pen-detectable
Returns:
The first field with the given attributes or null if no matching field is found.
See Also:
GetNextField(com.ibm.eNetwork.ECL.ECLField, int)

GetFirstField

public ECLField GetFirstField()
Returns the first field in the field list.
See Also:
GetFirstField(int), GetNextField(com.ibm.eNetwork.ECL.ECLField), GetNextField(com.ibm.eNetwork.ECL.ECLField, int)

GetNextField

public ECLField GetNextField(ECLField afterThis,
                             int attr)
Returns the next field in the field list with the specified attributes. Searching starts at the field given by the ECLField parameter. If the ECLField parameter is null, the first field in the field list with the specified attributes will be returned.
Parameters:
afterThis - The field after which the search will begin.
attr - The attributes of the desired field. Use one of the following values:
ALL_FIELDS - all fields, regardless of attributes
These values may be ORed together and take precedence over their counterparts below if both are included in the attribute parameter.
MODIFIED_FIELD - modified
ALPHANUM_FIELD - alphanumeric
HILIGHT_FIELD - high-intensity
PROTECTED_FIELD - protected
DISPLAYABLE_FIELD - displayable
PENDETECTABLE_FIELD - pen-detectable
These values may be ORed together and will be overridden by their counterparts above if both are included in the attribute parameter.
UNMODIFIED_FIELD - unmodified
NUMERIC_FIELD - numeric-only
LOLIGHT_FIELD - not high-intensity
UNPROTECTED_FIELD - unprotected
NON_DISPLAYABLE_FIELD - non-displayable
NON_PENDETECTABLE_FIELD - not pen-detectable
See Also:
GetFirstField(), GetFirstField(int), GetNextField(com.ibm.eNetwork.ECL.ECLField)

GetNextField

public ECLField GetNextField(ECLField afterThis)
Returns the next field in the field list after the given field. If the ECLField parameter is null, the first field in the field list will be returned.
Parameters:
afterThis - The field after which the search will begin.
See Also:
GetFirstField(), GetFirstField(int), GetNextField(com.ibm.eNetwork.ECL.ECLField, int)

FindField

public ECLField FindField(int pos)
                   throws ECLErr
Finds the field which contains the specified linear position.
Parameters:
pos - Linear position
Returns:
The field which contains the specified position.
Throws:
ECLErr - Thrown if the given position is out of range.
See Also:
FindField(int, int)

FindField

public ECLField FindField(int row,
                          int col)
                   throws ECLErr
Finds the field which contains the specified row and column coordinate.
Parameters:
row - Row of the field to find
col - Column of the field to find
Returns:
The field which contains the specified coordinate.
Throws:
ECLErr - Thrown if the given position is out of range.
See Also:
FindField(int)

FindField

public ECLField FindField(java.lang.String text,
                          int direction)
                   throws ECLErr
Finds the field which contains the given string. This method searches for the text string in either the forward or backward direction. If a forward search is requested, the search starts at the beginning of the presentation space. If a backward search is requested, the search starts at the end of the presentation space.

If the search string spans more than one field, the field containing the starting position of the string is returned.

Parameters:
text - String to search for.
direction - Direction to search, either SEARCH_FORWARD or SEARCH_BACKWARD
Returns:
The field which contains the specified string or null if no field is found.
Throws:
ECLErr - Thrown if the given position is out of range.
See Also:
FindField(java.lang.String, int, int), FindField(java.lang.String, int, int, int)

FindField

public ECLField FindField(java.lang.String text,
                          int pos,
                          int direction)
                   throws ECLErr
Finds the field which contains the given string. This method searches from the given linear position in either the forward or backward direction.

If the search string spans more than one field, the field containing the starting position of the string is returned.

Parameters:
text - String to search for.
pos - Starting position for the search.
direction - Direction to search, either SEARCH_FORWARD or SEARCH_BACKWARD
Returns:
The field which contains the specified string or null if no field is found.
Throws:
ECLErr - Thrown if the given position is out of range.
See Also:
FindField(java.lang.String, int), FindField(java.lang.String, int, int, int)

FindField

public ECLField FindField(java.lang.String text,
                          int row,
                          int col,
                          int direction)
                   throws ECLErr
Finds the field which contains the given string. This method searches from the given row and column coordinate in either the forward or backward direction.

If the search string spans more than one field, the field containing the starting position of the string is returned.

Parameters:
text - String to search for.
row - Starting row for the search.
col - Starting column for the search.
direction - Direction to search, either SEARCH_FORWARD or SEARCH_BACKWARD
Returns:
The field which contains the specified string or null if no field is found.
Throws:
ECLErr - Thrown if the given position is out of range.
See Also:
FindField(java.lang.String, int), FindField(java.lang.String, int, int)