public class PhantomHostScreen extends Object implements Comparable<PhantomHostScreen>
Modifier and Type | Field and Description |
---|---|
int |
height
The height of the screen (if pop-up window, smaller that "real" screen).
|
boolean |
isPopup
If this flag is set, the screen is floating, i.e.
|
String |
name
The name of the screen.
|
int |
width
The width of the screen (if pop-up window, smaller that "real" screen).
|
Constructor and Description |
---|
PhantomHostScreen(int width,
int height,
boolean isPopup)
Creates a new host screen for Gui-on-the-fly without host fields.
|
PhantomHostScreen(String name,
int width,
int height,
boolean isPopup)
Creates a new host screen for the editor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(PhantomHostScreenIdentification newIdentification)
Add a new screen identification.
|
void |
addHostField(PhantomHostField field)
Adds a new host field for Gui-on-the-fly.
|
int |
compareTo(PhantomHostScreen hs)
Comparator method to sort screens into screen groups.
|
boolean |
constrainPopup(HostPopupWindow.Rect rect,
HostScreen hostScreen,
VirtualSessionManager vsm)
Constrain the the host screen definition according to the rectangle.
|
PhantomHostScreen |
createCopy()
Create a copy of this object.
|
boolean |
equals(Object o)
Checks if two screens are equal in terms of all screen identifications and fields,
i.e.
|
boolean |
equalsGuiOnTheFly(PhantomHostScreen s)
Checks if two screens are equal to one another using the Gui-on-the-fly value
calculated when it was created.
|
boolean |
equalsIdentification(PhantomHostScreen hs)
Checks if another screen equals in the screen identification.
|
int |
findMatchingPopup(HostScreen screen)
Finds the rectangle of the pop-up that matches the host screen.
|
int |
findPopup(HostScreen screen)
Finds the rectangle of the pop-up on the screen.
|
String |
getFastSearchMatchString()
Gets the fast search string.
|
int |
getHeight()
Gets the height of this screen.
|
PhantomHostField |
getHostField(String fieldName)
Gets a host field by name.
|
PhantomHostFieldLocation |
getHostFieldFromPosition(int x,
int y)
Gets the current host field from a cursor position.
|
PhantomHostField[] |
getHostFields()
Gets the host fields of the host screen.
|
Hashtable<String,PhantomHostField> |
getHostFieldsByName()
Gets a hash table of host fields sorted by key = name.
|
PhantomHostScreenIdentification[] |
getIdentifications()
Gets the identifications of the screen.
|
int |
getIndex()
Gets the index of this screen in the screen array.
|
String |
getName()
Get the name of the host screen.
|
ENPObject |
getNPObject()
Gets a new NPObject for this screen.
|
Vector<PhantomHostScreenIdentification> |
getUnmatchingIdentifications(HostScreen hs,
int xOffset,
int yOffset)
Gets the identifications of the screen that do not match the indicated host screen.
|
int |
getWidth()
Gets the width of this screen.
|
boolean |
hasConstrainPopup()
Check if this host screen definition has any pop-up constraints.
|
boolean |
isPopup()
Checks if this screen is of pop-up window type.
|
boolean |
isScreenMatching(HostScreen screen,
int xOffset,
int yOffset)
Checks if this screen matches the current host screen.
|
boolean |
isScreenMatchingLax(HostScreen screen,
int xOffset,
int yOffset)
Checks if this screen matches the current host screen.
|
boolean |
remove(PhantomHostField hf)
Removes a field definition.
|
boolean |
remove(String name)
Removes a field definition.
|
void |
removeFieldDefinitions()
Removes the field definitions of the screen.
|
void |
removeIdentification(PhantomHostScreenIdentification id)
Removes the identifications of the screen.
|
void |
removeIdentifications()
Removes the identifications of the screen.
|
void |
saveHostFields(PhantomOutputFile file)
Saves the host fields.
|
void |
unconstrainPopup()
Remove all pop-up constraints.
|
public String name
public boolean isPopup
public int height
public int width
public PhantomHostScreen(int width, int height, boolean isPopup)
addHostField
in order to create requested
fields.public PhantomHostScreen(String name, int width, int height, boolean isPopup)
public void addHostField(PhantomHostField field)
public boolean add(PhantomHostScreenIdentification newIdentification)
newIdentification
- A new PhantomHostScreenIdentification.public PhantomHostScreen createCopy()
public boolean equals(Object o)
public boolean equalsGuiOnTheFly(PhantomHostScreen s)
public void saveHostFields(PhantomOutputFile file) throws IOException
file
- IOException
- if an I/O error occurs.public PhantomHostField[] getHostFields()
public String getName()
public boolean isPopup()
public int getWidth()
public int getHeight()
public int getIndex()
public PhantomHostField getHostField(String fieldName)
public Hashtable<String,PhantomHostField> getHostFieldsByName()
public String getFastSearchMatchString()
public boolean isScreenMatching(HostScreen screen, int xOffset, int yOffset)
screen
- The HostScreen.xOffset
- Horizontal offset.yOffset
- Vertical offset-public boolean isScreenMatchingLax(HostScreen screen, int xOffset, int yOffset)
screen
- The HostScreen.xOffset
- Horizontal offset.yOffset
- Vertical offset-public int findMatchingPopup(HostScreen screen)
screen
- The host screen.public int findPopup(HostScreen screen)
screen
- The host screen.public boolean constrainPopup(HostPopupWindow.Rect rect, HostScreen hostScreen, VirtualSessionManager vsm)
rect
- The constraining pop-up rectangle.hostScreen
- The host screen.vsm
- The VirtualSessionManager.public void unconstrainPopup()
public boolean hasConstrainPopup()
public void removeIdentifications()
public void removeIdentification(PhantomHostScreenIdentification id)
id
- The PhantomHostScreenIdentification to remove.public void removeFieldDefinitions()
public boolean remove(PhantomHostField hf)
public boolean remove(String name)
public PhantomHostScreenIdentification[] getIdentifications()
public Vector<PhantomHostScreenIdentification> getUnmatchingIdentifications(HostScreen hs, int xOffset, int yOffset)
hs
- The HostScreen.xOffset
- Horizontal offset.yOffset
- Vertical offset.public PhantomHostFieldLocation getHostFieldFromPosition(int x, int y)
x
- The X position on scren.y
- The Y position on scren.public ENPObject getNPObject()
public int compareTo(PhantomHostScreen hs)
compareTo
in interface Comparable<PhantomHostScreen>
public boolean equalsIdentification(PhantomHostScreen hs)
hs
- Another host screen to compare with.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.