Contents Intention GUI-CO-Interaction Access classes and converters Used TINAPlatform interfaces Special GUI features Dynamic GUI design at runtime Localization ToolTips Flexible GUI size Installation Classes Logos Web Page TestServer Patches GUI Start GUI manager TINAPlatform interface reference access Test start steps Online start steps Web Page Parameters Specifiing titles or logoNames in the Web Page Packages Hierarchy Classes How to build a Gui Sources TINAPlatform access GUI building Resource Bundles Early demonstration version of the Subscription GUI Future development possibilities Platforms Bugs and Problems ComboBoxes Logos Resource Bundles and Locales VisualCafe Documentation and class comments Applications and Examples
--------------------------------------------------------------------------- Intention This GUI Kit is a byproduct of implementing the Subscription and Online Subscription GUIs for the Hitachi Project 1998. The idea was, to create a kit of generic parts which can be used to build up the several GUIs (instead of simply designing a straight class hierachy of one or two super classes and several subclasses inheriting some common elements and methods). But nevertheless this kit is no universal GUI building kit. It is oriented closely toward the purpose of building GUIs for Computational Objects (COs) running on the GMD FOKUS PLATIN TINAPlatform Distributed Processing Environment (DPE). And it is specifically designed for the needs of managing data. So it may be used to build different data management GUIs or may be enhanced for other purposes. For details on this topic see below chapter "GUI-CO-Interaction". Quite sure, since this is the first iteration of the implementation, it should be revised and modified in many aspects. And because the main effort had to be to build the application GUIs, this text can not comprise a comfortable manual on using the kit, and the class descriptions in chapter "Classes" do not form a complete API description. The best solution for a developer, whishing to use the kit, will be, to have a close look at the example GUIs (TpTestServerGui and TpDemoGui) or use the realized applications GUIs as templates for new ones. Please report problems, errors, bugs as well as demands and ideas to improve the kit classes to tko@fokus.gmd.de. ---------------------------------------------------------------------------
GUI-CO-Interaction Access classes and converters The basic principle of the implemented GUI-CO-interaction is to shield the GUIs from CORBA objects. The only data types a GUI knows, are strings and tables of strings (hashtables). ORB handling and direct interaction with a TINAPlatform CO is done by an access object. A GUI which wants to use a TINAPlatform interface (that means to send a request to an interface) sends an according message to the access object. The access object then sends the request to the interface. The GUI sends all parameters (data entered in text fields, radio buttons, check boxes, lists etc.) as strings (or tables of strings) to the access class. The access class uses a converter object to convert these tables of strings into the appropriate IDL specified struct. Then the access class sends the struct as request parameter to the TINAPlatform interface. Received parameters from the interface are converted in the same manner and returned to the GUI. For each TINAPlatform interface to be accessed by GUIs there has been build one access class and a converter for its IDL specified data types (mostly structs) of the interface. This partitioning into three component types, GUI, access object and converter has some advantages. - Several GUIs can use the same access object type. - Several access objects can use the same converter. - converters may use other converters or use common converter superclasses. Example: The i_SAGInfoQuery interface is accessed by the TpSAGInfoQueryAccess object. The TpSAGInfoQueryAccess objects converts the request parameters using the TpSAGConverter. The TpSAGConverter is used too by the TpSAGMgmtAccess object. The TpSAGInfoQueryAccess object is used by the TpUserGui and the TpContractGui. - Other objects as these GUIs could use the access classes (and converters) to interact with the TINAPlatform interfaces. For each access class exists a Java interface which specifies the implemented messages, a GUI can send in order to induce a request. The Java interface mirrors the methods specified in IDL for the TINAPlatform interface, but all IDL specified parameters are replaced by strings and tables of strings. In some cases it was needed to insert a type description hashtable as additional parameter. These cases, where the method signature of the TINAPlatform interface request and the Java interface (access object) are not simply mirrored, are clearly marked in the Java interface code comment. Used TINAPlatform interfaces [...]
--------------------------------------------------------------------------- Special GUI features Dynamic GUI design at runtime The data types managed by these GUIs are not static. That means, depending on the data, which shall be presented in the GUI, there would have been the need of an unknown number of specifically designed GUI sub panels. Therefore a mechanism has been implemented to build up data management panels at run time as combination of basic data type representing components. These basic type representing components are subclasses of TpLinePanel, which are assembled into a TpDynamicPropertyListPanel (See below the class descriptions of "TpDynamicPropertyListPanel" and "TpLinePanel" and its subclasses). The TpDynamicPropertyListPanel has been used too to implement those GUI sub panels which do not change at runtime. By this way it was not needed to build these static sub panels manually or using a GUI builder, but they could be configured writing simply some configuration lines. This also guaranteed a uniform outlook of all data management sub panels. Localization The GUI texts have not been implemented into the GUI code, but are filed in at runtime using the Java features ResourceBundle and Locale. The initial language is set in the starting web page or using a request at the initial interface. The language may be changed at runtime according to user interaction or user properties stored in the database. ToolTips All GUI components use the Java Swing feature of ToolTips. ToolTips are little purpose describing help lines which pop up if the mouse pointer lingers some time on a component. The texts are - as all other GUI texts - changing according to the chosen language. Flexible GUI size Since the GUI uses the Java GridBagLayout feature, it may be expanded or shrinked adapting all sub components to the new size.
--------------------------------------------------------------------------- Installation Classes All GMD made GUI application packages and all packages generated from IDL using VisiBrokers idl2java have to be in the same directory (otherwise the System\'s CLASSPATH has to include the location of the not included packages). Logos The GIF files used by the GUIs have to be in a directory "images" at the same level as the GUI application packages e.g. ../images/gmdMedium.gif Web Page A web page is used to start the GUI (the name is specified as web page parameter), e.g. calling appletviewer SubAdmin.html To create this web page for testing purposes, a DOS BAT (or UNIX script) and top and end parts of the web page are delivered (See also chapter "Web page parameters"). Files: createXyzWebPage.bat (DOS BAT (or UNIX script) File to create the or web page from a top part, an ior file and an createXyzWebPage end part) xzy.ior (an ior file copied from a source specified in the creation DOS BAT or UNIX script file) xyzTop.txt (top part of the web page) xyzEnd.txt (end part of the web page) xyz.html (created web page to start a GUI) The starting web page should be in the same directory as the packages (same level as the packages). e.g. ../classroot/ de/gmd/fokus/platin/services/guikit/tpgui/ TpPanel.class ... de/gmd/fokus/platin/services/tpsubadmin/ TpSubscriberGui.class ... images/ gmd.gif ... SubAdmin.html
--------------------------------------------------------------------------- GUI Start GUI manager A GUI is started using an applet which is called Service Specific User Application (SSUAP) of the TINAPlatform. There exist a generic superclass TpSSUAP and GUI specific applets like TpSubSSUAP or TpOLSSSUAP. These specific applets are started by opening a web page. The starting applet starts a specific GUI manager. In order to send requests to TINAPlatform interfaces, the GUI has to get one or several access objects (mentioned above). The access objects have to get the TINAPlatform interface reference and instantiate their needed converters. The GUI manager starts the appropriate initial access class for the desired GUI, forwarding the TINAPlatform interface reference to the access object. Then the GUI manager starts the GUI, forwarding the access object to the GUI. The GUI manager may start more (slave) GUIs (when asked by a running initial (master) GUI). He broadcasts messages between the GUIs (needed for updating etc.) and quits all slave GUIs when the master GUI quits. Since the GUI manager handles passing of the IOR (object or string) to the access object, the GUIs have no direct contact to the ORB or ORB related objects. TINAPlatform interface reference access To get the TINAPlatform interface reference there a two possibilities: For testing purposes, the web page may be written manually (or created using a DOS batch or UNIX script file). In this case, the contact to the TINAPlatform interface is realized by a stringified Interoperable Object Reference (IOR) which is placed into the web page as applet parameter. (See below "web page parameters"). In real online use the web page is generated by a PERL script and includes no interface IOR. The initial interface is received by the starting applet from a TINAPlatform CO named ProviderAgent (PA). The applet gives the IOR object to the GUI manager which forwards it to the appropriate access object. Test start steps IOR string is placed into web page. Web page is opened up, which starts the applet. Applet gets IOR string as web page parameter. Applet starts GUI Manager (forwarding the IOR string). GUI manager starts initial access object (forwarding the IOR string). Access object contacts the TINAPlatform interface using the IOR string Access object starts one or several converter(s). GUI manager starts GUI (forwarding the access object). Online start steps PA CO is started getting the IOR object. Web page is opened up, which starts the applet. Applet gets IOR object from PA CO. Applet starts GUI Manager (forwarding the IOR object). GUI manager starts initial access object (forwarding the IOR object). Access object contacts the TINAPlatform interface using the IOR string Access object starts one or several converter(s). GUI manager starts GUI (forwarding the access object). GUIs may start other access objects when needed, using the initial access object to receive the IOR as string (not as CORBA object) and forward it to the other access object(s). Access objects may use other access objects when needed likewise. For test purposes, DOS batch files and UNIX shell scripts have been used to create the starting HTML file with the IOR string parameter out of three files: the IOR string file, a top and an end file (e.g. createXYZHtml.bat, XYZHtmlTop.txt, XYZHtmlEnd.txt, Server.ior).
Web Page Parameters A web page may be used to start the GUIs for testing purposes, using the DOS batch file or UNIX shell script or manually. As web page parameters may be defined NAME PURPOSE e.g. ----------------------------------------------------------------------------- guiName initial GUI de.gmd.fokus.platin.services. tpsubadmin.TpSubscriberGui (packagePath.class) guiMode GUI mode "pagedBased" or "standAlone" startMode interface from "online" (access object gets the interface in real use via request) or "test" (access object uses IOR String taken from the web page) language Locale "en" or "de" or ... titles GUI-Titles "Title One;Title Line Two" logoNames GUI-Logos "images/gmd.gif;images/platin.jpg" - guiName: The guiName specifies the initial GUI to open up by the GUI manager. The GUI manager may open up additional GUIs, when asked by the initial GUI. - guiMode: As default a GUI starts in stand alone mode. The initial GUI may be started in pagedBased or standAlone mode. Additional (slave) GUIs are always started in standAlone mode. - startMode: As default the Applet uses PA communication to access the initial interface. This communication is realized by the superclass (TpUapJApplet) of this class. By setting the web page parameter a GUI may started for testing without the PA and access the interface via an IOR string as parameter in the web page. - language: The initial language of the GUI may be specified as web page parameter, but the "real" GUIs get it via request from the TINAPlatform too. - titles Titles used to replace the ones specified in the resource bundles. If no titles are specified in the web page, the resource bundles entries are used. - logoNames LogoNames (including the directory name relative to the starting applets codeBase) used to replace the ones specified in the resource bundles. If no logoNames are specified in the web page, the resource bundles entries are used. Specifiing titles or logoNames as Web Page Parameter Titles or logoNames may be specified as Web Page Parameter as a String, each title or logoName ended by a ";". Titles are listed top to bottom, logoNames from left to right. A single ";" without preceeding title or logoName means, that the according title or logoName is taken from the bundle. Examples for the "titles" web page parameter: "" all titles are taken from the bundle. "This is a title" the first title line is taken from the web page, all others from the bundle. ";This is a Title" the first title line is taken from the bundle, the second as stated in the web page.
TestServer To use the TpTestServicePanel or TpDemoGui with the TpTestServer perfomr the following steps: Use VisiBroker idl2java on the TestServer.idl. This will generate a directory "TestServer" with stubs used by the GUIs, e.g. idl2java -no_tie -no_examples TestServer.idl. Place the created directory "TestServer" into the same directory as the packages "TpTestServiceGui" or "TpDemoGui". Place the package "TpTestServer" somewhere in the local net. Start an VisiBroker OSAGENT specifiing the ORBPort as 100011 by calling osagent -v -p 100011 Start the Testserver by calling from the DOS or UNIX prompt in the directory where the packages linger java de.gmd.fokus.platin.services.guikit.tptestserver.TpTestServer myPath replacing "myPath" by the pathname to which you want the server ior file to be written, e.g. java de.gmd.fokus.platin.services.guikit.tptestserver.TpTestServer C:\TMP\ including a file separator at the end! Then the ior file will be written as C:\TMP\StringInverter.ior This file is afterwards copied by the DOS BAT file or UNIX script into the starter html file (see chapter "Web Page"). If you do not use such a creation file you have to edit a html page manually specifiing the needed parameters (see chapter "Web Page Parameters"). Start TpTestServiceGui or TpDemoGui using it\'s appropriate web page by calling at the DOS or UNIX prompt in the directory where the packages are located appletviewer TestServiceGui.html or appletviewer DemoGui.html. Alternatively you can use VisualCafe to open up the web page. Patches If the GUIs are started by the TINAPlatform computation object "Provider Agent" (PA) the standard Java class "SwingUtilities" has to be used in a patched version which has corrected a bug, which would otherwise prevent the GUI start (see SwingUtilitiesBug.txt).
--------------------------------------------------------------------------- Packages The classes of the GUI kit and its applications are grouped into the following Java packages. tpgui The GUI kit comprising generic gui components which are used to build the GUIs. tporbaccess Classes for handling the Object Request Broker (ORB) and Interface Definition Language (IDL) objects. Access classes handling the TINAPlatform interface and converters converting from IDL to Strings (and vice versa) inherit from these superclasses. All IDL specified exceptions are replaced by a TpInterfaceAccessException subclasses using specific TpXYZAccessExceptionBundles. TpIDLConverter and its subclasses may throw TpIDLConverterExceptions using TpIDLConverterExceptionBundles. All specific exception classes inherit from TpException. tptools These classes have been developed by jek to support the Java DPE. Until now, the GUI kit uses only TpUapJApplet. It is the superclass of the generic TpSSUAP applet. The GUI specific subclasses of TpSSUAP inherit the TpUapJApplet functionality to communicate with the PA CO in order to receive the initial TINAPlatform interface object and other start related parameters (e.g. "language"). tpsubaccess This package contains the Subscription and Online Subscription specific access classes, their Java interfaces, their converters, their exceptions and exception bundles and the starting applets. TpSSUAP.java TpSubSSUAP.java TpOLSSSUAP.java TpSSUAPAccessInterface.java TpSSUAPAccessAccess.java TpSSUAPAccessConverter.java TpSubscriberInfoQueryInterface.java TpSubscriberInfoQueryAccess.java TpSubscriberMgmtInterface.java TpSubscriberMgmtAccess.java TpSubscriberConverter.java TpSAGInfoQueryInterface.java TpSAGInfoQueryAccess.java TpSAGMgmtInterface.java TpSAGMgmtAccess.java TpSAGConverter.java TpServiceContractInfoQueryInterface.java TpServiceContractInfoQueryAccess.java TpServiceContractMgmtInterface.java TpServiceContractMgmtAccess.java TpServiceContractConverter.java TpServiceProfileInfoQueryInterface.java TpServiceProfileInfoQueryAccess.java TpServiceProfileMgmtInterface.java TpServiceProfileMgmtAccess.java TpServiceProfileConverter.java TpServiceTemplateInfoQueryInterface.java TpServiceTemplateInfoQueryAccess.java TpServiceTemplateMgmtInterface.java TpServiceTemplateMgmtAccess.java TpServiceTemplateConverter.java TpAnonOLSInterface.java TpAnonOLSAccess.java TpOLSInterface.java TpOLSAccess.java TpUserProfileManagementInterface.java TpUserProfileManagementAccess.java TpSubscriptionAccessException.java TpSubscriptionAccessExceptionBundle.java TpSubscriptionAccessExceptionBundle_en.java TpSubscriptionAccessExceptionBundle_de.java Multiple usage of classes: OLS Access classes use the available Subscription converter. OLSAccess uses TpSubscriberConverter and TpContractConverter. AnonOLSAccess and UserProfileManagementAccess use TpSAGConverter. And both use the converter superclass TpIDL2StringConverter. tpsubadmin An application using the GUI kit for implementing the Subscription GUIs (Service Template, Subscriber, User, Contract) their GUI manager, and resource bundles (e.g. Hitachi Project 1998-08). At start, the SubAdmin GUIs get an unspecific access object to the i_SSUAPAccess interface. They get their purpose specific interfaces using this access object. tpolsadmin An application using the GUI kit for implementing the Online Subscription GUI (OLS) its gui manager, and resource bundles (e.g. Hitachi Project 1998-08), using TpNewCustomerPanel (by jfr). At start, the OLSGUI gets an specific access object to the i_AnonOLSAccess interface or the i_OLSAccess interface depending on the interface object received from the PA CO. The OLSGUI may fetch an additional i_UserProfileManagement interface using the TpOLSAccess object. tptestservicegui A simple example GUI - for basic GUI assembling using GUI kit classes (TpTitleBarPanel, TpMessageBarPanel, TpButtonBarPanel etc.) and the simple "TpTestServicePanel", - for communicating with a TestServer to demonstrate Visigenic ORB communication. The TpTestServiceGui panel is a subclass of TpMainPanel, using no inherited GUI elements. The TpTestServicePanel uses no access class or converter but directly communicates with its simple server (tptestserver). tptestserver The TestServer used by TpTestServiceGui and TpDemoGui. tpdemogui A more sophisticated example GUI using all possible GUI kit classes. The DemoGui main panel is a subclass of TpListMainPanel, inheriting a selectionList and tab folder management. Four functional panels are placed into the tab folders. The first folder is the "TpTestServicePanel". The second folder uses a "TpAssignmentListPanel". The third and fourth folders are instances of "TpDynamicPropertyListPanel". This GUI element is not pre-designed (e.g. using a GUI builder), but is configured automatically at runtime out of four possible data entry line panels (see below chapter "Classes", subclasses of TpLinePanel) according to property lists received from the TINAPLatform interface. The third folder is statically configured ("offline") showing all possibilities of TpLinePanel subclasses. The fourth folder is dynamically configured at runtime ("online") using a property list received from the TpDemoGuiServer. CORBA objects All other needed packages and files are generated using idl2java (VisiBroker 3.2).
--------------------------------------------------------------------------- Class Hierarchy * = realized specific subclasses for GUI applications ... place to implement future specific subclasses or applications TpUapJApplet (by jek) TpSSUAP * TpSubSSUAP * TpOLSSSUAP ... additional start applets TpGuiManager * TpSubGuiManager * TpOLSGuiManager ... additional GUI managers TpContainerFrame TpPanel TpContainerPanel contains BarPanels TpBarPanel TitleBarPanel MessageBarPanel ButtonBarPanel ... additional panels TpMainPanel contains CardPanels TpListMainPanel * TpDemoGui * TpSubscriberGui * TpContractGui * TpUserGui * TpTemplateGui ... additional panels TpFolderMainPanel * TpOLSGui ... additional panels * TpTestServiceGui ... additional panels TpCardPanel TpDynamicPropertyListPanel contains LinePanels TpAssignmentListsPanel TpMessageCardPanel (by jfr) * TpTestServicePanel * TpNewCustomerPanel (by jfr) ... additional panels TpLinePanel TpFieldLinePanel TpCheckLinePanel TpSelectionLinePanel TpListLinePanel TpEmptyLinePanel ... additional panels TpException TpInterfaceAccessException * TpSubscriptionAccessException ... additional exceptions TpIDLConverterException TpGuiGenericBundle TpGuiGenericBundle_de TpGuiGenericBundle_en TpSubscriptionAccessExceptionBundle TpSubscriptionAccessExceptionBundle_de TpSubscriptionAccessExceptionBundle_en TpIDLConverterExceptionBundle TpIDLConverterExceptionBundle_de TpIDLConverterExceptionBundle_en Existing functional panels may also be subclassed in the future to implement new functionality (e.g. subclasses of TpTitleBarPanel, TpMessageBarPanel etc.) Additional classes (used for GUIs without ORB access or using no access classes): TpSimpleORBAccess TpGenericStartApplet
--------------------------------------------------------------------------- Class descriptions (in package tpgui, if not specified) Since the kit was never designed but created on the fly since June 1998 and adapted to the needs of the projects there may be subtle inconsistencies between the implementation and this class descriptions. The following sequence of classes uses the placement as in the hierarchy above. TpUapJApplet (package tptools) realizes the initial communication between the TINAPlatform CO ProviderAgent and the GUI. To use this communication function, a specific subclass of its subclass TpSSUAP has to be build which (automatically) uses the hook methods implemented in TpUapJApplet. (Implemented by jek). TpSSUAP (package tpsubaccess) a subclass of TpUapJApplet. The generic superclass for module specific applets which manage the preliminary TINAPlatform initial interface access in interaction with the TINAPlatform Service Session COs for GUIs. Subclasses start a GUI manager applet which in turn starts the GUIs and their initial access class. (See also chapter "Web Page Parameters" above). TpSubSSUAP (package tpsubaccess) a subclass of TpSSUAP. A module specific applet which manages the preliminary TINAPlatform initial interface access for Subscription GUIs in interaction with the TINAPlatform Service Session COs. The initial access class for Subscription is TpSSUAPAccessAccess accessing the i_ssUAPAccess interface of module Subscription. TpOLSSSUAP (package tpsubaccess) a subclass of TpSSUAP. A module specific applet which manages the preliminary TINAPlatform initial interface access for Online Subscription GUIs in interaction with the TINAPlatform Service Session COs. The initial access classes for OnlinSubscription are TpAnonOLSAccess accessing the i_AnonOLS or TpOLSAccess accessing the i_OLS interface of module Subscription. TpGUIManager The generic superclass for specific GUI managers, used for handling one GUI or a group of related GUIs. A GUIManager starts the specific application GUIs and their initial access class. The first (initial) GUI is specified by the web page which started the start applet (a TpSSUAP subclass). The GUI manager may open up additional GUIs, when asked by the initial GUI. The manager starts the specific subclass of TpInterfaceAccess class, forwarding to the access class instance the interfaceInstance or the interfaceIORString and forwards the access class instance it to the GUIs. The GUI manager broadcasts messages between GUIs. (See also chapter "Web Page Parameters" above). TpSubGuiManager (package tpsubadmin) a subclass of TpGUIManager, a specific GUI manager for Subscription GUIs TpOLSGuiManager (package tpolsadmin) a subclass of TpGUIManager, a specific GUI manager for OLS GUIs. TpContainerFrame is the carrier for a TpContainerPanel if the GUI is used in stand alone mode. It offers a quit method to close the GUI. No subclasses are needed. TpPanel Abstract superclass of all panels used in the TINAPlatform GUI kit. Offers a collection of static variables for defaults (e.g. Font defaultDataFont()) and some utility methods (e.g. String[] getNotContainedItems(String[] list1, String[] list2). No direct subclasses are needed. TpContainerPanel a subclass of TpPanel. The container for a service specific TINAPlatform GUI and it\'s collection of sub panels. No subclasses are needed. TpBarPanel a subclass of TpPanel, the abstract superclass for component panels of TINAPlatform GUIs which may share the same width and may be placed in a column top to bottom into a container panel. They depend on a mainPanel which is placed (like the barPanels) into the same containerPanel. There are three subclasses (until now): TpTitleBarPanel TpButtonBarPanel TpMessageBarPanel If a barPanel is used, the mainPanel subclass has to implement methods, which are called by the barPanels for setup etc. These methods are specified in the specific barPanel. TpTitleBarPanel a subclass of TpBarPanel, displaying titles and logos of a GUI. It offers two titles (Strings, line 1 and 2) and two logos (GIF or JPG, left and right). Logo file names and title strings are asked from the mainPanel on setup() or again on receiving a changeLanguage() message. See mainPanel method String[] getTitleDescriptions() TpTitleBarPanel adapts its outlook dynamically according to the number of titles and logos which are returned by asking mainPanel.getTitleDescriptions(). The title lines and logo filenames are specified in the GUIs resource bundles and/or as web page parameter of the starting applet. Maximal number of title lines: 2 Maximal number of logos: 2 If a title line or logo is not specified at all (in bundle and web page), it will be hidden, and the remaining ones will be horizontally and vertically rearranged. As a consequence, by simply editing the resource bundles and starting web page you may create one of the following 10 outlooks: 1. one vertically centered title line. 2. two title lines. 3. one vertically centered title line, logo right. 4. two title lines, logo right. 5. logo left, one vertically centered title line. 6. logo left, two title lines. 7. logo left, one vertically centered title line, logo right. 8. logo left, two title lines, logo right. 9. logo left, logo right. 10. one horizontally centered logo. MessageBarPanel a subclass of TpBarPanel. It displays texts received from the other panels using the method void showText(String s) e.g. messagePanel.showText("message"); (In future it may open a console like window using jek\'s TpLog class) It offers two standard messages "initialMessage" and "waitMessage" (the text has to be delivered in each language in the resource bundles), which can be called using void showInitialMessage() void showWaitMessage() If the static variable SystemOut is set false (void setSystemOut(boolean b)), the message text will not be written to the console (default is true). TpButtonBarPanel a subclass of TpBarPanel offering buttons for TINAPlatform GUI. It is configured at runtime by parameters received from the mainPanel subclass or directly from the resource bundle using the mainPanel superclass method, if the default name "button" is used. The mainPanel / bundle has to have - one list of buttonCommands which correspond to appropriate methods, - for every language a list of buttonNames to display, - for every language a list of toolTipTexts to display. - optional is a list of Integers (disabledButtonPositions, starting with 1) which specify the position of buttons which will have no label, actionCommand and toolTip and stay disabled. Action, labels and toolTip lists have to be of the same length. The size of each button is determined by the number of buttons and the width of the mainPanel (which determines the width of the buttonPanel). If space remains after distributing the buttons, it will be filled by a disabled button without label. Button command, labels and toolTipTexts are asked from the mainPanel on setup(). Button labels and toolTipTexts are asked again on from receiving a changeLanguage() message. See mainPanel method Hashtable[] getButtonDescriptions(name) The name of the buttonPanel is in_parameter of this method because there may be more than one buttonPanel in a container. A buttonPanel may be configured at run time by calling its setButtons() method. The buttonPanel then asks the mainPanel again getButtonDescriptions(name) The number of existing buttons can not be changed, but labels, actions and toolTips and enabled state of each button may be switched. The mainPanel may call enableButton(action) disableButton(action) or enableButtons(actions[]) disableButtons(actions[]) to en/disable buttons (not the label, but the action command is used to identify the buttons). TpMainPanel a subclass of TpPanel, is the superclass for service specific panels for a TINAPlatform GUI which may be placed into container panels together with auxiliary bar panels (realizing title, messageLine, buttons). A TpMainPanel subclass is the main panel of a specific GUI. It does the real work, (may be it communicates via ORB with a Server,) it may use a TpMessageBarPanel, uses and configures TpButtonBarPanels, TitleBarPanels and other component panels (e.g. a TpDynamicPropertyListPanel or a TpAssignmentListPanel) which may be placed inside a tab folder (offered by a subclass of TpMainPanel, e.g. a TpFolderMainPanel). A subclass of main panel inherits one component: a label panel at the top with three labels distributed across the width, using TpPanel labelHeightDefault as height. If top labels are not needed, call mainTopLabelPanel.setVisible(false); in method assembleGui(). Until now there exist the following specific main panels which may be subclassed: TpFolderMainPanel (which offers tab folders at the right side) TpListMainPanel (which offers an item selection list at the left side and tab folders at the right side) Planned is a TpButtonMainPanel (which offers a vertical button group at the left side and tab folders at the right side) The following methods have to be reimplemented (as example see TestServicePanel.java) void buttonAction(String action) void setInitialState() void help () If other than the default bundle keys are used, the following methods have to be reimplemented: String[] getTitleDescriptions() String[] getButtonDescriptions(TpButtonPanel panel) String[] getFolderDescriptions() TpListMainPanel a subclass of TpMainPanel, a list oriented main panel for data management of a TINAPlatform GUI. If offers a selection list (with a label atop) at the left side and tab folders at the right side. The idea is, that list item selection/creation/deletion determine the appearance of data presented in the tab folders. In the specific resource bundle used by a subclass the following inherited variables have to be specified (Strings): selectionType; // a label text to display above the selection // list tabFolderLabelX // for each tab folder one label tabFolderTipX // for each tab folder one tip (X has to be replaced by an index Integer starting with 1) TpDemoGui (package tpdemogui) is a subclass of TpListMainPanel. TpDemoGui shows on three tab folders TestService The TestService components (serviceDescriptionLabel and inputStringField) are placed on a separate TpCardPanel subclass. TpDynamicPropertyListPanel Demo A list of data management lines configured at run time. TpAssignmentListPanel Demo Two lists to swap items between them. It uses a TpTitleBarPanel, two TpButtonBarPanels (above and below the mainPanel) and a TpMessageBarPanel. TpSubscriberGui (package tpsubadmin) a subclass of TpListMainPanel is used to access the i_SSUAPAccess, i_SubscriberInfoQuery and i_SubscriberMgmt interfaces of the TINAPlatform. It uses a TpTitleBarPanel, two TpButtonBarPanels (above and below the mainPanel) and a TpMessageBarPanel. TpContractGui (package tpsubadmin) a subclass of TpListMainPanel is used to access the i_SSUAPAccess, i_SAGInfoQuery, i_ServiceTemplateInfoQuery, i_ServiceContractInfoQuery, i_ServiceContractMgmt, i_ServiceProfileInfoQuery and i_ServiceProfileMgmt interfaces of the TINAPlatform. It uses a TpTitleBarPanel, a TpButtonBarPanel and a TpMessageBarPanel. TpUserGui (package tpsubadmin) a subclass of TpListMainPanel is used to access the i_SSUAPAccess, i_SAGInfoQuery, i_SAGMgmt, i_ServiceProfileInfoQuery and i_ServiceProfileMgmt interfaces of the TINAPlatform. It uses a TpTitleBarPanel, a TpButtonBarPanel and a TpMessageBarPanel. TpTemplateGui (package tpsubadmin) a subclass of TpListMainPanel is used to access the i_SSUAPAccess, i_ServiceTemplateInfoQuery and i_ServiceTemplateMgmt interfaces of the TINAPlatform. It uses a TpTitleBarPanel, a TpButtonBarPanel and a TpMessageBarPanel. TpFolderMainPanel a subclass of TpMainPanel is a panel to be subclassed for data management panels of a TINAPlatform GUI. If offers tab folders. Tab folder label and toolTip texts are taken from the resource bundle. TpOLSGui (package tpolsadmin) a subclass of TpFolderMainPanel is used to access the i_OLSAccess, i_AnonOLSAccess and i_UserProfileManagement interfaces of the TINAPlatform. It uses a TpTitleBarPanel, a TpButtonBarPanel and a TpMessageBarPanel. TpTestServiceGui (package tptestservicegui) a subclass of TpMainPanel uses a TpTestServicePanel placed directly into the main panel (using no tab folders etc.). It uses a TpTitleBarPanel, a TpButtonBarPanel and a TpMessageBarPanel. TpCardPanel a subclass of TpPanel is the abstract superclass for component panels of TINAPlatform GUIs which may be placed into tab folders or directly into free style subclasses of TpMainPanel. Using this superclass gives the possibility to change borders, default size, colors etc. of all gui - cards easily, if needed. No common methods until now. There are two prefabricated subclasses (until now): TpDynamicPropertyListPanel TpAssignmentListPanel A "free style" service specific panel may subclass TpCardPanel. TpDynamicPropertyListPanel a subclass of TpCardPanel is a panel which is configured at run time according to a property list of the data which shall be handled. It uses line panel components: field line a text entry field list line a text list select line a combo box (choice) check line a check box Strings: kind = "field", "check", "list", "select" type according to data name according to data constraint according to data value = field - string (if needed) list - not used selection - string (initial value) check - "true", "false" values = field - not used list - the initial list items selection - the possible list items check - not used statusBox = "hide", "show" - the statusBox is hidden or shown activated = "true", "false" - the line is activated as a property (to be shown in the GUI) enabled = "true", "false" - the line may be edited relationBox = "hide", "show" - the relationBox is hidden or shown relation according to data (out of relationList) relationList a list of relation operators (e.g. ">", "<" etc.) Example of a line description: Hashtable line = new Hashatble(); String kind = "field"; // or "check", "list", "select" String name = "user"; // according to data String type = "String"; // according to data (e.g. "String", // "Number") String constraint = "read only"; // according to data (e.g. "mandatory", //"read only") String activated = "true"; // "true", "false" String value = "some data"; // field line: data // list line: not used // select line: selected item // check line: "true", "false" String[] values = {"data1", "data2"} // field line: not used // list line: list of items // select line: list of items // check line: not used String[] relationList = {">", "=", "<"} e.g. line.put("kind", kind); line.put("name", name); line.put("type", type); line.put("constraint", constraint); line.put("value", value); line.put("values", values); line.put("activated", ""); line.put("enabled", ""); line.put("statusBox", "hide"); line.put("relationBox", "show"); line.put("relation", ">"); line.put("relationList", list); The description may also be created directly using constructor parameters of TpLinePanelDescription. Value keys that are not needed, may be ommitted (e.g. "values" in a field line). The statusBox is shown by default, but may be hidden using "hide". The relationBox is hidden by default, but may be shown using "show". If the number of data lines is less than the number of possible lines in a TpDynamicPropertyListPanel, the space is filled with empty lines (TpEmptyLinePanel). TpAssignmentListPanel a subclass of TpCardPanel is a panel which offers two lists and two buttons The buttons allow to move items from one list to the other (e.g. to edit group-membership). The panel ist configured by sending void setData(Hashtable data) where data\'s keys are "rightLabel" = String the label of the right list "leftLabel" = String the label of the left list "rightList" = String[] the right list "leftList" = String[] the left list The input data is fetched by Hashtable getData() where data\'s keys are "rightList" = String[] the right list "leftList" = String[] the left list If one of the assignment buttons is used, TpAssignmentListPanel calls a method boolean getAssignmentAccepted(String label, String item) or boolean getDeassignmentAccepted(String label, String item) at its mainPanel (the call is made only, if the mainPanel subclass has such a method), passing the label and the selected item of the appropriate list. The assignment is made only, if the return value is true. In the specific resource bundle the following keys have to be specified (Strings): assignListLeftLabel assignListRightLabel TpMessageCardPanel (package tpgui) A simple CardPanel (e.g. to place into a tab folder) offering a message label. The card may be used to display a feedback message for the user instead of calling a pop up dialog (like JOptionPane). The message is taken from the GUIs resource bundle. The messageBundleKey has to be set as constructor parameter or using setMessageBundleKey(String key). TpTestServicePanel a subclass of TpCardPanel, it implements a simple test utility. A request is sent to the TpTestServer with an input string as parameter. The string is returned inverted and displayed using the TpMessageBarPanel. It is used in TpTestServiceGui and TpDemoGui. TpNewCustomerPanel (package tpolsadmin) a subclass of TpCardPanel, it is used to manage customer data in the TpOLSGui. (Created by jfr). TpLinePanel a subclass of TpPanel is the abstract superclass for line panels of TINAPlatform GUIs. every line has a - statusBox - name label - relationBox - data entry area this may be a textField, checkBox, comboBox or list (inclusive two buttons for prompting add/delete dialogs) - type label - constraint label if a statusBox is not needed, it may be set invisible, it\'s mainly used for dynamic property list lines which might be de-/activated. if a relationBox is needed, it must be set visible. Methods which have to be reimplemented by subclass are: by a text field line void setValue(string s) String getValue() by a list line void setValues(String[] l) String[] getValues() by a checkBox line void setSelected() boolean getSelected() by a comboBox line for the selected item void setValue(string s) String getValue() for the possible items void setValues(String[] l) String[] getValues() Each line may have a method void setInitialState() TpFieldLinePanel a subclass of TpLinePanel is used in TpDynamicPropertyListPanel. To represent the property, a field line panel has a checkBox to set the line\'s activation status (true/false), a name label, a check box to set the values relation (if set visible), a text field, a type label, a constraint label. TpCheckLinePanel a subclass of TpLinePanel is used in the TpDynamicPropertyListPanel. To represent the property, a check line panel has a checkBox to set the line\'s activation status (true/false), a name label, a check box to set the values relation (if set visible), a checkBox to set the represented value, a type label, a constraint label. A TpCheckLinePanel has the additional method void setCheckBoxName(String s) to set an (additional) text to be displayed at the right side of the value checkBox. TpSelectionLinePanel a subclass of TpLinePanel is used in the TpDynamicPropertyListPanel. To represent the property, a selection line panel has a checkBox to set the line\'s activation status (true/false), a name label, a check box to set the values relation (if set visible), a comboBox with a pop up list of possible items, showing the selected items, a type label, a constraint label. The comboBox does not display it\'s toolTipText, a Swing bug. TpListLinePanel a subclass of TpLinePanel is used in the TpDynamicPropertyListPanel. To represent the property, a list line panel has a checkBox to set the line\'s activation status (true/false), a name label, a check box to set the values relation (if set visible), a scrollable list (value of the property) with two buttons (add/remove), which pop up appropriate dialogs, a type label, a constraint label. TpEmptyLinePanel a subclass of TpLinePanel is used in the TpDynamicPropertyListPanel to fill a tab folder with empty lines, if there are less "real" lines as possible for one tab folder. So the gridbagLayout can not expand the "real" lines. TpGuiGenericBundle is a collection of English texts to be used for the MessageBar AssignmentList and, possibly as part of a dynamic property list ListLine CheckLine FieldLine subPanels and other components of TINAPlatform GUIs.
--------------------------------------------------------------------------- How to build a Gui Sources are checked in to a ClearCase VOB in "Tina/Tina96/java/GUI-Kit" and "Tina/Tina96/java/SubscriptionGUIs". TINAPlatform access If you use a new TINAPlatform interface (which is not represented in TpSubAccess) you have to - build a specific subclass of TpInterfaceAccess, and possibly - build a specific subclass of TpIDL2StringConverter. GUI starting objects Create a specific subclasses of TpSSUAP and TpGuiManager. The subclass of TpSSUAP starts the specific Gui manager. The subclass of TpGuiManager starts the specific initial interface access class and gives it to the GUI (See class descriptions below for more details). You may use TpOLSSSUAP (package TpSubAccess) and TpOLSGuiManager (package TpOLSAdmin) as examples for a GUI using different initial interface access classes depending on the purpose of the GUI. You may use TpSubSSUAP (package TpSubAccess) and TpSubGuiManager (package TpSubAdmin) as examples for a GUI using always the same initial interface access class. GUI building A GUI is created by - subclassing - TpMainPanel for the main GUI, - TpCardPanel for sub panels to be placed into the main panel (e.g. into tab folders), Existing GUIs may be integrated e.g. by placing their panels into tab folders of a subclass of TpListMainPanel or directly into a subclass of TpMainPanel. Decide, which MainPanel subclass is needed Only tab folders -> TpFolderMainPanel On the left side a selection list, -> TpListMainPanel on the right side tab folders Only one panel or free style panels -> TpMainPanel (1) Build a specific subclass of TpSSUAP. Build a specific subclass of TpGuiManager. If desired, you may build a new specific subclass of TpTitleBarPanel. If needed, build a new specific subclass of TpCardPanel or make an existing Panel a subclass of TpCardPanel. (1) A better solution than subclassing TpMainPanel directly would be, first to build a new generic superclass for your mainPanel as subclass of TpMainPanel. This new generic class should be added to the kit. Specify your GUI and assemble the parts using an existing GUI code file as template (copy and adapt the especially methods specifyGui(), assembleGui()) The following lines are an abbreviated example of a TpListMainPanel subclass: [...] See example TINAPlatform package tpdemogui See TpMainPanel class comment. Use of Resource Bundles To be delivered by the resource bundles of a specific main panel are strings which are set at runtime for all components - one bundle for each language - X has to be replaced by an index Integer starting with 1 Default bundle key Purpose For the title panel title1 text for line 1 title2 text for line 2 logoName1 file name for logo left logoName2 file name for logo right For the default button panel for each button buttonX button label buttonTipX button toolTipText (The button actionCommands are not changed according to language and are specified in the GUI main panel code.) For every extra button panel for each button (buttonName has to be replaced by the name specified in main panel) buttonNameX button label buttonNameTipX button toolTipText For each tab folder panel tabFolderLabelX button label tabFolderTipX button toolTipText For each other component (field, additional single button etc.) on a card panel keys are specified in main or card panel code toolTipText For the GUI helpText help text (only one line until now) serviceType GUI type specification For the selection list (if a subclass of TpListMainPanel is used) selectionType label of the selection list For each TpAssignmentListPanel assignListLeftLabel left list label assignListRightLabel right list label
--------------------------------------------------------------------------- Early demonstration version of the Subscription GUI All needed packages and classes used for the Hitachi project have been assembled into the directory /net/cc/platin/users/tko/java/kit/98-08-25/run An all comprising Java jar file has been made too, available in directory /net/cc/platin/users/tko/java/kit/98-08-25/jar After creating a new IOR string containing HTML page the GUIs may be started calling (e.g.) appletviewer TpOLSAdmin/OLSService.html (The HTML file has to have an archive parameter if used with a jar file.) Note that the package paths have changed in the latest version compared to the early demonstartion version. For a user manual of GUI functions ask jfr@fokus.gmd.de.
--------------------------------------------------------------------------- Future development possibilities Purpose specific exceptions and according exception messages in the resource bundles should be created. Use of TpTools TpLog class (by jek) to build a message history window. The GUI kit classes might be enhanced to using the full scope of Java Beans technology. The GUI could be specified to a great degree from the resource bundle (instead of being written in the TpMainPanel subclass code). This includes the number of titles, buttons and (may be) folders. The GUI components could be implemented in a way, that they may be edited using the VisualCafe GUI Builder (due to problems Cafe\'s Builder has with GridbagLayout, ImageIcon and other classes, its use has been stopped) and are configured finally at runtime (e.g. calling a setup() method). But since it may be possible, that we use another IDE in the future, this might be a waste of effort. The mainPanel topLabelPanel could be build as another type of TpBarPanel (like the TpButtonBarPanel) configurable at runtime. More ...
--------------------------------------------------------------------------- Platforms NT The GUIs have beeen developed on Windows NT using Symantec VisualCafe 2.5. VisualCafe uses JDK 1.1.5 and Swing 1.0.1 (The GUI kit is pure JAVA JDK and Swing. No Symantec specific classes have been used.). SUN The GUIs have been successfully tested on SUN using jdk1.1.6 and swing-1.1b. Do not use swing 1.0.2 and swing 1.0.3 (See Bugs and problems). GMD path: /usr/local/java/jdk1.1.6 /net/cc/platin/opt/visigenic/vbroker32 /net/ice/java/java-jfc-swing-1.1b/swingall.jar or /net/cc/platin/opt/java/swing-1.1beta2/swingall.jar ORB Visigenic VisiBroker 3.2. The use of idl2java on NT was possible only after the jar files (vbjorb.jar, vbjapp.jar, vbjtools.jar, vbjcosnm.jar) had been extracted.
--------------------------------------------------------------------------- Bugs and Problems [...] Logos [...] GIF files: Remote Access [...] Resource Bundles and Locales [...] VisualCafe VisualCafe crashed (NT displays the funny "..Postmortem.." message) up to 10 times a day. Especially when more than one projects are opened. It crashes reliably after three to four compilations of single files using Visigenic generated CORBA objects (To avoid these CORBA object related crashes, it\'s safer to compile all files in the project using the "Run in Debugger" menu item). This seems to be a RAM related problem, since as the RAM of the PC was enhanced gradually (60 - 130 - 190 MB) the number of crashes decreased. With 60 MB Cafe was not able to handle the packages with approx. 100 classes. With 130 MB it "only" crashed up to 10 times a day. Now, with 190 MB, it crashes less than once a day. Documentation and class comments [...]
--------------------------------------------------------------------------- Applications and Examples Purpose Used (visible) GUI kit classes ---------------------------------------------------------------------------- Subscription TpTemplateGui subclass of TpListMainPanel, TpTitleBarPanel, TpButtonBarPanel, TpMessageBarPanel, three TpDynamicPropertyListPanels. TpSubscriberGui subclass of TpListMainPanel, TpTitleBarPanel, two TpButtonBarPanels, TpMessageBarPanel. two TpDynamicPropertyListPanels. TpUserGui subclass of TpListMainPanel, TpTitleBarPanel, TpButtonBarPanel, TpMessageBarPanel, two TpDynamicPropertyListPanels, TpAssignmentListsPanel. TpContractGui subclass of TpListMainPanel, TpTitleBarPanel, TpButtonBarPanel, TpMessageBarPanel, two TpDynamicPropertyListPanels, TpAssignmentListsPanel. Online Subscription (OLS) TpOLSGui subclass of TpFolderMainPanel TpNewCustomerPanel (subclass of TpCardPanel), TpTitleBarPanel, TpButtonBarPanel, TpMessageBarPanel, TpAssignmentListsPanel, TpMessageCardPanel. Examples TpTestServiceGui subclass of TpMainPanel TpTestServicePanel (subclass of TpCardPanel), TpTitleBarPanel, TpButtonBarPanel, TpMessageBarPanel, TpAssignmentListsPanel. TpDemoGui subclass of TpListMainPanel, TpTestServicePanel (subclass of TpCardPanel), TpTitleBarPanel, two TpButtonBarPanels, TpMessageBarPanel, TpAssignmentListsPanel. ____________________________________________ GMD FOKUS PLATIN TINAPlatform tko 1999-01-26