public class PhantomHostData extends Object implements Cloneable, INPObjects, IENPObjectOwner
| Modifier and Type | Class and Description |
|---|---|
static class | PhantomHostData.ScreenGroupThis class is used by the PhantomHostData class to maintain screen groups when screen are using the binary match method. |
| Modifier and Type | Field and Description |
|---|---|
boolean | areScreensAnalyzedFlag indicating if the screens are analyzed so that "binary" search algorithm can be used. |
static String | BROKEN_MACRO_SCREEN_NAMEThe name of the dummy screen used "__BROKEN_MACRO__". |
static PhantomHostScreen | dummyScreenA dummy host screen when a Phantom Macro is broken. |
Hashtable<String,PhantomHostScreen> | fastSearchThe hash table for the screen groups instead of the binary search algorithm. |
String | fileCommentsThe file comments. |
int | macroCountCount of Phantom macros. |
Hashtable<String,PhantomMacro> | macrosThe table of macros. |
static int | MATCHFLAG_POPWINMatch flag: Use pop-up window recognition. |
static int | MATCHFLAG_STOPWHENFOUNDMatch flag: Stop at first match. |
int | matchFlagsFlags used for matching screens. |
PhantomRuntime | runtimeThe runtime file associated with the host data, null for none. |
int | screenCountCount of host screens. |
PhantomHostData.ScreenGroup[] | screenGroupsThe screen group array. |
Vector<PhantomHostScreen> | screensThe host screen array. |
Hashtable<String,PhantomHostScreen> | screensByNameTable to find a screen by the name. |
boolean | useBinaryMatchMethodFlag for searching the screens using binary search algorithm. |
| Constructor and Description |
|---|
PhantomHostData()Creates an empty host data instance. |
PhantomHostData(PhantomFile file)Constructor - loads the indicated file. |
PhantomHostData(PhantomFile file, PhantomRuntime runtime)Constructor - loads the indicated file (if non-null), an associated runtime (that may be null). |
| Modifier and Type | Method and Description |
|---|---|
boolean | add(PhantomHostScreen newScreen)Add a new screen. |
PhantomHostScreen | addBrokenMacroScreen()Adds the broken dummy screen to the application once only. |
PhantomHostData | clone(PhantomRuntime rt)Creates a clone of the host data for client parallel run in the Editor. |
void | createScreenGroups()Creates screen groups. |
PhantomHostScreen[] | getAllMatchingScreens(HostScreen screen)Find all the screens that match. |
ENPRootObject | getCachedNPObject()Gets the cached NPObject root. |
String | getFileName()Gets file name. |
PhantomMacro | getMacro(String name)Gets a macro by the name. |
Hashtable<String,PhantomMacro> | getMacros()Gets macros for this host data |
PhantomHostScreen | getMatchingScreen(HostScreen screen)Checks which screens match. |
int[] | getMatchingScreens(HostScreen screen)Gets the matching screens for this runtime file host data with the current settings. |
ENPRootObject | getNPObject()Gets the NPObjects for the host data. |
String | getNPObjectName()Gets the NP Object file name in the project application directory. |
PhantomHostScreen | getScreen(int index)Gets a host screen from index. |
PhantomHostScreen | getScreen(String name)Gets a host screen by the name. |
boolean | getScreenIdentificationInfo(StringBuilder sb)Gets a displayable formatted string (that can contain several lines separated by LF characters) that is used when compiling a distribution or when saving a file. |
PhantomHostScreen[] | getScreens()Gets screens for this host data. |
boolean | needsReload()Check if this file needs to be reloaded. |
void | onENPObjectInvalidated()Invalidates the chain of objects up to the owner in order to get it sent to Eclipse. |
int | reload()Reload internal state from external sources. |
boolean | remove(String screenName)Delete a screen. |
void | removeAllMacros()Removes all macros. |
boolean | rename(String oldName, String newName)Renames a host screen, the reference of the PhantomHostScreen gets the name changed and the hash table containing String names to PhantomHostScreen is updated. |
void | save(PhantomOutputFile file)Save the host data to file. |
void | save(String fileName)Save the host data to file. |
public static final int MATCHFLAG_STOPWHENFOUND
public static final int MATCHFLAG_POPWIN
public int screenCount
public boolean areScreensAnalyzed
public int matchFlags
public boolean useBinaryMatchMethod
public PhantomHostData.ScreenGroup[] screenGroups
public Hashtable<String,PhantomHostScreen> fastSearch
public Vector<PhantomHostScreen> screens
public Hashtable<String,PhantomHostScreen> screensByName
public int macroCount
public Hashtable<String,PhantomMacro> macros
public static final String BROKEN_MACRO_SCREEN_NAME
public static final PhantomHostScreen dummyScreen
public PhantomRuntime runtime
public String fileComments
public PhantomHostData()
public PhantomHostData(PhantomFile file) throws IOException
IOExceptionpublic PhantomHostData(PhantomFile file, PhantomRuntime runtime) throws IOException
IOExceptionpublic PhantomHostData clone(PhantomRuntime rt)
public PhantomHostScreen addBrokenMacroScreen()
public boolean add(PhantomHostScreen newScreen)
newScreen - The new PhantomHostScreen.public boolean remove(String screenName)
screenName - Screen name to delete.public boolean rename(String oldName, String newName)
public Hashtable<String,PhantomMacro> getMacros()
public PhantomHostScreen[] getScreens()
public PhantomHostScreen getScreen(String name)
public String getFileName()
public PhantomHostScreen getScreen(int index)
public PhantomMacro getMacro(String name)
public int[] getMatchingScreens(HostScreen screen)
A maximum of 256 screens is quite OK, if more, there is a big error in the application.
public PhantomHostScreen[] getAllMatchingScreens(HostScreen screen)
public PhantomHostScreen getMatchingScreen(HostScreen screen)
public void save(String fileName) throws IOException
IOExceptionpublic void save(PhantomOutputFile file) throws IOException
IOExceptionpublic boolean needsReload()
public int reload()
throws IOExceptionIOExceptionpublic void removeAllMacros()
public String getNPObjectName()
getNPObjectName in interface INPObjectspublic void onENPObjectInvalidated()
onENPObjectInvalidated in interface IENPObjectOwnerpublic ENPRootObject getCachedNPObject()
getCachedNPObject in interface INPObjectspublic ENPRootObject getNPObject()
getNPObject in interface INPObjectspublic void createScreenGroups()
public boolean getScreenIdentificationInfo(StringBuilder sb)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© 2026 Mindus SARL. All rights reserved.