Package com.iizix.term
Class HostField
- java.lang.Object
- com.iizix.term.HostField
public class HostField extends java.lang.Object
This class holds the definition of a the host fields on the screen of the terminal connector.- Author:
- Christopher Mindus
Field Summary
Fields Modifier and Type Field Description static int
HFJ_Fill
Field justification: Field is entirely filled.static int
HFJ_NoAdjust
Field justification: No justification.static int
HFJ_RightBlank
Field justification: Right justified, blank-filled.static int
HFJ_RightZero
Field justification: Right justified, zero-filled.static int
HFT_Alphanumeric
Host field type: Alphanumeric characters only.static int
HFT_AlphaOnly
Host field type: Alpha characters only.static int
HFT_AnyCharacter
Host field type: Any character allowed.static int
HFT_DigitsOnly
Host field type: Digits only.static int
HFT_ImpliedDecimal
Host field type: Implied decimal number.static int
HFT_KatakanaShift
Host field type: Katakana shift.static int
HFT_NumericOnly
Host field type: Numeric only.static int
HFT_NumericShift
Host field type: Numeric shift.static int
HFT_SignedNumeric
Host field type: Signed numeric.static int
HFT_UpperOnly
Host field type: Upper case any character.boolean
isFieldExitRequired
The field exit key is required to exit this field.boolean
isHidden
This field is hidden (non-display).boolean
isLowerTranslatedToUpper
All characters in this field are automatically converted to upper case.boolean
isProtected
This field is protected.int
justification
Field justification: the values HFJ_*.int
length
The length of the field.HostField
nextField
The next host field.int
position
Position of the host field in the host screen.int
screenWidth
The width of the host screen.int
type
Field type: the values HFT_*.int
x
Position in X.int
y
Position in Y.
Constructor Summary
Constructors Constructor Description HostField()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(SendTransaction trans)
Appends the data for this host field to a transaction.java.lang.String
getJustificationString()
Gets the string representation of the justification.HostField
getNextField()
Gets the next host field.int
getPos()
Gets the zero-based position of this field on the screen.java.lang.String
getTypeString()
Gets the string representation of the type.boolean
isEmpty(HostScreen screen)
Checks if this field is protected and empty.
Field Detail
HFT_AnyCharacter
public static final int HFT_AnyCharacter
Host field type: Any character allowed.- See Also:
- Constant Field Values
HFT_AlphaOnly
public static final int HFT_AlphaOnly
Host field type: Alpha characters only.- See Also:
- Constant Field Values
HFT_Alphanumeric
public static final int HFT_Alphanumeric
Host field type: Alphanumeric characters only.- See Also:
- Constant Field Values
HFT_UpperOnly
public static final int HFT_UpperOnly
Host field type: Upper case any character.- See Also:
- Constant Field Values
HFT_NumericOnly
public static final int HFT_NumericOnly
Host field type: Numeric only.- See Also:
- Constant Field Values
HFT_DigitsOnly
public static final int HFT_DigitsOnly
Host field type: Digits only.- See Also:
- Constant Field Values
HFT_SignedNumeric
public static final int HFT_SignedNumeric
Host field type: Signed numeric.- See Also:
- Constant Field Values
HFT_ImpliedDecimal
public static final int HFT_ImpliedDecimal
Host field type: Implied decimal number.- See Also:
- Constant Field Values
HFT_NumericShift
public static final int HFT_NumericShift
Host field type: Numeric shift.- See Also:
- Constant Field Values
HFT_KatakanaShift
public static final int HFT_KatakanaShift
Host field type: Katakana shift.- See Also:
- Constant Field Values
HFJ_NoAdjust
public static final int HFJ_NoAdjust
Field justification: No justification.- See Also:
- Constant Field Values
HFJ_RightZero
public static final int HFJ_RightZero
Field justification: Right justified, zero-filled.- See Also:
- Constant Field Values
HFJ_RightBlank
public static final int HFJ_RightBlank
Field justification: Right justified, blank-filled.- See Also:
- Constant Field Values
HFJ_Fill
public static final int HFJ_Fill
Field justification: Field is entirely filled.- See Also:
- Constant Field Values
type
public int type
Field type: the values HFT_*.
justification
public int justification
Field justification: the values HFJ_*.
isFieldExitRequired
public boolean isFieldExitRequired
The field exit key is required to exit this field.
isHidden
public boolean isHidden
This field is hidden (non-display).
isProtected
public boolean isProtected
This field is protected.
isLowerTranslatedToUpper
public boolean isLowerTranslatedToUpper
All characters in this field are automatically converted to upper case.
x
public int x
Position in X. The position in X and Y is filled in through the position member if X is -1.
y
public int y
Position in Y. The position in X and Y is filled in through the position member if X is -1.
position
public int position
Position of the host field in the host screen. The HostFields class sets this member when adding new host fields if the position is -1. The position is taken from the x and y members.
length
public int length
The length of the field.
screenWidth
public int screenWidth
The width of the host screen. The HostFields class sets this member when adding new host fields.
nextField
public HostField nextField
The next host field. The HostFields class sets this member when adding new host fields.
Method Detail
getNextField
public HostField getNextField()
Gets the next host field.- Returns:
- null if no field is found.
getPos
public int getPos()
Gets the zero-based position of this field on the screen.- Returns:
- The position.
isEmpty
public boolean isEmpty(HostScreen screen)
Checks if this field is protected and empty. If the field is non-display contains characters, the field is assumed to be empty.- Parameters:
screen
- The host screen.- Returns:
- true if empty.
append
public void append(SendTransaction trans)
Appends the data for this host field to a transaction.- Parameters:
trans
- The transaction to append the host fields to.
getJustificationString
public java.lang.String getJustificationString()
Gets the string representation of the justification.- Returns:
- String description.
getTypeString
public java.lang.String getTypeString()
Gets the string representation of the type.- Returns:
- String description.