The terminal application is a NetPhantom application located in the terminal directory on the server side and is called
terminal.jar. You can open this file in
NetPhantom Editor with the file TERMINAL.INI.
If you need another language for this application, just translate the TERMINAL.PHM file
as all texts are externalized. E.g. if you wish to create a French translation table, translate the
TERMINAL.PHM file into French and name it TERMINAL_fr.PHM.
Also make sure that the text file languages are defined in server.ini, in the
[base] section such as textFileLanguages=de,ch=de,at=de,sv,fr.
See the NetPhantom User's Guide and Reference for more information.
Special requirements for terminal.jar
There are a number of special requirements for the terminal application described below:
- Only one main panel may exist and has to be named TERMINAL.
- All other panels must be of pop-up type.
- No panel can or should be host-connected.
- Push buttons or menu items may not use the entry "Next panel".
- No Phantom Object connections may exist, and absolutely no REXX code.
- All interaction with the panels must be done from Java code.
- Extending application must extend from se.entra.phantom.server.TerminalApplication.
- Once finished, perform Compile distribution in order to produce
a new terminal.jar application file.
Another requirement is that panels must be created with the following code:
VirtualSessionManager vsm=panel.getVirtualSessionManager();
VirtualPanelSession vps=vsm.getCurrentTerminalSession();
VirtualPanel newPanel=null;
if ( vps!=null )
{
VirtualPanelListener ll=new YourVirtualComponentAdapter();
newPanel=vps.createTerminalPanel("PANELID",ll);
}
Default implementation in TerminalApplication
The class se.entra.phantom.server.TerminalApplication that all extending
classes for the terminal application should use performs some default operation that can be overridden by the extending
class.
- Upon onPanelCreate the title bar text in the main panel (TERMINAL) is updated
from e.g. "Terminal Application - ?" to "Terminal Application - Session V - Description", where the "V" is the current
host session ID and the "Description" is the text specified in "server.ini" [base] section as "V.description=Description".
- Upon onPanelCreate the host sessions that the user can change to is stored
the variable allowedSessions and the menu item with the Control ID "CHGSESS"
is disabled if the "V.allowedSessions" entry in "server.ini" [host] section (or "defaultAllowedSessions") is not found or
empty.
- The following Control IDs perform actions in the onAction method:
EXIT |
performExit |
PROPS |
performProperties |
CHGSESS |
performChangeSession |
CUT |
performCut |
COPY |
performCopy |
PASTE |
performPaste |
APPEND |
performAppend |
SELALL |
performSelectAll |
CONNECT |
performConnect |
PRINT |
performPrint |
PRTWIN |
performPrintWindow |
ABOUT |
performAbout |
- Upon changes in the selection rectangle in the terminal part the menu items
and pop-up menu items CUT, COPY
and APPEND are enabled or disabled.
For a detailed description of the terminal application, see the
Java documentation
or the source listings.