Pictureviewer Applet Install Guide

1. Overview

Pictureviewer is a Java applet that runs in any browser that supports the Java (tm) plugin. The software requires the use of a VM supporting the JDK version 1.3.1 or above.

2. Distribution

The software is distributed as a zip file, pictureviewer.zip, that contains both the java software and the image files that the applet utilizes. When unzipped, the distribution produces a directory that contains the file pictureviewer.jar, and an image directory.
  • pictureviewer.jar - a self contained jar that includes all necessary java classes to run the applet
  • image - a directory that has all images needed by the applet at run time. The directory should contain the files:
     
    pictureviewer_applet_background.gif
    left_arrow_clicked.gifright_arrow_clicked.gif
    left_arrow.gifright_arrow.gif
    left_arrow_selected.gif   right_arrow_selected.gif
3. Applet

The information required for the use of the applet within an HTML page are provided in this section.

applet class:  Use the class com.srs.applet.pictureviewer.PictureviewerApplet. The class should be pulled from the pictureviewer.jar archive by using the archive attribute of the applet HTML tag.

parameters:  The applet supports the following parameters that can be provided to it within the applet tag. All listed parameters are required for correct operation.

sharedImageBasethe path to the directory containing the images for the applet to use, which should include a trailing backslash directory delimiter
imageDescriptionFile  the name of the file that exists in the same directory as the page the applet lives on that provides details on the images to be viewed


4. html markup

To serve up the applet within your webpages use the HTML applet tag using the java class and applet parameters previously presented. The following example HTML snippit illustrates the recommended markup for displaying the applet.
 

5. Web server directory layout

When integrating the applet and supporting images into your web site, there will minimally be three directories involved. First the directory with the applet's jar, second the directory with the applet's images, and lastly the directory with the html page that is serving the applet. As shown above with the sample HTML snippit, we recommend that the applet's jar be placed in ${DocumentRoot}/applets/bin, and that images be placed in ${DocumentRoot}/applets/images/pictureviewer. The zip of an example web server docroot, docroot.zip, available from the download center provides an example that uses this layout structure.

 

6. Web page directory

Each page that serves a pictureviewer applet will have three different components within the directory the page is being served from.
  1. The web page with the applet tag
  2. A image listing configuration file
  3. The picture image files
Web page that utilize pictureviewer can contain any HTML mark up you desire as well as the applet HTML tag for the pictureview as previously detailed. The image files for display can be GIF files or JPG files and should live in the same directory as the HTML page used to present the pictures.

The configuration file is a flat text file that pictureviewer uses to locate and display pictures. The file can have any name as long as the applet tag on your page is configured accordingly. The use of passing the name of the configuration file as a parameter within the applet tag allows for multiple web pages within the same directory that can display different sets of images.

7. Picture configuration file

A text based configuration file is used by the applet to list what images are to be displayed. In addition a description for the group of pictures can be provided, and a description for each picture. Each picture can also be viewed either Horizontally or Vertically based on how the picture was aligned with taken. Pictureviewer version 2 makes use of the java 2D APis to automatically rotate pictures to achieve the correct orientation. This means that it is not necessary to use a graphics manipulation program to rotate images that you want to view. This can be done solely in configuration by instructing pictureviewer to orient a picture Vertically versus horizontally.
 
configuration format

  1. First Line -- Descriptor

    header   A single line of text with a description of the set of pictures   

  2. Rest of File -- Picture Data

    The remainder of the file contains groups of 3 lines that describe each picture to be displayed. You may display 1..n pictures on each page.

    image file  A single line with the filename of the picture to display
    description  A single line of test with the caption to display with this picture
    orientation  The orientaiton of the image to display, which is either HORIZONTAL or VERTICAL. If HORIZONTAL is specified the images is left un changed and displayed in left to right fashon. If VERTIAL is specified the image is rotated 90 degrees to the left for display.

8. Licensing

The pictureviewer applet is being distributed as OpenSource software available under the terms and agreement of the GNU Public License. This software may be used free of charge and may be redistributed as desired within the constraints of the GNU license.

9. Distribution

The applet software is available at this sight in both binary and source form.

At the present time Solid Rock Solutions has not gotten that complicated in its use of version control and does not yet have a public version control system available such as CVS. As such the sorce is being distributed in the normal means embrased by the Java community and is provided as a source code jar file.