public class PhantomHostScreenIdentification extends Object implements Comparable<PhantomHostScreenIdentification>
Modifier and Type | Field and Description |
---|---|
int |
cx
Width of the identifier.
|
int |
cy
Height of the identifier.
|
static int |
ID_ALPHA
Identification type: Alphanumeric
|
static int |
ID_ALPHANOSPACE
Identification type: Alphanumeric without space
|
static int |
ID_EXACT
Identification type: Exact rectangle contents
|
static int |
ID_FIELDLEN
Identification type: Field: same position and length
|
static int |
ID_NOSPACE
Identification type: No space
|
static int |
ID_NOTEXACT
Identification type: Not rectangle contents
|
static int |
ID_NOTPOPUPWIN
Identification type: Not pop-up window
|
static int |
ID_NUM
Identification type: Numeric (0-9)
|
static int |
ID_SPACE
Identification type: Only space
|
static int |
ID_VALUE
Identification type: Numeric (0-9, +-,.:)
|
int |
type
Host field type.
|
static String[] |
TYPES
The types.
|
int |
x
Position of the screen identifier in X.
|
int |
y
Position of the identifier in Y.
|
Constructor and Description |
---|
PhantomHostScreenIdentification(int type,
int x,
int y,
int cx,
int cy)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PhantomHostScreenIdentification hsi)
Compares two screen identifications by type then rectangle positions and then size.
|
PhantomHostScreenIdentification |
createCopy()
Creates a copy of this identification.
|
boolean |
equals(Object obj)
Checks if one identification is equal to another.
|
String |
getMatchString()
Gets the matching string for this identification.
|
ENPObject |
getNPObject()
Gets a new NPObject for this screen identification.
|
String |
getTypeDescription()
Gets the type string for an identification type.
|
static String |
getTypeDescription(int type)
Gets the type string for an identification type.
|
boolean |
isIdentificationMatching(HostScreen screen,
int xOffset,
int yOffset)
Checks if this identification matches the host screen.
|
boolean |
isIdentificationMatchingLax(HostScreen screen,
int xOffset,
int yOffset)
Checks if this identification matches the host screen.
|
static boolean |
isIdentificationMatchingLax(String str,
int type,
String matchString)
Checks if this identification matches the host screen.
|
void |
save(PhantomOutputFile file)
Saves the host screen identification to file.
|
void |
setMatchString(String data)
Sets the matching string for this identification.
|
boolean |
updateFromScreen(HostScreen hs,
int offsetX,
int offsetY)
Update the match data from the indicated screen.
|
public static final int ID_EXACT
public static final int ID_ALPHA
public static final int ID_ALPHANOSPACE
public static final int ID_NUM
public static final int ID_VALUE
public static final int ID_NOSPACE
public static final int ID_SPACE
public static final int ID_FIELDLEN
public static final int ID_NOTEXACT
public static final int ID_NOTPOPUPWIN
public static final String[] TYPES
public int x
public int y
public int cx
For ID_FIELDLEN, cx contains the required field length.
For ID_NOTPOPUPWIN, cx contains the width of the pop-up window that cannot match.
ID_FIELDLEN
,
ID_NOTPOPUPWIN
public int cy
For ID_NOTPOPUPWIN, cy contains the height of the pop-up window that cannot match.
ID_NOTPOPUPWIN
public int type
ID_EXACT
,
ID_ALPHA
,
ID_ALPHANOSPACE
,
ID_NUM
,
ID_VALUE
,
ID_NOSPACE
,
ID_SPACE
,
ID_FIELDLEN
,
ID_NOTEXACT
,
ID_NOTPOPUPWIN
public PhantomHostScreenIdentification(int type, int x, int y, int cx, int cy)
type
- x
- y
- cx
- cy
- public static String getTypeDescription(int type)
public PhantomHostScreenIdentification createCopy()
public String getMatchString()
public void setMatchString(String data)
data
- The matching string.public boolean isIdentificationMatching(HostScreen screen, int xOffset, int yOffset)
public boolean isIdentificationMatchingLax(HostScreen screen, int xOffset, int yOffset)
public static boolean isIdentificationMatchingLax(String str, int type, String matchString)
public void save(PhantomOutputFile file) throws IOException
file
- IOException
- if an I/O error occurs.public boolean equals(Object obj)
public boolean updateFromScreen(HostScreen hs, int offsetX, int offsetY)
hs
- The HostScreen.offsetX
- Horizontal offset.offsetY
- Vertical offset.public String getTypeDescription()
public ENPObject getNPObject()
public int compareTo(PhantomHostScreenIdentification hsi)
compareTo
in interface Comparable<PhantomHostScreenIdentification>
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.