This section provides notes on Applet or Java Form migration.
Migration of Applet or Java Form that uses the Form Extension Function
An Applet or Java Form that uses the Form Extension Function cannot be migrated as is. This is because the Form Extension Function does not support JDK/JRE 6 or JDK/JRE 7.
To migrate an Applet or Java Form that uses the Form Extension Function, please change it to an Applet or Java Form that uses AWT or Swing. An Applet or Java Form that uses the Form Extension Function will be judged by whether the following classes are base classes. When migrating an Applet or Java Form, you will need to change the base classes to the following classes.
Base class before migration | Base class after migration |
---|---|
com.fujitsu.apworks.compod.ui.CDApplet | java.applet.Applet |
com.fujitsu.apworks.compod.ui.CDJApplet | javax.swing.JApplet |
com.fujitsu.apworks.compod.ui.CDFrame | java.awt.Frame |
com.fujitsu.apworks.compod.ui.CDJFrame | javax.swing.JFrame |
com.fujitsu.apworks.compod.ui.CDDialog | java.awt.Dialog |
com.fujitsu.apworks.compod.ui.CDJDialog | javax.swing.JDialog |
com.fujitsu.apworks.compod.ui.CDPanel | java.awt.Panel |
com.fujitsu.apworks.compod.ui.CDJPanel | javax.swing.JPanel |
Note
The following functions provided by the Form Extension Function cannot be migrated. For processing that relies on such functions, replace it with other kinds of processing or delete it.
Focus traversal order definition
Status bar
Note
An Applet or Java Form that is created using the Derived Form Function cannot be migrated. Please terminate the inheritance relationship by the merge with the source file of the base class.
You can use the following procedure to check whether the migration object file uses the Derived Form Function. For uncertainties, please consult our technical personnel.
Check the following comment part in the source file.
//@@Form Design Information start
//@@Inherits From class name 8-digit values
The aforesaid class name is not included in the table "Base class before migration".
Turn the 8-digit values to corresponding hexadecimal values, and check the third byte.
If the third byte is 01, then the class is Derived Form.
Example 1) //@@Inherits From class name 16843267
16843267 (decimal) -> 0x01 01 02 03 (hexadecimal)
-> The class is Derived Form
Example 2) //@@Inherits From class name 16843267
16973315 (decimal) -> 0x01 02 FE 03 (hexadecimal)
-> The class is not Derived Form
Migration example: Change the Java Form with com.fujitsu.apworks.compod.ui.CDFrame class as the base class to the Java Form that uses AWT and has java.awt.Frame class as the base class. Follow the procedure below:
Creating a new Java Form
Create a new Java Form with java.awt.Frame class as the base class.
Create the Java Form after migration in the same project as the Java Form before migration is involved in. From the menu bar of the workbench, select [File] > [New] > [Other]. In the [New] wizard, select [Java] > [GUI] > [Form]. Enter information in the [Java Form Information] page. In the [New Java Form] dialog box, select [Frame] in the [Java] tab. In the [Frame] dialog box, enter a different name from the Java Form before migration in the [Java Form name] field and enter "java.awt.Frame" in the [Base class] combo box. Click the [Create] button, and a new Java Form will be created.
Bean copying
Open the Java Form before migration and the one after migration using the Graphical Editor. Copy all the Beans in the Java Form before migration to the Java Form after migration.
Various definitions
As the following definitions cannot be copied, related items in the Java Form after migration must be defined the same as those in the Java Form before migration. However, the attention processing method will be copied afterwards, so there is no need to define the attention processing definition.
Menu definition
Exclusive Selection Group definition
Attention definition
Constructor copying
In the Java Form before migration, there exists a constructor with the parameter of com.fujitsu.apworks.compod.ui.CDApplicationContext class. This class is part of the Form Extension Function and cannot be copied to the Java Form after migration. Therefore, only the constructor processing is copied from the Java Form before migration to the Java Form after migration.
The constructor processing is copied using the Java Editor.
Source copying
Copy sources other than the constructor in the Java Form before migration to the Java Form after migration. However, remember not to copy the sources that prohibit changes. Sources that prohibit changes refer to the sources that begin with "// Graphical Editor Form" and "//@@Form Design Information start" and end with "//@@Form Design Information end".
The sources are copied using the Java Editor.
Method name change
As the Java Form after migration is a class inherited form, you need to change the method names of event processing and attention processing.
Check whether there are methods in the following formats in the copied source. These are the methods of event processing and attention processing.
public void "Bean name"_"event listener class name"_"event listener method name"("event class name")
public boolean processAttention_"attention name"()
Add $ to the ends of these methods according to the following formats.
public void "Bean name"_"event listener class name"_"event listener method name"$("event class name")
public boolean processAttention_"attention name"$()
After the Java Form is saved, the codes for association between bean and event processing method and those for association between attention and attention processing method will be created.
Java Form name change
Make the name of the Java Form after migration the same as that of the Java Form before migration.
Delete the Java Form before migration, or copy the Java Form after migration to other projects. Open the Java Form after migration using the Graphical Editor. From the menu bar of the workbench, select [File] > [Save As], and save the Java Form to a different name. Delete the original Java Form prior to the saving.