com.ibm.connector2.hod.screenable
Class J2HODFieldData

java.lang.Object
  |
  +--com.ibm.connector2.hod.screenable.J2HODFieldData
All Implemented Interfaces:
java.lang.Cloneable, com.ibm.connector2.screen.IFieldData, java.io.Serializable

public class J2HODFieldData
extends java.lang.Object
implements com.ibm.connector2.screen.IFieldData

This class represents field data information. The following datum information are available: (the default values are null for all)

Name Type Default Value Description
name String "" name of this field
text String "" texts in this field
pos int 0 starting position of this field (counting from top-left to right an down starting with 0)
row int 1 starting row position of this field (counting from 1)
col int 1 starting column position of this field (counting from 1)
maxLength int 1 specifies maximum length of this field
screenWidth int 80 specifies screen width (maximum column number) - used to calculate row/col from pos

See Also:
Serialized Form

Constructor Summary
J2HODFieldData()
          Constructs an instance of this class with default values
J2HODFieldData(int width, java.lang.String name, java.lang.String text, int pos, int maxLength)
          Constructs an instance of this class with screen width, name, text, start position and maximum length specified.
J2HODFieldData(int width, java.lang.String name, java.lang.String text, int row, int col, int maxLength)
          Constructs an instance of this class with screen width, name, text, start row, start column and maximum length specified.
J2HODFieldData(java.lang.String name, java.lang.String text, int pos, int maxLength)
          Constructs an instance of this class with name, text, start position and maximum length specified.
J2HODFieldData(java.lang.String name, java.lang.String text, int row, int col, int maxLength)
          Constructs an instance of this class with name, text, start row, start column and maximum length specified.
 
Method Summary
 java.lang.Object clone()
          Clones current instance of this class object and returns it
 boolean equals(java.lang.Object obj)
          Determines whether this instance of this class has same properties as to the instance of object passed
 int getCol()
          Returns starting column position of this field (counting from 1)
 int getMaxLength()
          Returns the maximum length of the field, including any attribute bytes
 java.lang.String getName()
          Returns Field Name if one exists, null or "" otherwise
 int getPos()
          Returns starting position of this field.
 int getRow()
          Returns starting row position of this field (counting from 1)
 java.lang.String getText()
          Returns the text of this field.
 void setCol(int val)
          Sets field starting column value (counting from 1) Also sets startPos value accordingly.
 void setMaxLength(int val)
          Sets maximum length of the field
 void setName(java.lang.String val)
          Sets field name
 void setPos(int val)
          Sets field starting position.
 void setRow(int val)
          Sets field starting row value (counting from 1) Also sets startPos value accordingly.
 void setScreenWidth(int val)
          Sets screen width
 void SetText(java.lang.String val)
          Sets field text value
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

J2HODFieldData

public J2HODFieldData()
Constructs an instance of this class with default values

J2HODFieldData

public J2HODFieldData(java.lang.String name,
                      java.lang.String text,
                      int pos,
                      int maxLength)
Constructs an instance of this class with name, text, start position and maximum length specified. Screen width value is set to default value, 80.
Parameters:
name - String - name of this field
text - String - texts of this field
pos - int - starting position of this field
maxLength - int - maximum length of this field (field length)

J2HODFieldData

public J2HODFieldData(int width,
                      java.lang.String name,
                      java.lang.String text,
                      int pos,
                      int maxLength)
Constructs an instance of this class with screen width, name, text, start position and maximum length specified.
Parameters:
width - int - screen width (number of columns) (must be greater than 0, otherwise default 80 will be used)
name - String - name of this field
text - String - texts of this field
pos - int - starting position of this field
maxLength - int - maximum length of this field (field length)

J2HODFieldData

public J2HODFieldData(java.lang.String name,
                      java.lang.String text,
                      int row,
                      int col,
                      int maxLength)
Constructs an instance of this class with name, text, start row, start column and maximum length specified. Screen width value is set to default value, 80.
Parameters:
name - String - name of this field
text - String - texts of this field
row - int - starting row position of this field
col - int - starting column position of this field
maxLength - int - maximum length of this field (field length)

J2HODFieldData

public J2HODFieldData(int width,
                      java.lang.String name,
                      java.lang.String text,
                      int row,
                      int col,
                      int maxLength)
Constructs an instance of this class with screen width, name, text, start row, start column and maximum length specified.
Parameters:
width - int - screen width (number of columns) (must be greater than 0, otherwise default 80 will be used)
name - String - name of this field
text - String - texts of this field
row - int - starting row position of this field
col - int - starting column position of this field
maxLength - int - maximum length of this field (field length)
Method Detail

getName

public java.lang.String getName()
Returns Field Name if one exists, null or "" otherwise
Specified by:
getName in interface com.ibm.connector2.screen.IFieldData
Returns:
String

getText

public java.lang.String getText()
Returns the text of this field.
Specified by:
getText in interface com.ibm.connector2.screen.IFieldData
Returns:
String

getPos

public int getPos()
Returns starting position of this field. Counting starts with 0 from Top-Left to right and down.
Specified by:
getPos in interface com.ibm.connector2.screen.IFieldData
Returns:
int

getRow

public int getRow()
Returns starting row position of this field (counting from 1)
Returns:
int

getCol

public int getCol()
Returns starting column position of this field (counting from 1)
Returns:
int

getMaxLength

public int getMaxLength()
Returns the maximum length of the field, including any attribute bytes
Specified by:
getMaxLength in interface com.ibm.connector2.screen.IFieldData
Returns:
int

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones current instance of this class object and returns it
Returns:
J2HODFieldData
Throws:
java.lang.CloneNotSupportedException -  

equals

public boolean equals(java.lang.Object obj)
Determines whether this instance of this class has same properties as to the instance of object passed
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object - ay instance of an object to compare with
Returns:
boolean

setName

public void setName(java.lang.String val)
Sets field name
Parameters:
val - String - field name

SetText

public void SetText(java.lang.String val)
Sets field text value
Parameters:
val - String - field text

setPos

public void setPos(int val)
Sets field starting position. Counting starts with 0 from Top-Left to right and down. Also sets startRow and startCol values accordingly.
Parameters:
val - int - field starting position

setMaxLength

public void setMaxLength(int val)
Sets maximum length of the field
Parameters:
val - int - field maximum length

setScreenWidth

public void setScreenWidth(int val)
Sets screen width
Parameters:
val - int - field screen width (must be greater than 0, otherwise default value 80 will be used)

setRow

public void setRow(int val)
Sets field starting row value (counting from 1) Also sets startPos value accordingly.
Parameters:
val - int - field starting row position value

setCol

public void setCol(int val)
Sets field starting column value (counting from 1) Also sets startPos value accordingly.
Parameters:
val - int - field starting column position value