This topic describes how to customize (or extend) the Java Step Processor sample applet. Refer to the Java Step Sample Files topic for a detailed list of the available sample files. These procedures assume that you have already:
Customizing the Step Processor sample consists of two key steps:
Note These procedures assume you are using the Java SDK in native, command line mode (see Configure the Java SDK for details on which JDK to use for your development environment and how to install it for eProcess) and that the JDK is installed in the default directory. If you are using a Java Integrated Development Environment (IDE), such as Visual Cafe, JBuilder, Forte, etc., you can use the eProcess Java UI Toolkit API Rapid Application Development (RAD) components, in a drag-and-drop fashion, by adding the vwpanel.jar file to the Java project (for additional information, see the Java UI Toolkit Overview topic). The eProcess Java UI Toolkit provides ready-to-use user controls to simplify customizing the applet user interface. Refer to the documentation that came with your IDE for information on adding drag-and drop RAD components.
These procedures demonstrate how to modify and compile customized versions of the Step Processor samples. However, you can adapt these procedures to update the Launch Step Processor samples by changing the directory and file names used in these procedures.
Caution You should rename the directory to ensure that package names do not conflict when you create the Java ARchive (JAR) file (see step 7 below).
C:\jdk1.3.1\bin\javac.exe -classpath .;C:\<your directory>\pw.jar;%CLASSPATH% newStepApplet.java
Alternatively, you can compile all of the classes in the directory at once (assuming, for example, that you have already created a batch file that includes the pw.jar location in the CLASSPATH variable; for details, see the Configure the Java SDK topic), as follows:
setenv
C:\jdk1.3.1\bin\javac.exe -classpath .;C:\<your directory>\pw.jar;%CLASSPATH%
*.java
Note The complete pathname for javac.exe is not necessary if your system PATH variable already includes the corresponding javac.exe.
Caution You must replace all directory name (package) occurrences; if you receive errors messages stating that certain symbols could not be resolved or found, check the files listed in the error statements to ensure that all package names are correct.
If the new custom Step Processor works, you are ready to customize the Step Processor application/applet code (see below).
This section describes how to add user interface controls to the custom Step Processor by adding simple fields to indicate when the Step Processor was sent (launch information) and who sent it (originator information).
//Create labels for the launch date and originator information.
javax.swing.JLabel sentLabel = new javax.swing.JLabel();
javax.swing.JLabel fromLabel = new javax.swing.JLabel();
//Create label objects for the launch date and originator information.
filenet.vw.toolkit.runtime.step.beans.VWLabel vwSentLabel = new
filenet.vw.toolkit.runtime.step.beans.VWLabel();
filenet.vw.toolkit.runtime.step.beans.VWLabel vwFromLabel = new filenet.vw.toolkit.runtime.step.beans.VWLabel();
iconLabel.setBounds(516,48,216,108);
Modify the values to change the location of the icon. For example you might enter the following values:
iconLabel.setBounds(20,48,216,108);
//Display the label text on the JPanel to specify what the launch date information means.
sentLabel.setText("Launched on:");
add(sentLabel);
sentLabel.setBounds(320,84,100,24);
//Retrieve and display the launch date for Step Processor.
vwSentLabel.setParameterName("F_LaunchDate");
add(vwSentLabel);
vwSentLabel.setBounds(430,84,100,24);
//Display the label text on the JPanel to indicate what the originator information means.
sentLabel.setText("Step Originator:");
add(fromLabel);
fromLabel.setBounds(320,120,100,24);
//Retrieve and display the originator information.
vwFromLabel.setParameterName("F_Originator");
add(vwFromLabel);
vwFromLabel.setBounds(430,120,180,24);
C:\jdk1.3.1\bin\javac.exe -classpath .;C:\<your directory>\pw.jar;%CLASSPATH% newStepApplet.java
Alternatively, enter a command similar to the following to compile all of the classes in the directory at once:
C:\jdk1.3.1\bin\javac.exe -classpath .;C:\<your directory>\pw.jar;%CLASSPATH% *.java
Caution You must replace all directory name (package) occurrences; if you receive errors messages stating that certain symbols couldn't be resolved or found, check the files listed in the error statements to ensure that all package names are correct.