public class PhantomHostField extends Object implements Comparable<PhantomHostField>
Modifier and Type | Field and Description |
---|---|
static int |
ADJ_LEFT
Left adjust
|
static int |
ADJ_MASK
Adjust mask
|
static int |
ADJ_NONE
No adjust
|
static int |
ADJ_RIGHT
Right adjust
|
PhantomHostFieldColumnCell[] |
cells
An array holding a column of cells that forms a column in a listbox.
|
char |
filler
Host field filler.
|
int |
flags
Host field flags.
|
static int |
FORMAT_FIELDEXIT
Field exit flag
|
static int |
FORMAT_SNAP
Snap to real host field at runtime
|
static int |
FORMAT_STRIPBEGIN
Strip beginning of field
|
static int |
FORMAT_STRIPCUA
Strip CUA chars at end
|
static int |
FORMAT_STRIPEND
Strip end of field
|
String |
name
Host field name.
|
PhantomHostField |
nextContinuedField
Next host field if continued.
|
PhantomHostField |
nextNormalField
Next normal host field.
|
PhantomHostScreen |
phantomScreen
The Phantom Host Screen.
|
int |
type
Host field type.
|
static int |
TYPE_3270NUMERIC
3270-Numeric type
|
static int |
TYPE_ALPHA
All chars allowed
|
static int |
TYPE_ALPHALIMITED
Upper/Lower ,.- and space
|
static int |
TYPE_CONTINUE
Continue from previous field
|
static int |
TYPE_MARKED
Marked field
|
static int |
TYPE_NUMERIC
Numeric only
|
static int |
TYPE_NUMERICOTHER
Numeric ,.+- and space
|
static int |
TYPE_OUTPUT
Output field
|
static int |
TYPE_SIGNNUMERIC
Numeric +-
|
static String[] |
TYPES
The type strings.
|
Constructor and Description |
---|
PhantomHostField(PhantomHostScreen phantomScreen,
HostScreen screen,
HostField field)
Creates a new Gui-on-the-fly host field for a specific host field.
|
PhantomHostField(PhantomHostScreen phantomScreen,
HostScreen screen,
int x,
int y,
int length)
Creates a new Gui-on-the-fly host field for a specific host field.
|
PhantomHostField(PhantomHostScreen phantomScreen,
HostScreen screen,
int x,
int y,
int cx,
int cy)
GUI
|
PhantomHostField(PhantomHostScreen phantomScreen,
HostScreen screen,
int x,
int y,
int cx,
int cy,
boolean is3270)
Constructs a host field definition from a real host field.
|
PhantomHostField(PhantomHostScreen phantomScreen,
PhantomFile file)
Loads the host field from the runtime file.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PhantomHostField hf)
The compare method used to sort host fields by name.
|
PhantomHostField |
createCopy()
Creates a copy of this host field.
|
PhantomHostField |
createCopy(PhantomHostScreen hs)
Creates a copy of this host field.
|
boolean |
doesScreenMatch(HostScreen screen)
Checks if this host field belongs to a screen that is currently
matching or not.
|
boolean |
doesScreenMatch(HostSession hostSession)
Checks if this host field belongs to a screen that is currently
matching or not.
|
boolean |
equals(Object o)
Two host fields are identical, used by screen equals.
|
int |
getColor(HostScreen screen)
Gets the CGA color of this field.
|
int |
getColor(HostScreen screen,
boolean isDynamic)
Gets the CGA color of this field.
|
int |
getColor(HostScreen screen,
int line)
Gets the CGA color of a line in this field.
|
int |
getColor(HostScreen screen,
int line,
boolean doCheckMatch)
Gets the CGA color of a line in this field.
|
int |
getColor2(HostScreen screen,
boolean doCheckMatch)
Gets the CGA color of this field.
|
int |
getColumnRelative()
Get this field column relative position.
|
PhantomHostFieldLocation |
getCursorPositionInField(int cursorX,
int cursorY)
Checks if the cursor position in inside this host field.
|
int |
getCX()
Get the width.
|
int |
getCY()
Get the height.
|
PhantomHostFieldColumnCell[] |
getHiddenHostFieldColumn(HostSession hostSession)
Gets an array of all host field cells in a column.
|
String |
getHiddenHostString(HostScreen screen)
Gets the contents of this host field.
|
String |
getHiddenHostString(HostScreen screen,
boolean isDynamic)
Gets the contents of this host field.
|
String |
getHiddenHostString(HostScreen screen,
boolean isDynamic,
boolean dontWrap)
Gets the contents of this host field.
|
String |
getHiddenHostString(HostScreen screen,
int line)
Gets the contents of this host field.
|
HostField |
getHostField(HostScreen screen)
Gets the corresponding host field on the current host screen.
|
HostField |
getHostField(HostScreen screen,
boolean isDynamic)
Gets the corresponding host field on the current host screen.
|
HostField |
getHostField(HostScreen screen,
int line)
Gets the corresponding host field on the current host screen.
|
PhantomHostFieldColumnCell[] |
getHostFieldColumn(HostSession hostSession)
Gets an array of all host field cells in a column.
|
PhantomHostFieldColumnCell[] |
getHostFieldColumn(HostSession hostSession,
boolean doGetHidden)
Gets an array of all host field cells in a column.
|
String |
getHostString(HostScreen screen)
Gets the contents of this host field.
|
String |
getHostString(HostScreen screen,
boolean doGetHidden)
Gets the contents of this host field.
|
String |
getHostString(HostScreen screen,
boolean doGetHidden,
boolean isDynamic)
Gets the contents of this host field.
|
String |
getHostString(HostScreen screen,
boolean doGetHidden,
boolean isDynamic,
boolean dontWrap,
boolean doCheckMatch)
Gets the contents of this host field.
|
String |
getHostString(HostScreen screen,
boolean doGetHidden,
int line)
Gets the contents of this host field at a certain line.
|
String |
getHostString(HostScreen screen,
boolean doGetHidden,
int line,
boolean doCheckMatch)
Gets the contents of this host field at a certain line.
|
String |
getHostString(HostScreen screen,
int line)
Gets the contents of this host field.
|
int |
getLineCount()
Gets the line count in this host field.
|
String |
getName()
Gets the name of this host field.
|
PhantomHostField |
getNext()
Gets the next normal host field.
|
ENPObject |
getNPObject()
Gets a new NPObject for this screen identification.
|
int |
getRowRelative()
Get this field row relative position.
|
int |
getTotalWidth()
Get this field total width.
|
int |
getTotalWidth(HostScreen screen,
boolean isDynamic)
Get this field total width.
|
int |
getTotalWidth(HostScreen screen,
boolean isDynamic,
boolean dontWrap)
Get this field total width.
|
int |
getType()
Gets the type of this host field.
|
String |
getTypeDescription()
Gets the type string for a field type.
|
static String |
getTypeDescription(int type)
Gets the type string for a field type.
|
int |
getWidth()
Get this field width.
|
int |
getWidth(int line)
Gets the with of a specific line in the host field.
|
int |
getX()
Get the horizontal position.
|
int |
getY()
Get the vertical position.
|
boolean |
hasHostFieldColumnChanged(PhantomHostFieldColumnCell[] oldCells)
Checks if the contents in the PhantomHostFieldColumnCells has changed.
|
boolean |
isContinuation()
Checks if this host field is a continuation part of the previous field.
|
boolean |
isContinued()
Checks if the field is continued.
|
boolean |
isScreenNonCurrentPopup()
Check if data is to be retrieved from this screen and it's not the current pop-up
screen, rather a "main screen" behind, then methods fetching data using "relative"
methods should use "absolute" ones instead.
|
void |
propagateNextNormalField(PhantomHostField f)
Propagates the next normal host field to all continued fields.
|
void |
save(PhantomOutputFile file)
Saves the host field from the runtime file.
|
boolean |
setCursor(HostSession hostSession)
Set cursor to the position of this field, first line.
|
boolean |
setCursor(HostSession hostSession,
boolean isDynamic)
Set cursor to the position of this field, first line.
|
boolean |
setCursor(HostSession hostSession,
int line)
Set cursor to the position of this field with line offset.
|
boolean |
setCursor(HostSession hostSession,
int line,
int charpos)
Set cursor to the position of this field with line offset and the character offset.
|
void |
setCX(int cx)
Set the width.
|
void |
setCY(int cy)
Set the height.
|
boolean |
setHostField(HostSession hostSession,
String text)
Sets the corresponding host field on the current host screen
to the specified string.
|
boolean |
setHostField(HostSession hostSession,
String text,
boolean isDynamic)
Sets the corresponding host field on the current host screen
to the specified string.
|
boolean |
setHostField(HostSession hostSession,
String text,
int line)
Sets the corresponding host field on the current host screen
to the specified string.
|
void |
setNextContinuedHostField(PhantomHostField next)
Sets the next continued host field.
|
void |
setNextNormalHostField(PhantomHostField next)
Sets the next normal host field.
|
void |
setX(int x)
Set the horizontal position.
|
void |
setY(int y)
Set the vertical position.
|
void |
updateGuiOnTheFlyValue(CRC32 crc32)
Updates a Gui-on-the-fly value with this host field's data.
|
public static final int TYPE_CONTINUE
public static final int TYPE_ALPHA
public static final int TYPE_NUMERIC
public static final int TYPE_ALPHALIMITED
public static final int TYPE_NUMERICOTHER
public static final int TYPE_SIGNNUMERIC
public static final int TYPE_3270NUMERIC
public static final int TYPE_MARKED
public static final int TYPE_OUTPUT
public static final String[] TYPES
public static final int ADJ_LEFT
public static final int ADJ_RIGHT
public static final int ADJ_NONE
public static final int ADJ_MASK
public static final int FORMAT_FIELDEXIT
public static final int FORMAT_STRIPBEGIN
public static final int FORMAT_STRIPEND
public static final int FORMAT_SNAP
public static final int FORMAT_STRIPCUA
public PhantomHostScreen phantomScreen
public int type
public int flags
public char filler
public String name
public PhantomHostField nextContinuedField
public PhantomHostField nextNormalField
public PhantomHostFieldColumnCell[] cells
public PhantomHostField(PhantomHostScreen phantomScreen, PhantomFile file) throws IOException
+ Field name BYTE [9] + X position BYTE + Y position BYTE + Width BYTE + Height BYTE + Type BYTE + Flags BYTE + Filler BYTE
IOException
- if an I/O error occurs.public PhantomHostField(PhantomHostScreen phantomScreen, HostScreen screen, HostField field)
When this new field is created, a CRC32 value is updated in order to establish if the host screen where this field is added to is equal to another.
public PhantomHostField(PhantomHostScreen phantomScreen, HostScreen screen, int x, int y, int length)
When this new field is created, a CRC32 value is updated in order to establish if the host screen where this field is added to is equal to another.
public PhantomHostField(PhantomHostScreen phantomScreen, HostScreen screen, int x, int y, int cx, int cy, boolean is3270)
public PhantomHostField(PhantomHostScreen phantomScreen, HostScreen screen, int x, int y, int cx, int cy)
public static String getTypeDescription(int type)
public PhantomHostField createCopy()
public PhantomHostField createCopy(PhantomHostScreen hs)
public void updateGuiOnTheFlyValue(CRC32 crc32)
public void propagateNextNormalField(PhantomHostField f)
public String getName()
public int getType()
public boolean isContinuation()
public boolean isContinued()
public void setNextContinuedHostField(PhantomHostField next)
public void setNextNormalHostField(PhantomHostField next)
public int getX()
public void setX(int x)
x
- new x valuepublic int getY()
public void setY(int y)
y
- new y valuepublic int getCX()
public void setCX(int cx)
cx
- new cx valuepublic int getCY()
public void setCY(int cy)
cy
- new cy valuepublic PhantomHostField getNext()
public int getRowRelative()
public int getColumnRelative()
public int getWidth()
public int getWidth(int line)
getTotalWidth()
public int getTotalWidth()
public int getTotalWidth(HostScreen screen, boolean isDynamic)
public int getTotalWidth(HostScreen screen, boolean isDynamic, boolean dontWrap)
The "dontWrap" flag is only valid when the flag "isDynamic" is true.
public int getLineCount()
public String getHostString(HostScreen screen)
public String getHostString(HostScreen screen, int line)
public String getHostString(HostScreen screen, boolean doGetHidden)
public String getHostString(HostScreen screen, boolean doGetHidden, boolean isDynamic)
public String getHostString(HostScreen screen, boolean doGetHidden, boolean isDynamic, boolean dontWrap, boolean doCheckMatch)
The "dontWrap" flag is only valid when "isDynamic" is true.
public String getHostString(HostScreen screen, boolean doGetHidden, int line)
public String getHostString(HostScreen screen, boolean doGetHidden, int line, boolean doCheckMatch)
public String getHiddenHostString(HostScreen screen)
public String getHiddenHostString(HostScreen screen, boolean isDynamic)
public String getHiddenHostString(HostScreen screen, boolean isDynamic, boolean dontWrap)
The "dontWrap" flag is only valid when "isDynamic" is true.
public String getHiddenHostString(HostScreen screen, int line)
public int getColor(HostScreen screen)
public int getColor2(HostScreen screen, boolean doCheckMatch)
public int getColor(HostScreen screen, boolean isDynamic)
public int getColor(HostScreen screen, int line)
public int getColor(HostScreen screen, int line, boolean doCheckMatch)
public HostField getHostField(HostScreen screen)
public HostField getHostField(HostScreen screen, boolean isDynamic)
public HostField getHostField(HostScreen screen, int line)
public PhantomHostFieldColumnCell[] getHiddenHostFieldColumn(HostSession hostSession)
public PhantomHostFieldColumnCell[] getHostFieldColumn(HostSession hostSession)
public PhantomHostFieldColumnCell[] getHostFieldColumn(HostSession hostSession, boolean doGetHidden)
public boolean hasHostFieldColumnChanged(PhantomHostFieldColumnCell[] oldCells)
The check is done according to the following rules:
If both the new and the old PhantomHostFieldColumnCells are null, then it is considered unchanged.
If either one of the PhantomHostFieldColumnCells is null, but the other is not, then it has changed.
If the length of the arrays are not equal, then it has changed.
Finally a comparison is done between the individual data items in the new and the old PhantomHostFieldColumnCells.
oldCells
- An array with the old PhantomHostFieldColumnCells to compare to.true
if the contents has changed, false
otherwise.public PhantomHostFieldLocation getCursorPositionInField(int cursorX, int cursorY)
Note: no checking is done if this screen matches the current host screen.
Note: if it's a host pop-up window, the offset for the pop-up window must be subtracted.
public void save(PhantomOutputFile file) throws IOException
file
- IOException
- if an I/O error occurs.public boolean setCursor(HostSession hostSession, int line)
public boolean setCursor(HostSession hostSession, int line, int charpos)
public boolean setCursor(HostSession hostSession)
public boolean setCursor(HostSession hostSession, boolean isDynamic)
public boolean setHostField(HostSession hostSession, String text)
public boolean setHostField(HostSession hostSession, String text, boolean isDynamic)
public boolean setHostField(HostSession hostSession, String text, int line)
The line number indicates the Y offset in the Phantom Host Field.
public boolean doesScreenMatch(HostSession hostSession)
public boolean doesScreenMatch(HostScreen screen)
public boolean isScreenNonCurrentPopup()
Typically his would be used when e,g, REXX used HostGetFld('MAINSCREEN','SOMEFLD') and without this method it wouldn't work.
public int compareTo(PhantomHostField hf)
compareTo
in interface Comparable<PhantomHostField>
public boolean equals(Object o)
public String getTypeDescription()
public ENPObject getNPObject()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.