This directory contains sample programs using the EIP Java Viewer Toolkit. These samples are stand-alone and will work with local files without any need for a connection to a content server.
All samples can be executed using the EIP environment. To setup:
AIX, Solaris
Execute the cmbenv81.sh
command. (On AIX, this command may be located in the /usr/lpp/cmb/cmgmt directory.) This script sets up the PATH and CLASSPATH correctly for compiling and running the samples.
Gui samples require an X Server. A root user can enable the use of its X11 Graphics Session using the command:xhost +
This gives permission to all users. Each user can then set the DISPLAY environment variable:
export DISPLAY=:0.0
Windows NT, 2000
Launch the EIP development window -- Start | Programs | Enterprise Information Portal | Development Window. This runs the cmbenv81.bat script which sets up the PATH and CLASSPATH correctly for compiling and running the samples.
Steps to run the samples ( common to all platforms ) :
- Set up the classpath:set CLASSPATH=CMBROOT/Samples/java/viewer;
/Samples/java/viewer/TViewerDefaultIcons.jar;%CLASSPATH% - Compile the sample: javac Sample.java
- Run the sample: java Sample
There are three types of samples in this directory:
Note: These samples are not demo or turn-key programs that will run without any customization. The user is expected to do some customization to make them run in his/her environment. The main purpose of these sample programs is to provide sample code for the user to browse, so that he/she can have a clear example how to do a certain task using the EIP Java Viewer.
These command-line samples show how to use the streaming document services to convert documents and how to use annotation services.
Class Name | Description |
TStreamingDocServices | Performs document conversions from streams using document conversion engines. |
TAnnotationServices | Demonstrates annotation services capabilities. |
These samples show how to use the java viewer toolkit to rapidly develop a viewer applet or application.
Class Name | Description |
TGenericDocViewer | Shows rapid viewer application development using the java viewer toolkit. |
TViewerApplet | Shows rapid viewer applet development using the java viewer toolkit. |
This sample demonstrates how an annotation editor can be built using the annotation services and also how a custom annotation type can be plugged in.
Class Name | Description |
TAnnotationEditor | Demonstrates building annotation editing capabilities to a swing application using the annotation services support. |
TImageAnnotation | Implements a custom image annotation that can be plugged in to the annotation services. |