com.ibm.connector2.hod.screenable
Class J2HODFieldInfo

java.lang.Object
  |
  +--com.ibm.connector2.hod.screenable.J2HODFieldInfo
All Implemented Interfaces:
com.ibm.connector2.screen.IFieldInfo

public class J2HODFieldInfo
extends java.lang.Object
implements com.ibm.connector2.screen.IFieldInfo

This class contains information about a field. The following information are available:

Name Type Default Value Description
name String "" name of this field
text String "" texts in this field
startPos int 0 starting position of this field counting from top-left to right and down (counting from 0)
startRow int 1 starting row number (counting from 1)
startCol int 1 starting column number (counting from 1)
screenWidth int 80 current screen width (maximum column number counting from 1)


Constructor Summary
J2HODFieldInfo()
          Constructs an instance of this class with default values
J2HODFieldInfo(int w, java.lang.String n, java.lang.String t, int p)
          Constructs an instance of this class with specified screen width, name, text, and starting position value.
J2HODFieldInfo(int w, java.lang.String n, java.lang.String t, int r, int c)
          Constructs an instance of this class with specified screen width, name, text, start row, and start column.
 
Method Summary
 java.lang.Object clone()
          Creates a clone of current instance of this class object
 boolean equals(java.lang.Object obj)
          Determines whether this instance of this class contains same properties as other instance of an object passed.
 java.lang.String getName()
          Returns field name
 int getScreenWidth()
          Returns current screen width value being used
 int getStartCol()
          Returns starting column position of this field (counting from 1)
 int getStartPos()
          Returns starting position of this field.
 int getStartRow()
          Returns starting row position of this field (counting from 1)
 java.lang.String getText()
          Returns field text
 void setName(java.lang.String val)
          Sets field name
 void setScreenWidth(int val)
          Sets current screen width value being used to calculate start position based on row/column input.
 void setStartCol(int val)
          Sets field starting column value (counting from 1) Also sets startPos value accordingly.
 void setStartPos(int val)
          Sets field starting position.
 void setStartRow(int val)
          Sets field starting row value (counting from 1) Also sets startPos value accordingly.
 void setText(java.lang.String val)
          Sets field text
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

J2HODFieldInfo

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

J2HODFieldInfo

public J2HODFieldInfo(int w,
                      java.lang.String n,
                      java.lang.String t,
                      int p)
Constructs an instance of this class with specified screen width, name, text, and starting position value. startRow and startCol values are calculated according to startPos and screenWidth values.
Parameters:
w - int - screen width (must be greater than 0, otherwise default 80 will be used)
n - String - name of field
t - String - text of field
p - int - starting position of field

J2HODFieldInfo

public J2HODFieldInfo(int w,
                      java.lang.String n,
                      java.lang.String t,
                      int r,
                      int c)
Constructs an instance of this class with specified screen width, name, text, start row, and start column. startPos value is calculated according to startRow, startCol, and screenWidth values.
Parameters:
w - int - screen width (must be greater than 0, otherwise default 80 will be used)
n - String - name of field
t - String - text of field
r - int - starting row position of field
c - int - starting column position of field
Method Detail

getName

public java.lang.String getName()
Returns field name
Specified by:
getName in interface com.ibm.connector2.screen.IFieldInfo
Returns:
String
See Also:
setName(java.lang.String)

getText

public java.lang.String getText()
Returns field text
Specified by:
getText in interface com.ibm.connector2.screen.IFieldInfo
Returns:
String
See Also:
setText(java.lang.String)

getStartPos

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

getStartRow

public int getStartRow()
Returns starting row position of this field (counting from 1)
Specified by:
getStartRow in interface com.ibm.connector2.screen.IFieldInfo
Returns:
int
See Also:
setStartRow(int)

getStartCol

public int getStartCol()
Returns starting column position of this field (counting from 1)
Specified by:
getStartCol in interface com.ibm.connector2.screen.IFieldInfo
Returns:
int
See Also:
setStartCol(int)

setName

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

setText

public void setText(java.lang.String val)
Sets field text
Parameters:
val - String - field text
See Also:
getText()

setStartPos

public void setStartPos(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
See Also:
getStartPos()

setStartRow

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

setStartCol

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

getScreenWidth

public int getScreenWidth()
Returns current screen width value being used
Returns:
int
See Also:
setScreenWidth(int)

setScreenWidth

public void setScreenWidth(int val)
Sets current screen width value being used to calculate start position based on row/column input. User must reset either startPos or startRow and startCol values after setting screen width.
Parameters:
val - int - screen width
See Also:
getScreenWidth()

equals

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

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates a clone of current instance of this class object
Returns:
J2HODFieldInfo
Throws:
java.lang.CloneNotSupportedException -