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.elements
Class FieldComponentElement

java.lang.Object
  extended by com.ibm.hats.transform.elements.ComponentElement
      extended by com.ibm.hats.transform.elements.FieldComponentElement
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
EnptuiChoiceComponentElement, InputComponentElement, SubfileMarkerComponentElementV6

public class FieldComponentElement
extends ComponentElement

The FieldComponentElement class represents a host screen field.


Field Summary
static String CLASS_NAME
           
protected  boolean split
          Flag indicates whether the element has been split to multiple elements
 
Fields inherited from class com.ibm.hats.transform.elements.ComponentElement
consumedRegion
 
Constructor Summary
FieldComponentElement()
          Constructs an empty FieldComponentElement object.
FieldComponentElement(FieldComponentElement fce, int startIndex, int length)
          Constructs a new FieldComponentElement object from a specified FCE.
FieldComponentElement(FieldComponentElement fce, String text, int startIndex, int length)
          Constructs a new FieldComponentElement object from a specified FCE with specified length.
FieldComponentElement(HsrScreenField field)
          Constructs a FieldComponentElement object based off the specified HostScreenField object.
FieldComponentElement(HsrScreenField field, int startPos, int length)
          Constructs a new FieldComponentElement object based off the specified HostScreenField object.
FieldComponentElement(HsrScreenField field, int startPos, int length, boolean flag)
          Deprecated.  
FieldComponentElement(HsrScreenField field, int startPos, int length, boolean isHidden, boolean isProtected)
          Constructs a new FieldComponentElement object based off the specified HostScreenField object.
FieldComponentElement(HsrScreenField field, int startPos, int length, boolean isHidden, boolean isProtected, boolean flag)
          Deprecated.  
FieldComponentElement(String text, int startPos, int length, boolean isHidden, boolean isProtected)
          Constructs a new FieldComponentElement object.
 
Method Summary
 void doTextReplacement(TextReplacementPair pair, ContextAttributes contextAttributes)
          Performs text replacement on this field.
 String getActionKey()
          Returns the action, aid key associated with the field.
 int getBackgroundColor()
          Returns the background color code of the field.
 int getBackgroundColor(int pos)
          Returns the background color code of the field.
 HsrAttributes getExtendedAttributes()
          Returns the extended field attributes of the field.
 int getForegroundColor()
          Returns the foreground color code of the field.
 int getForegroundColor(int pos)
          Returns the foreground color code of the field.
 boolean getIsRTL()
          Returns true if the field is right-to-left (BiDi specific).
 int getLength()
          Returns the length of the field.
 String getPreviewText()
          Returns some form of descriptive text about the component element.
 int getStartPos()
          Returns the linear, 1-based start position of the field.
 String getText()
          Returns the value, or text, of the field.
 boolean is3270()
          Returns true if the field came from a 3270 host screen.
 boolean is5250()
          Returns true if the field came from a 5250 host screen.
 boolean isAllBlank()
           
 boolean isAlphaNumeric()
          Returns true if the field allows alphanumeric (all symbols) values.
 boolean isBlink()
          Returns true if the field is marked as "blink".
 boolean isHidden()
          Returns true if the field is hidden (ie the text is hidden).
 boolean isHighIntensity()
          Returns true if the field is marked as "high intensity".
 boolean isHolderOnly()
           
 boolean isMatch(ComponentElement ce)
          Returns a boolean specifying whether the specified component element "matches" this component element.
 boolean isNumericOnly()
          Returns true if only numerals can be entered into the field.
 boolean isProtected()
          Returns true if the field is protected.
 boolean isReverseVideo()
          Returns true if the field is marked as "reverse video".
 boolean isSplit()
           
 boolean isUnderline()
          Returns true if the field is marked as "underline".
 boolean isUnicodeField()
          Returns true if the field is 5250 unicode field.
 void set3270(boolean b)
          Specifies whether the field came from a 3270 host screen.
 void set5250(boolean b)
          Specifies whether the field came from a 5250 host screen.
 void setActionKey(String string)
          Sets the action key associated with the field.
 void setExtendedAttributes(HsrAttributes attribs)
          Sets the extended field attributes (color, etc) of the field.
 void setHidden(boolean isHidden)
          Sets whether the field is hidden or visible.
 void setHolderOnly(boolean b)
           
 void setLength(int length)
          Sets the length.
 void setProtected(boolean isProtected)
          Sets whether the field is protected or not protected (ie static text or an input field).
 void setSplit(boolean b)
           
 void setStartPos(int startPos)
          Sets the linear start position of the field.
 void setText(String text)
          Sets the value, or text, of the field.
 String toString()
           
 
