public class Start extends Object
| Modifier and Type | Field and Description |
|---|---|
static PhantomApplicationData |
applicationData
The application data.
|
static Object |
buildExitLock
Build exit lock object.
|
static se.entra.phantom.server.phed.BuildManager |
buildManager
The build manager instance.
|
static PhantomEditor |
client
The instance of the client.
|
static ClientSession |
clientSession
The client session on the server side.
|
static int |
ERR_CREATE |
static int |
ERR_FORMAT |
static int |
ERR_NOTFOUND
Error codes.
|
static int |
ERR_OUTOFMEMORY |
static int |
ERR_READ |
static int |
ERR_WRITE |
static PhantomHostData |
hostData
The host data.
|
static int |
hostIndex
The host session index.
|
static JProgressBar |
internalProgress
The editor internal progress bar.
|
static boolean |
isEditor
Flag indicating it's the editor running.
|
static boolean |
isEditorShutDown
The flag indicating the editor is shut-down.
|
static int |
JF_ABOUT |
static int |
JF_ABOUT_PROGRESS_TEXT |
static int |
JF_ARE_KEYS_DOWN |
static int |
JF_CLOSE_PANEL_WINDOW |
static int |
JF_CLOSE_PHA |
static int |
JF_CLOSE_PHA_DIRECT |
static int |
JF_COMPANY |
static int |
JF_CREATE_CONTROLS |
static int |
JF_INITIALIZE |
static int |
JF_ISINITIALIZE |
static int |
JF_LOAD_PHE |
static int |
JF_PRINT_SCREEN |
static int |
JF_PRINT_SCREEN_FIELDS |
static int |
JF_PRINT_SCREENS |
static int |
JF_REMOVE_SPLASH |
static int |
JF_SET_BUILD_OPERATION |
static int |
JF_SET_CURRENT_SCREEN |
static int |
JF_SET_LAST_TESTED_PANEL |
static int |
JF_SET_PROJECT_NAME |
static int |
JF_START_DIR_MONITOR |
static int |
JF_STOP_DIR_MONITOR |
static int |
JF_UNINITIALIZE |
static int |
JF_UPDATE_MENU_STATE |
static int |
JF_VERSION
The JNI functions.
|
static int |
JF_WAIT_DIR_MONITOR_CHANGE |
static se.entra.phantom.server.phed.LoadProgressListener |
launchListener
The progress listener used when launching a client in parallel with the editor.
|
static ProgressPanel |
launchProgress
The progress panel used when launching a client in parallel with the editor.
|
static JFrame |
panelPartWindow
The Window placed on top of the Panel Editor and can then be used
to use as owner for e.g.
|
static int |
PE_HAS_PANEL_PART_DIALOG_BOXES |
static int |
PE_IS_CREATE_CONTROLS_ALLOWED |
static int |
PE_IS_EXIT_OK |
static int |
PE_IS_RUN_APP_ALLOWED
Functions for isFunctionAllowed.
|
static int |
PE_IS_SAVE_ALL_ALLOWED |
static int |
RJ_CROSS_REFERENCE |
static int |
RJ_OBJECT_SOURCE_CHANGE
Request Java functions.
|
static int |
RO_BUILD |
static int |
RO_CLEAN |
static int |
RO_CLOSE_APP |
static int |
RO_COMPILE_DISTRIB |
static int |
RO_FILE_SYSTEM_LOCK_ENTER |
static int |
RO_FILE_SYSTEM_LOCK_EXIT |
static int |
RO_HAS_TERMINAL_PART_DIALOGBOXES |
static int |
RO_IS_BUILD_ALLOWED |
static int |
RO_IS_BUILDING_AUTOMATICALLY |
static int |
RO_IS_BUILDING_PROJECT |
static int |
RO_IS_CLEAN_ALLOWED |
static int |
RO_IS_CLOSE_APP_ALLOWED |
static int |
RO_IS_COMPILE_DISTRIB_ALLOWED |
static int |
RO_IS_CONFIGURE_PROJECT_ALLOWED |
static int |
RO_IS_RUN_APP_ALLOWED |
static int |
RO_IS_RUN_BROWSER_APP_ALLOWED |
static int |
RO_IS_TERMINAL_SAVE_FILE_REQUIRED |
static int |
RO_IS_TERMINATE_CLIENT_ALLOWED |
static int |
RO_RUN_APP_DEBUG |
static int |
RO_RUN_APP_NORMAL |
static int |
RO_RUN_BROWSER_APP |
static int |
RO_SAVE_TERMINAL_FILE
Operations for requestOperation.
|
static int |
RO_SHOW_TOPMOST_DIALOGBOX |
static int |
RO_TERMINATE_CLIENT |
static int |
RO_TOGGLE_BUILD_AUTOMATICALLY |
static int |
RO_UPDATE_MENU_STATE |
static PhantomRuntime |
runtimeData
The runtime data, may be null if no valid INI file is yet loaded.
|
static boolean |
useBuildTrace
Should build trace be used?
|
static boolean |
useInternalProgress
Whether to use the internal progress bar.
|
| Constructor and Description |
|---|
Start() |
| Modifier and Type | Method and Description |
|---|---|
static void |
_setClosingWindow(Window owner,
boolean on)
Changes the state of closing window.
|
static void |
cancelBuild()
Cancel possible build operation.
|
static boolean |
checkEnabledNoDialogs()
Checks if the menu bar is enabled and no dialog boxes are present
before performing a function.
|
static String |
checkJavaVersion()
Checks the Java version and platform.
|
static int |
closeApp(boolean askJavaFirst)
Closes the application, asks Java first or not, depending if the call is from JNI or not.
|
static void |
configureApplication()
Call from JNI requesting configure application.
|
static void |
configureJavaRuntime()
Call from JNI requesting configure Java.
|
static void |
displayException(Throwable t)
Prints an exception to console output and tries to output it as native debug string using JNI.
|
static boolean |
doesEditorAndServerLevelsMatch(int editorLevel)
This static method is called from "javaed.cpp" to match the level.
|
protected static void |
editJavaSource(String doc,
boolean doCreate)
Starts the editor to edit Java source.
|
static String |
getApplicationIniData(String section,
String item,
String def)
Get the data from the current application file.
|
static BuildExitProgress |
getExitProgress() |
static int |
getHostFieldAttributes(int xy)
Gets host field attributes from a position.
|
static HostSessionManager |
getHostSessionManager()
Gets the single host session manager for the editor.
|
static String |
getIniData(String section,
String item,
String defaultValue)
Reads a string from PHANTOM.INI.
|
String |
getSourceDirectory()
Gets the Java source directory.
|
static VirtualSessionManager |
getVirtualSessionManager()
Gets the VirtualSessionManager for the Editor.
|
static boolean |
hasLoadedProject()
Checks if a project is loaded.
|
static boolean |
isInitiated() |
static boolean |
isMainWin32Thread()
Checks if this thread is the main Win32 thread, e.g.
|
protected static String |
listJavaSource(String doc)
Selects a Java source file for an object.
|
static void |
loadApplication(String iniFile)
Loads an INI file as the new application, typically from saved
INI files in the File menu (remembered ones).
|
static void |
logConsoleEvent(int colorIndex,
String text)
Call to log a text in the Console Output Window.
|
static void |
main(String[] args)
The main class for the Editor.
|
static int |
message(int type,
int icon,
String message)
Displays a message box.
|
static int |
message(int type,
int icon,
String message,
String title)
Also displays a message, but with a title.
|
static int |
message(int type,
int icon,
String message,
String title,
Throwable exception)
Also displays a message, but with a title and an Exception (Throwable),
not displaying the stack trace unless it's an instance of Throwable.
|
static int |
message(int type,
int icon,
String message,
Throwable exception)
Also displays a message, but with an Exception (Throwable), not displaying the stack trace
unless it's an instance of Throwable.
|
static void |
outputDebugString(String arg)
Debug output string.
|
static int |
postWin32Msg()
Posts a message to the Win32 message loop causing it to return.
|
static int |
processWin32MsgLoop()
Performs message looping in Win32 main thread until a message is posted
using "postWin32Msg()".
|
static void |
rememberFile(String fileName,
boolean doRemove)
Remembers (or forgets if doRemove is true) the last file for the
File menu in the panel editor.
|
static int |
requestJavaFunction(int function,
String param)
Call from JNI requesting an operation.
|
static int |
requestJNIFunction(int function,
String parameter)
Requests a JNI function.
|
protected static int |
requestJNIFunction0(int function,
String parameter) |
static int |
requestOperation(int operation)
Call from JNI requesting an operation.
|
static void |
requestShutdown()
Requests a shut-down of the Java VM, closing windows, saving states, etc.
|
static int |
setApplicationIniData(String section,
String item,
String data)
Set the data from the current application file.
|
static void |
setCompanyName(String company,
String licenseCode)
Sets the company name.
|
static void |
setExitProgress(BuildExitProgress bep) |
static void |
setIniData(String section,
String item,
String value)
Sets a string to PHANTOM.INI.
|
static void |
setLastTestedPanel(String panel)
Sets the last tested panel (null or empty string for none).
|
static void |
setWin32MainThread()
Sets the Win32 main thread used from JNI callback in CPP.
|
static void |
showConsoleOutput()
Shows the console output window.
|
protected static void |
showDocument(String doc)
Requests a display of a document from JNI.
|
static void |
showTerminal()
Shows the terminal window and brings it to front.
|
static void |
updateJNIMenuStates()
Updates the JNI menu states.
|
static void |
updateJNIMenuStates(boolean enablePanelPart)
Updates the JNI menu states.
|
static int |
updateMenuState()
Call from JNI requesting update the menu state.
|
public static final int ERR_NOTFOUND
public static final int ERR_CREATE
public static final int ERR_READ
public static final int ERR_WRITE
public static final int ERR_FORMAT
public static final int ERR_OUTOFMEMORY
public static final int PE_IS_RUN_APP_ALLOWED
public static final int PE_IS_EXIT_OK
public static final int PE_IS_SAVE_ALL_ALLOWED
public static final int PE_HAS_PANEL_PART_DIALOG_BOXES
public static final int PE_IS_CREATE_CONTROLS_ALLOWED
public static final int RO_SAVE_TERMINAL_FILE
public static final int RO_RUN_APP_NORMAL
public static final int RO_RUN_APP_DEBUG
public static final int RO_UPDATE_MENU_STATE
public static final int RO_TERMINATE_CLIENT
public static final int RO_IS_TERMINATE_CLIENT_ALLOWED
public static final int RO_IS_CLOSE_APP_ALLOWED
public static final int RO_CLOSE_APP
public static final int RO_IS_RUN_APP_ALLOWED
public static final int RO_IS_TERMINAL_SAVE_FILE_REQUIRED
public static final int RO_IS_BUILD_ALLOWED
public static final int RO_BUILD
public static final int RO_IS_CONFIGURE_PROJECT_ALLOWED
public static final int RO_IS_CLEAN_ALLOWED
public static final int RO_CLEAN
public static final int RO_FILE_SYSTEM_LOCK_ENTER
public static final int RO_FILE_SYSTEM_LOCK_EXIT
public static final int RO_IS_COMPILE_DISTRIB_ALLOWED
public static final int RO_COMPILE_DISTRIB
public static final int RO_TOGGLE_BUILD_AUTOMATICALLY
public static final int RO_IS_BUILDING_AUTOMATICALLY
public static final int RO_IS_BUILDING_PROJECT
public static final int RO_RUN_BROWSER_APP
public static final int RO_IS_RUN_BROWSER_APP_ALLOWED
public static final int RO_HAS_TERMINAL_PART_DIALOGBOXES
public static final int RO_SHOW_TOPMOST_DIALOGBOX
public static final int RJ_OBJECT_SOURCE_CHANGE
public static final int RJ_CROSS_REFERENCE
public static volatile boolean isEditorShutDown
public static PhantomEditor client
public static PhantomHostData hostData
public static PhantomApplicationData applicationData
public static PhantomRuntime runtimeData
public static ClientSession clientSession
public static int hostIndex
public static boolean isEditor
public static ProgressPanel launchProgress
public static se.entra.phantom.server.phed.LoadProgressListener launchListener
public static se.entra.phantom.server.phed.BuildManager buildManager
public static JProgressBar internalProgress
public static boolean useInternalProgress
public static boolean useBuildTrace
public static JFrame panelPartWindow
public static Object buildExitLock
public static final int JF_VERSION
public static final int JF_COMPANY
public static final int JF_REMOVE_SPLASH
public static final int JF_ABOUT
public static final int JF_LOAD_PHE
public static final int JF_CLOSE_PHA
public static final int JF_UPDATE_MENU_STATE
public static final int JF_PRINT_SCREEN
public static final int JF_PRINT_SCREEN_FIELDS
public static final int JF_CREATE_CONTROLS
public static final int JF_PRINT_SCREENS
public static final int JF_SET_CURRENT_SCREEN
public static final int JF_CLOSE_PHA_DIRECT
public static final int JF_ARE_KEYS_DOWN
public static final int JF_CLOSE_PANEL_WINDOW
public static final int JF_START_DIR_MONITOR
public static final int JF_WAIT_DIR_MONITOR_CHANGE
public static final int JF_STOP_DIR_MONITOR
public static final int JF_SET_BUILD_OPERATION
public static final int JF_ABOUT_PROGRESS_TEXT
public static final int JF_SET_LAST_TESTED_PANEL
public static final int JF_SET_PROJECT_NAME
public static final int JF_INITIALIZE
public static final int JF_UNINITIALIZE
public static final int JF_ISINITIALIZE
public static boolean doesEditorAndServerLevelsMatch(int editorLevel)
public static String checkJavaVersion()
public static void main(String[] args)
args - The starting arguments.public static boolean isInitiated()
public static HostSessionManager getHostSessionManager()
public static VirtualSessionManager getVirtualSessionManager()
public static void showConsoleOutput()
public static String getIniData(String section, String item, String defaultValue)
public static void setIniData(String section, String item, String value)
public static void requestShutdown()
public static void displayException(Throwable t)
public static void outputDebugString(String arg)
public static void showTerminal()
public static void rememberFile(String fileName, boolean doRemove)
public static boolean isMainWin32Thread()
public static int processWin32MsgLoop()
public static int postWin32Msg()
public static void setWin32MainThread()
public static int requestOperation(int operation)
public static int closeApp(boolean askJavaFirst)
public static int updateMenuState()
public static boolean checkEnabledNoDialogs()
public static void configureJavaRuntime()
public static void configureApplication()
public static void loadApplication(String iniFile)
public static int message(int type,
int icon,
String message)
Type:
1 Message with Cancel button. 2 Message with OK button. 3 Message with OK/Cancel question. 4 Message with Enter button. 5 Message with Enter/Cancel question. 6 Message with Yes/No question. 7 Message with Yes/No/Cancel question. 8 Message with Retry/Cancel question. 9 Message with Retry/Ignore/Cancel question.Icon:
1 No icon 2 Information code 3 Question mark 4 Warning code 5 Stop codeReturn value:
0 Incorrect parameters. 1 Response: Cancel. 2 Response: OK. 3 Response: Enter. 4 Response: Yes. 5 Response: No. 6 Response: Retry. 7 Response: Ignore.
public static int message(int type,
int icon,
String message,
String title)
public static int message(int type,
int icon,
String message,
Throwable exception)
public static int message(int type,
int icon,
String message,
String title,
Throwable exception)
public static int requestJNIFunction(int function,
String parameter)
The functions are
JF_VERSION 0 version number and build JF_COMPANY 1 company name for about box JF_REMOVE_SPLASH 2 removes the splash screen (parameter=null) JF_ABOUT 3 displays the about box (parameter=null) JF_LOAD_PHE 4 loads the specified PHE file JF_CLOSE_PHA 5 closes the panels and the PHA file JF_UPDATE_MENU_STATE 6 updates the menu state (Java menus are not updated) JF_PRINT_SCREEN 7 print the PhantomHostScreen with specified name JF_PRINT_SCREEN_FIELDS 8 print the PhantomHostScreen with specified name with fields JF_CREATE_CONTROLS 9 create controls JF_PRINT_SCREENS 10 print the listing of all screens JF_SET_CURRENT_SCREEN 11 sets the current screen name JF_CLOSE_PHA_DIRECT 12 closes the PHA file without save JF_ARE_KEYS_DOWN 13 checks if Shift+Control+Alt keys are down JF_CLOSE_PANEL_WINDOW 14 closes the panel editor window JF_ABOUT_PROGRESS_TEXT 15 Text that is displayed when the editor is starting up JF_WAIT_DIR_MONITOR_CHANGE 16 Starts directory change monitoring JF_STOP_DIR_MONITOR 17 Stops directory change monitoring JF_SET_BUILD_OPERATION 18 Sets the current build operation JF_ABOUT_PROGRESS_TEXT 19 Sets the about progress text JF_SET_LAST_TESTED_PANEL 20 The last tested panel JF_SET_PROJECT_NAME 21 Sets the project name in the panel part JF_INITIALIZE 22 Initialize the editor in the registry JF_UNINITIALIZE 23 Initialize the editor in the registry JF_ISINITIALIZE 24 Check if the editor has been initialized in the registry
protected static int requestJNIFunction0(int function,
String parameter)
public static void setLastTestedPanel(String panel)
public static void updateJNIMenuStates()
public static void updateJNIMenuStates(boolean enablePanelPart)
public static void setCompanyName(String company, String licenseCode)
public static boolean hasLoadedProject()
public static int getHostFieldAttributes(int xy)
public static int setApplicationIniData(String section, String item, String data)
String - - sectionString - - itemString - - datapublic static String getApplicationIniData(String section, String item, String def)
String - - sectionString - - itemString - - default valuepublic String getSourceDirectory()
public static void setExitProgress(BuildExitProgress bep)
public static BuildExitProgress getExitProgress()
public static void cancelBuild()
protected static void showDocument(String doc)
protected static void editJavaSource(String doc, boolean doCreate)
protected static String listJavaSource(String doc)
public static void logConsoleEvent(int colorIndex,
String text)
colorIndex is:
STDERR_COLOR 0 STDOUT_COLOR 1 OTHER_COLOR 2 APPLICATION_COLOR 3 EXTERNAL_STDERR 4 EXTERNAL_STDOUT 5 LOG_INFORMATIONAL 6 LOG_WARNING 7 LOG_ERROR 8 LOG_CRITICAL 9
public static int requestJavaFunction(int function,
String param)
function - the function to execute (a RJ_* value).param - a String or null depending on the function requested.public static void _setClosingWindow(Window owner, boolean on)
Phantom® and NetPhantom® are registered trademarks of Nexum Technologies SARL.
© Copyright Nexum Technologies SARL, 2011. All rights reserved.