public class PhantomHostData extends Object implements Cloneable, INPObjects, IENPObjectOwner
Modifier and Type | Class and Description |
---|---|
static class |
PhantomHostData.ScreenGroup
This 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 |
areScreensAnalyzed
Flag indicating if the screens are analyzed so that "binary"
search algorithm can be used.
|
static String |
BROKEN_MACRO_SCREEN_NAME
The name of the dummy screen used "__BROKEN_MACRO__".
|
static PhantomHostScreen |
dummyScreen
A dummy host screen when a Phantom Macro is broken.
|
Hashtable<String,PhantomHostScreen> |
fastSearch
The hash table for the screen groups instead of the binary search
algorithm.
|
String |
fileComments
The file comments.
|
int |
macroCount
Count of Phantom macros.
|
Hashtable<String,PhantomMacro> |
macros
The table of macros.
|
static int |
MATCHFLAG_POPWIN
Match flag: Use pop-up window recognition.
|
static int |
MATCHFLAG_STOPWHENFOUND
Match flag: Stop at first match.
|
int |
matchFlags
Flags used for matching screens.
|
PhantomRuntime |
runtime
The runtime file associated with the host data, null for none.
|
int |
screenCount
Count of host screens.
|
PhantomHostData.ScreenGroup[] |
screenGroups
The screen group array.
|
Vector<PhantomHostScreen> |
screens
The host screen array.
|
Hashtable<String,PhantomHostScreen> |
screensByName
Table to find a screen by the name.
|
boolean |
useBinaryMatchMethod
Flag 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
IOException
public PhantomHostData(PhantomFile file, PhantomRuntime runtime) throws IOException
IOException
public 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
IOException
public void save(PhantomOutputFile file) throws IOException
IOException
public boolean needsReload()
public int reload() throws IOException
IOException
public void removeAllMacros()
public String getNPObjectName()
getNPObjectName
in interface INPObjects
public void onENPObjectInvalidated()
onENPObjectInvalidated
in interface IENPObjectOwner
public ENPRootObject getCachedNPObject()
getCachedNPObject
in interface INPObjects
public ENPRootObject getNPObject()
getNPObject
in interface INPObjects
public void createScreenGroups()
public boolean getScreenIdentificationInfo(StringBuilder sb)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.