Methods inherited from class com.ibm.hats.transform.elements.ComponentElement
clone, getConsumedRegion, getScreenId, isConsumer, isTruncateToPreserveLength, setConsumedRegion, setScreenId, type, type
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_NAME

public static final String CLASS_NAME
See Also:
Constant Field Values

split

protected boolean split
Flag indicates whether the element has been split to multiple elements

Constructor Detail

FieldComponentElement

public FieldComponentElement()
Constructs an empty FieldComponentElement object.


FieldComponentElement

public FieldComponentElement(HsrScreenField field)
Constructs a FieldComponentElement object based off the specified HostScreenField object.

Parameters:
field -

FieldComponentElement

public FieldComponentElement(HsrScreenField field,
                             int startPos,
                             int length)
Constructs a new FieldComponentElement object based off the specified HostScreenField object.

Parameters:
field -
startPos - new linear (1-based) start position of the field
length - new length of the field

FieldComponentElement

public FieldComponentElement(HsrScreenField field,
                             int startPos,
                             int length,
                             boolean flag)
Deprecated. 

Constructs a new FieldComponentElement object based off the specified HostScreenField object.

Parameters:
field -
startPos - new linear (1-based) start position of the field
length - new length of the field
flag - boolean flag

FieldComponentElement

public FieldComponentElement(HsrScreenField field,
                             int startPos,
                             int length,
                             boolean isHidden,
                             boolean isProtected,
                             boolean flag)
Deprecated. 

Constructs a new FieldComponentElement object based off the specified HostScreenField object.

Parameters:
field -
startPos - new linear start position (1-based) of the field
length - new length of the field
isHidden - boolean specifying whether the field is hidden (if not protected and hidden, the field is considered a "password" field)
isProtected - boolean specifying whether the field is protected (ie static text or an input field)
flag - boolean flag

FieldComponentElement

public FieldComponentElement(HsrScreenField field,
                             int startPos,
                             int length,
                             boolean isHidden,
                             boolean isProtected)
Constructs a new FieldComponentElement object based off the specified HostScreenField object.

Parameters:
field -
startPos - new linear start position (1-based) of the field
length - new length of the field
isHidden - boolean specifying whether the field is hidden (if not protected and hidden, the field is considered a "password" field)
isProtected - boolean specifying whether the field is protected (ie static text or an input field)

FieldComponentElement

public FieldComponentElement(String text,
                             int startPos,
                             int length,
                             boolean isHidden,
                             boolean isProtected)
Constructs a new FieldComponentElement object.

Parameters:
text - value of the field
startPos - linear start position (1-based) of the field
length - length of the field
isHidden - boolean specifying whether the field is hidden (if not protected and hidden, the field is considered a "password" field)
isProtected - boolean specifying whether the field is protected (ie static text or an input field)

FieldComponentElement

public FieldComponentElement(FieldComponentElement fce,
                             int startIndex,
                             int length)
Constructs a new FieldComponentElement object from a specified FCE. This method allows for a FieldComponentElement to be "split" into multiple parts

Parameters:
fce - The field component element.
startIndex - The start index.
length - The length.

FieldComponentElement

public FieldComponentElement(FieldComponentElement fce,
                             String text,
                             int startIndex,
                             int length)
Constructs a new FieldComponentElement object from a specified FCE with specified length. This method allows for a FieldComponentElement to be "split" into multiple parts

Parameters:
fce - The field component element.
text - value of the field
startIndex - The start index.
length - The length.
Method Detail

getText

public String getText()
Returns the value, or text, of the field.

Returns:
The value, or text, of the field.

setText

public void setText(String text)
Sets the value, or text, of the field.

Parameters:
text -

isProtected

public boolean isProtected()
Returns true if the field is protected. If false the field is considered an input field.

Returns:
Returns true if the field is protected, false otherwise.

setProtected

public void setProtected(boolean isProtected)
Sets whether the field is protected or not protected (ie static text or an input field).

Parameters:
isProtected -

isHidden

public boolean isHidden()
Returns true if the field is hidden (ie the text is hidden). If a field is both not protected (input) and hidden, it is considered a "password" field.

Returns:
Returns true if the field is hidden (ie the text is hidden), false otherwise.

setHidden

public void setHidden(boolean isHidden)
Sets whether the field is hidden or visible.

Parameters:
isHidden -

getStartPos

public int getStartPos()
Returns the linear, 1-based start position of the field.

Returns:
The linear, 1-based start position of the field.

getLength

public int getLength()
Returns the length of the field.

Returns:
The length of the field.

setLength

public void setLength(int length)
Sets the length.

Parameters:
length - The length.

