public class PhantomApplicationData extends Object implements IReloadable
| Modifier and Type | Class and Description |
|---|---|
static class |
PhantomApplicationData.Directory
This class contains the connection between screens and panels.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
APPFLAG_ESCNOTF12
Escape not mapped to F12.
|
static int |
APPFLAG_FIELDIDHELP
Host ID, no control ID (help).
|
static int |
APPFLAG_INDSIZE
Individual main panel size.
|
static int |
APPFLAG_INHIBITTRANSFORM
Inhibit transform (font substitution and ratioX/ratioY).
|
static int |
APPFLAG_MAXIMIZE
Maximize main panels.
|
static int |
APPFLAG_MERGEPOPMENU
Merge all pop-up menus.
|
static int |
APPFLAG_MSGDISALL
Both flags for disable system message boxes.
|
static int |
APPFLAG_MSGDISBASE
Disable msg box base.
|
static int |
APPFLAG_MSGDISMAIN
Disable msg box for main.
|
static int |
APPFLAG_MSGDISPOPUP
Disable msg box for popup.
|
static int |
APPFLAG_NEWGROUP
New drawing of group boxes and frames.
|
static int |
APPFLAG_NOMNEMONIC
No mnemonics Check/Radio.
|
static int |
APPFLAG_OUTPUTTEXTFOCUS
Enable focus to all output fields.
|
static int |
APPFLAG_PASSFKEYS
Pass through function keys to the host.
|
static int |
APPFLAG_PHH
Use help ID file.
|
static int |
APPFLAG_PROCESSLOCK
Process panels at lock.
|
static int |
APPFLAG_SYSMENU
Menu in system menu.
|
PhantomObject |
appObject
The application object reference.
|
static byte[] |
defaultColorConvBack |
static byte[] |
defaultColorConvFore |
LoadProgress |
loadListener
The application object reference.
|
Hashtable<String,PhantomObject> |
objects
The table of Phantom Objects.
|
String |
phaFileName
The file name of the PHA file when not inside a runtime file, should otherwise
not be used.
|
String |
textFile
The application text file or null if none.
|
String |
xlateFile
The application translation file or null if none.
|
FAILURE, NOTHING_DONE, SUCCESS| Constructor and Description |
|---|
PhantomApplicationData()
Creates a default empty by initiated instance of the application data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBarFile(String id,
PhantomCBar bar)
Adds a new bar file object.
|
boolean |
addHiddenPanel(PhantomApplicationData.Directory dir,
String descr,
boolean doReplace)
Adds a directory entry (hidden panel).
|
boolean |
addObject(PhantomObject po,
boolean doReplace)
Adds an object.
|
boolean |
addPanel(PhantomPanelData panel,
PhantomApplicationData.Directory dir,
boolean doReplace)
Adds a panel to the application.
|
void |
addPopupMenuControlID(String id,
PhantomPopupMenu popupMenu)
Adds a control ID reference to a pop-up menu (if the control ID is not
already in the table.
|
boolean |
areHostChangesProcessedDuringLock()
Checks if host changes are processed during session lock.
|
boolean |
areOutputFieldsFocusable()
Checks if the output fields are focusable.
|
boolean |
arePanelsMaximized()
Checks if main panels are maximized when created.
|
boolean |
arePFKeysPassedToHost()
Checks if the functions keys are passed to host.
|
void |
assignHelpIDTable(Hashtable<String,String> table)
Assigns a Help ID table to the application.
|
void |
clean()
Clean the application.
|
void |
copyApplicationData(PhantomApplicationData source)
Copy application data.
|
PhantomPanelData |
copyApplicationPanel(PhantomApplicationData source)
Copy application panel and settings.
|
void |
copyColorConversion(PhantomApplicationData source)
Copy color conversion tables.
|
void |
createDefaultColorConversionTables()
Creates the default color conversion tables.
|
boolean |
doApplicationChildrenInset()
Checks if the panels of a panel session are children of the application
panel.
|
boolean |
doCreateProperties()
Do create properties (NOTYET TW TEST).
|
boolean |
doMapEscapeToF12()
Checks if the application maps Escape key to F12 or not.
|
boolean |
doUseHelpIDTable()
Checks if the application uses a help ID file or not.
|
Hashtable<String,PhantomObject> |
getAllObjects()
Gets all the objects in the application.
|
Enumeration<PhantomPanelData> |
getAllPanels()
Gets all panels in the application.
|
PhantomPanelData |
getApplicationPanel()
Gets the loaded application panel.
|
PhantomCBar |
getBarFile(PhantomControl control,
String id)
Gets a bar file object.
|
PhantomCBar |
getBarFile(PhantomControl control,
String id,
boolean loadIfRequired)
Gets a bar file object.
|
Hashtable<String,PhantomCBar> |
getBarObjects()
Gets all the barObjects in the application.
|
String |
getCloseID()
Checks if the application uses a close ID for pop-up panels.
|
void |
getColorConversionTables(byte[] fore,
byte[] back)
Returns the foreground and background color conversion tables into the arrays specified.
|
se.entra.phantom.geditor.NPPColorItemManager |
getColorItemManager()
Shortcut to get color item manager from property worker.
|
Hashtable<String,Vector<String>> |
getConnectionsForPopupMenu()
Gets hash table of connections for pop-up menus (key name of pop-up menu)
(value vector of connections(String))
|
se.entra.phantom.geditor.NPPColor |
getControlBackgroundColor(VirtualControl vCtl,
boolean isDisable,
boolean doDisableBackground,
se.entra.phantom.geditor.NPPColor originalBackground)
Set the control background color.
|
int[] |
getControlColor(int vioClr,
boolean isFore,
boolean isBack)
Gets the control colors from host VIO color and color conversion.
|
int[] |
getControlColor(VirtualControl vCtl,
int vioClr,
boolean isFore,
boolean isBack)
Gets the control colors from host VIO color and color conversion.
|
PhantomApplicationData.Directory[] |
getDirectories()
Gets the application directory array of panels and screens.
|
String |
getHiddenPanelDescription(PhantomApplicationData.Directory dir)
Gets the description for a hidden panel.
|
String |
getIconFile()
Gets a iconFile
|
int |
getIconID()
Gets a iconID
|
PhantomObject |
getObject(String name)
Gets an object from its name.
|
Enumeration<PhantomObject> |
getObjects()
Gets all the objects in the application.
|
PhantomPanelData |
getPanel(String name)
Gets a loaded panel in the application.
|
PhantomApplicationData.Directory |
getPanelFromScreen(String name)
Gets a panel or hidden panel from a screen.
|
Hashtable<String,PhantomPanelData> |
getPanels()
Gets all panels in the application - returns a hash table
|
Hashtable<String,PhantomApplicationData.Directory> |
getPanelToScreens()
Gets panelToScreen hash table in the application.
|
PhantomObject |
getPhantomMacro(String macroName)
Finds an object that used to be a Phantom Macro, now converted to a REXX macro that
is executed in the appropriate thread with locking of the host session from interaction
with the panels.
|
PhantomPopupMenu |
getPopupMenuForControlID(String id)
Gets a pop-up menu reference from a control ID.
|
Hashtable<String,PhantomPopupMenu> |
getPopupMenuIDs()
Gets all the popupMenuIDs in the application.
|
se.entra.phantom.geditor.PropertyWorker |
getPropertyWorker()
Get property worker reference.
|
void |
getReferencedFiles(ArrayList<String> files)
Get all the files that are referenced by this panel.
|
PhantomRuntime |
getRuntime()
Get the runtime data.
|
PhantomApplicationData.Directory |
getScreenFromPanel(String name)
Gets the screen that corresponds to a panel.
|
int |
getStdHeight()
Gets the application default panel height in dialog coordinates (multiplied
by 10).
|
int |
getStdWidth()
Gets the application default panel width in dialog coordinates (multiplied
by 10).
|
String |
getTextFile()
Gets the text file in the application - returns a String
|
String |
getTitle()
Gets the title of the application.
|
String |
getTranslationFile()
Gets the translation file in the application - returns a String
|
int |
getWaitStableDelay()
Gets the wait-stable delay for host screens.
|
boolean |
hasApplicationPanel()
Application has application panel?
|
boolean |
hasCloseID()
Checks if the application uses a close ID for pop-up panels.
|
boolean |
hasIndividualSize()
Checks if the panel has individual size.
|
boolean |
hasMenuInSystemMenu()
Checks if panels display the menu bar or if they use the pop-up menu (as in
the system menu).
|
boolean |
inhibitTransform()
Checks if the application should inhibit resize (font substitution
and ratioX/ratioY).
|
boolean |
interruptLoading()
Interrupt loading?
|
boolean |
isApplicationMaximized()
Checks if the application is maximized.
|
boolean |
isSystemMessageBoxEnabled(boolean isPopup)
Checks if system message boxes are enabled.
|
void |
load(PhantomRuntime runtime,
PhantomFile file,
boolean doLoadObjects)
Loads the host definitions from the application file.
|
void |
load(PhantomRuntime runtime,
PhantomFile file,
boolean doLoadObjects,
boolean doLoadOtherExternalFiles)
Loads the host definitions from the application file.
|
void |
load(PhantomRuntime runtime,
PhantomFile file,
boolean doLoadObjects,
boolean doLoadOtherExternalFiles,
boolean doConvertProgramText)
Loads the host definitions from the application file.
|
void |
loadObjectClasses()
Loads the class files for REXX/DLL objects.
|
PhantomPanelData |
loadPanel(PhantomHostData hostData,
String name)
Loads the panel data (loads it if required).
|
void |
maybeThrowIOException(String msg)
Throws an IOException with the message specified if the runtime file is loaded
normally and doesn't have the flag doIgnoreNonFatalErrors set.
|
boolean |
needsReload()
Check if this file needs to be reloaded.
|
void |
processTooltipText(Hashtable<String,String> t)
Sets the tool-tip texts for all ID's in the hash table for control ID's and
menu ID's.
|
int |
reload(boolean force)
Reload internal state from external sources.
|
void |
save(PhantomOutputFile file)
Saves the file to the output file.
|
void |
save(String fileName)
Saves the host definitions to the application file.
|
void |
setColorConversionTables(byte[] fore,
byte[] back)
Replaces a color conversion tables.
|
void |
setControlColor(VirtualControl vCtl,
int vioClr,
boolean isFore,
boolean isBack)
Set the control color from host VIO color and color conversion.
|
void |
setControlColor(VirtualControl vCtl,
int vioClr,
boolean isFore,
boolean isBack,
boolean doForegroundColor,
boolean doKeepBackgroundAtNoConversion)
Set the control color from host VIO color and color conversion.
|
void |
setLoadedPanels(Hashtable<String,PhantomPanelData> panels)
Set loaded panels.
|
void |
setLoadListener(LoadProgress listener)
Explicitly set the load listener.
|
boolean |
useHelpIDFromHost()
Checks if the application uses a the help ID from host field name whenever
a control doesn't have any ID.
|
public static final int APPFLAG_MAXIMIZE
public static final int APPFLAG_SYSMENU
public static final int APPFLAG_NEWGROUP
public static final int APPFLAG_INDSIZE
public static final int APPFLAG_PASSFKEYS
public static final int APPFLAG_MSGDISBASE
public static final int APPFLAG_MSGDISMAIN
public static final int APPFLAG_MSGDISPOPUP
public static final int APPFLAG_MSGDISALL
public static final int APPFLAG_PROCESSLOCK
public static final int APPFLAG_PHH
public static final int APPFLAG_FIELDIDHELP
public static final int APPFLAG_ESCNOTF12
public static final int APPFLAG_NOMNEMONIC
public static final int APPFLAG_MERGEPOPMENU
public static final int APPFLAG_INHIBITTRANSFORM
public static final int APPFLAG_OUTPUTTEXTFOCUS
public static final byte[] defaultColorConvFore
public static final byte[] defaultColorConvBack
public Hashtable<String,PhantomObject> objects
public String textFile
public String xlateFile
public String phaFileName
public PhantomObject appObject
public LoadProgress loadListener
public PhantomApplicationData()
public boolean interruptLoading()
public void load(PhantomRuntime runtime, PhantomFile file, boolean doLoadObjects) throws IOException
Read:
+ Application title BYTE [97]
+ Last message file used for application BYTE [9]
+ Last translation file used for application BYTE [9]
+ Size of panels in X USHORT
+ Size of panels in Y USHORT
+ Count of panels USHORT
+ Count of objects USHORT
+ Application panel ID BYTE [9]
+ Application panel description BYTE [65]
+ Application icon DLL BYTE [9]
+ Application icon ID USHORT
+ Application object BYTE [9]
+ Application scroll bar flag BYTE
+ Application maximize flag BYTE
+ Application insets children flag BYTE
+ Color conversion table BYTE [256+32 + 256+32]
+ Skip flag for DLL modules names BYTE
+ Close ID for pop-up panels BYTE [9]
+ Wait stable time USHORT
+ Application flags USHORT
+ Skip extra space in X1,X2,Y1,Y2 BYTE [4]
+ Skip base text ID BYTE [4]
+ Reserved area BYTE [43]
+ Panel type and flags array USHORT [panelCount]
+ Skip (file image size) ULONG
+ Skip (segmentCount) USHORT
+ Skip (segment sizes) USHORT [segmentCount]
+ Screen names ZTSTRING
+ Panel names ZTSTRING
+ All objects (handled by PhantomObject class).
IOException - if an I/O error occurs.PhantomObjectpublic void load(PhantomRuntime runtime, PhantomFile file, boolean doLoadObjects, boolean doLoadOtherExternalFiles) throws IOException
IOExceptionpublic void load(PhantomRuntime runtime, PhantomFile file, boolean doLoadObjects, boolean doLoadOtherExternalFiles, boolean doConvertProgramText) throws IOException
IOExceptionpublic void clean()
public void save(String fileName) throws IOException
Save:
+ Application title BYTE [97]
+ Last message file used for application BYTE [9]
+ Last translation file used for application BYTE [9]
+ Size of panels in X USHORT
+ Size of panels in Y USHORT
+ Count of panels USHORT
+ Count of objects USHORT
+ Application panel ID BYTE [9]
+ Application panel description BYTE [65]
+ Application icon DLL BYTE [9]
+ Application icon ID USHORT
+ Application object BYTE [9]
+ Application scroll bar flag BYTE
+ Application maximize flag BYTE
+ Application insets children flag BYTE
+ Color conversion table BYTE [256+32 + 256+32]
+ Skip flag for DLL modules names BYTE
+ Close ID for pop-up panels BYTE [9]
+ Wait stable time USHORT
+ Application flags USHORT
+ Skip extra space in X1,X2,Y1,Y2 BYTE [4]
+ Skip base text ID BYTE [4]
+ Reserved area BYTE [43]
+ Panel type and flags array USHORT [panelCount]
+ Skip (file image size) ULONG
+ Skip (segmentCount) USHORT
+ Skip (segment sizes) USHORT [segmentCount]
+ Screen names ZTSTRING
+ Panel names ZTSTRING
+ All objects (handled by PhantomObject class).
fileName - IOException - if an I/O error occurs.PhantomObjectpublic void save(PhantomOutputFile file) throws IOException
IOException - if an I/O error occurs.public PhantomObject getObject(String name)
public void loadObjectClasses()
throws IOException
IOException - if an I/O error occurs.public Enumeration<PhantomObject> getObjects()
public Hashtable<String,PhantomPopupMenu> getPopupMenuIDs()
public Hashtable<String,PhantomCBar> getBarObjects()
public Hashtable<String,PhantomObject> getAllObjects()
public Hashtable<String,PhantomApplicationData.Directory> getPanelToScreens()
public void addPopupMenuControlID(String id, PhantomPopupMenu popupMenu)
public PhantomPopupMenu getPopupMenuForControlID(String id)
public PhantomApplicationData.Directory getPanelFromScreen(String name)
public PhantomApplicationData.Directory getScreenFromPanel(String name)
public String getHiddenPanelDescription(PhantomApplicationData.Directory dir)
public boolean addHiddenPanel(PhantomApplicationData.Directory dir, String descr, boolean doReplace)
public boolean addObject(PhantomObject po, boolean doReplace)
public boolean addPanel(PhantomPanelData panel, PhantomApplicationData.Directory dir, boolean doReplace)
public PhantomPanelData loadPanel(PhantomHostData hostData, String name) throws IOException
IOExceptionpublic void maybeThrowIOException(String msg) throws IOException
IOExceptionpublic PhantomPanelData getPanel(String name)
public String getIconFile()
public Hashtable<String,Vector<String>> getConnectionsForPopupMenu()
public int getIconID()
public Enumeration<PhantomPanelData> getAllPanels()
public int getStdWidth()
public int getStdHeight()
public PhantomApplicationData.Directory[] getDirectories()
public Hashtable<String,PhantomPanelData> getPanels()
public String getTranslationFile()
public String getTextFile()
public PhantomPanelData getApplicationPanel()
public void addBarFile(String id, PhantomCBar bar)
public PhantomCBar getBarFile(PhantomControl control, String id)
public PhantomCBar getBarFile(PhantomControl control, String id, boolean loadIfRequired) throws IOException
IOException - If bar file cannot be loaded.public boolean areHostChangesProcessedDuringLock()
public String getTitle()
public boolean arePanelsMaximized()
public boolean hasMenuInSystemMenu()
public boolean isApplicationMaximized()
public boolean doApplicationChildrenInset()
public boolean arePFKeysPassedToHost()
public boolean hasCloseID()
public String getCloseID()
public boolean hasIndividualSize()
public boolean doUseHelpIDTable()
public void assignHelpIDTable(Hashtable<String,String> table)
public boolean doMapEscapeToF12()
public boolean inhibitTransform()
public boolean useHelpIDFromHost()
public int getWaitStableDelay()
public void copyApplicationData(PhantomApplicationData source)
PhantomApplicationData - - source datapublic PhantomPanelData copyApplicationPanel(PhantomApplicationData source)
PhantomApplicationData - - source datapublic void copyColorConversion(PhantomApplicationData source)
PhantomApplicationData - - source datapublic boolean hasApplicationPanel()
public void processTooltipText(Hashtable<String,String> t)
public void setControlColor(VirtualControl vCtl, int vioClr, boolean isFore, boolean isBack)
public void setControlColor(VirtualControl vCtl, int vioClr, boolean isFore, boolean isBack, boolean doForegroundColor, boolean doKeepBackgroundAtNoConversion)
public int[] getControlColor(VirtualControl vCtl, int vioClr, boolean isFore, boolean isBack)
public int[] getControlColor(int vioClr,
boolean isFore,
boolean isBack)
public void setLoadListener(LoadProgress listener)
listener - - LoadProgresspublic void setLoadedPanels(Hashtable<String,PhantomPanelData> panels)
Hashtable - PhantomPanelData> public se.entra.phantom.geditor.NPPColor getControlBackgroundColor(VirtualControl vCtl, boolean isDisable, boolean doDisableBackground, se.entra.phantom.geditor.NPPColor originalBackground)
public void getReferencedFiles(ArrayList<String> files)
public PhantomRuntime getRuntime()
public boolean isSystemMessageBoxEnabled(boolean isPopup)
public boolean doCreateProperties()
public se.entra.phantom.geditor.PropertyWorker getPropertyWorker()
public se.entra.phantom.geditor.NPPColorItemManager getColorItemManager()
public boolean needsReload()
throws IOException
needsReload in interface IReloadableIOExceptionpublic int reload(boolean force)
throws IOException
reload in interface IReloadableforce - force the reload.IOExceptionpublic void createDefaultColorConversionTables()
public void setColorConversionTables(byte[] fore,
byte[] back)
public void getColorConversionTables(byte[] fore,
byte[] back)
public PhantomObject getPhantomMacro(String macroName)
public boolean areOutputFieldsFocusable()
Phantom® and NetPhantom® are registered trademarks of Nexum Technologies SARL.
© Copyright Nexum Technologies SARL, 2011. All rights reserved.