setStartPos

public void setStartPos(int startPos)
Sets the linear start position of the field.

Parameters:
startPos -

toString

public String toString()
Overrides:
toString in class Object

getForegroundColor

public int getForegroundColor()
Returns the foreground color code of the field. See the Host Access Beans API documention (under Color Plane) for more information.

Returns:
The foreground color code of the field.

getForegroundColor

public int getForegroundColor(int pos)
Returns the foreground color code of the field. See the Host Access Beans API documention (under Color Plane) for more information.

Parameters:
pos - The position in the field to retrieve foreground color from.
Returns:
The foreground color code of the field.

getBackgroundColor

public int getBackgroundColor()
Returns the background color code of the field. See the Host Access Beans API documention (under Color Plane) for more information.

Returns:
The background color code of the field.

getBackgroundColor

public int getBackgroundColor(int pos)
Returns the background color code of the field.

Parameters:
pos - The position in the field to retrieve background color from.
Returns:
The background color code of the field.

getPreviewText

public String getPreviewText()
Description copied from class: ComponentElement
Returns some form of descriptive text about the component element.

Specified by:
getPreviewText in class ComponentElement

isUnderline

public boolean isUnderline()
Returns true if the field is marked as "underline".

Returns:
Returns true if the field is marked as "underline", false otherwise.

isAlphaNumeric

public boolean isAlphaNumeric()
Returns true if the field allows alphanumeric (all symbols) values.

Returns:
boolean

isBlink

public boolean isBlink()
Returns true if the field is marked as "blink".

Returns:
boolean

isHighIntensity

public boolean isHighIntensity()
Returns true if the field is marked as "high intensity".

Returns:
boolean

isNumericOnly

public boolean isNumericOnly()
Returns true if only numerals can be entered into the field.

Returns:
boolean

isReverseVideo

public boolean isReverseVideo()
Returns true if the field is marked as "reverse video".

Returns:
boolean

getActionKey

public String getActionKey()
Returns the action, aid key associated with the field.

Returns:
Returns the action, aid key associated with the field.
See Also:
HTMLElementFactory.createSubmitButton(FieldComponentElement)

setActionKey

public void setActionKey(String string)
Sets the action key associated with the field.

Parameters:
string -
See Also:
HTMLElementFactory.createSubmitButton(FieldComponentElement)

doTextReplacement

public void doTextReplacement(TextReplacementPair pair,
                              ContextAttributes contextAttributes)
Performs text replacement on this field.

Specified by:
doTextReplacement in class ComponentElement
Parameters:
pair - TextReplacementPair to base replacement on
contextAttributes - context attributes

getIsRTL

public boolean getIsRTL()
Returns true if the field is right-to-left (BiDi specific).

Returns:
Returns true if the field is right-to-left (BiDi specific), false otherwise.

isMatch

public boolean isMatch(ComponentElement ce)
Description copied from class: ComponentElement
Returns a boolean specifying whether the specified component element "matches" this component element.

Currently only implemented by the PatternComponentElement, other classes return false.

Overrides:
isMatch in class ComponentElement
Parameters:
ce - The ComponentElement object for the comparison.
Returns:
A boolean specifying whether the specified component element "matches" this component element.

isUnicodeField

public boolean isUnicodeField()
Returns true if the field is 5250 unicode field.

Returns:
Returns true if the field is 5250 unicode field, false otherwise.

getExtendedAttributes

public HsrAttributes getExtendedAttributes()
Returns the extended field attributes of the field.

Returns:
Returns the extended field attributes of the field.

setExtendedAttributes

public void setExtendedAttributes(HsrAttributes attribs)
Sets the extended field attributes (color, etc) of the field.

Parameters:
attribs - The extended field attributes.

is3270

public boolean is3270()
Returns true if the field came from a 3270 host screen.

Returns:
Returns true if the field came from a 3270 host screen, false otherwise.

is5250

public boolean is5250()
Returns true if the field came from a 5250 host screen.

Returns:
Returns true if the field came from a 5250 host screen, false otherwise.

set3270

public void set3270(boolean b)
Specifies whether the field came from a 3270 host screen.

Parameters:
b - The 3270 host screen field flag.

set5250

public void set5250(boolean b)
Specifies whether the field came from a 5250 host screen.

Parameters:
b - The 5250 host screen field flag.

setHolderOnly

public void setHolderOnly(boolean b)

isHolderOnly

public boolean isHolderOnly()

isAllBlank

public boolean isAllBlank()

isSplit

public boolean isSplit()
Returns:
The split flag value

setSplit

public void setSplit(boolean b)

HATS 7.5.1 (201005110649)