Oracle Forms Server 6i

The Rollover Button PJC

Author:  Oracle Forms Product Management Team
Creation Date:  23-SEP-1999
Last Updated:  20-FEB-2000
Version:  1.0
Copyright (C) 1999 Oracle Corporation
All Rights Reserved


Change Record

Date Author Version Comments
23-SEP-1999 PM Team 0.5 initial creation.
20-FEB-2000  PM Team 1.0 updated for 6i release, name change and package structure change.


Overview

This Pluggable Java Component (PJC) provides a Rollover Button style component for use in Oracle Forms applications. The Rollover Button functions as a standard Forms Button but provides support for displaying different images when the user moves the mouse over the Button component.

When the Rollover Button PJC is implemented, a default image is displayed on the button. When the user moves the mouse over the button, the alternate image is displayed, giving the user the impression that the button has rolled over. When the mouse is moved off of the button, the original image is redisplayed.

The Distribution

This distribution contains the following directories:
Directory Contents
.\src The Java source files for the PJC. 
.\classes The compiled classes for the PJC that can be used in an Oracle Forms application. 
.\doc The Javadoc generated documentation from the PJC source files. This documents the method and attributes used within the PJC. Click here to view the documentation. 
.\misc Contains miscellaneous elements required for the PJC. This directory contains the default images used by the PJC and also some additional images to play with. 
.\forms Contains example Forms which use the component and demonstrate how to work with the PJC from the Forms environment. Also contains a couple of example HTML files that can be used to launch the example Form.

Deployment

You should perform the follwing steps to install and configure the PJC for development and deployment in an Oracle Forms Server application:

        <ARCHIVE = "f60all.jar, RolloverButton.jar">

Using the Rollover Button PJC

The fully qualified name for this PJC is oracle.forms.demos.RolloverButton.

This PJC is designed to act as a replacement for a standard Forms button. To use the PJC in an Oracle Forms application you must place a Button item on the Form and then set the Implementation Class property for the button to be oracle.forms.demos.RolloverButton.

This PJC has been compiled with the default images to display being on.gif and off.gif. The images are by default loaded relative to the codebase directory as specified in the HTML page that launches the Oracle Forms Server application. For example if you specified on.gif then this would be loaded from the physical directory that maps to the codebase virtual path mapping. If you specified images/on.gif then the image would be loaded from the images subdirectory under the directory the codebase value is set to.

This PJC supports the following properties which can be programatically manipulated to modify the behavior of the Rollover Button. With the 6i release of the product it is also possible to invoke the getProperty method on the PJC to return the values being used for the image resources.

PL/SQL Property Type Usage
IMAGE_NAME_ON varchar2 This property is used to specify the name of the image resource to be used to represent the ON state of the button. 


Forms 6i Usage
SET_CUSTOM_PROPERTY(hBean,1,'IMAGE_NAME_ON ','/images/on.gif'); 

iname := GET_CUSTOM_PROPERTY(hBean,1,'IMAGE_NAME_ON '); 
IMAGE_NAME_OFF varchar2 This property is used to specify the name of the image resource to be used to represent the OFF state of the button. 

Forms 6i Usage
SET_CUSTOM_PROPERTY(hBean,1,'IMAGE_NAME_OFF ','/images/off.gif'); 

iname := GET_CUSTOM_PROPERTY(hBean,1,'IMAGE_NAME_OFF '); 

Running the Sample

The sample form that ships with this distribution uses the Rollover Button. The sample form has no dependencies on a database. To run the sample form you must perform the following steps:

Building the Java Classes

This distrubution contains the Java source code for the PJC so you can make any changes you wish to the way the component works for your applications.
Java Source File Notes
RolloverButton.java The source file for the PJC component. It is defined to be in the oracle.forns.demos package. 
Utils.java The source file for the utility methods used by the PJC. This utility class contains common functions that can be used by different PJCs. 

To compile the Rollover Button PJC you will need to have the following software components installed and configured on your computer :

A batch script (for Windows NT) has been provided in the src directory that will compile the RolloverButton.java and Utils.java source files into the classes directory. This batch file also recreates the JAR file using the newly compiled classes and regenerates the Javadoc documentation.

To run the batch file the following environment variables must be set:
 
 
Environment Variable Notes
ORACLE_HOME Specifies the location of the Oracle software installation. In the case where more than one Oracle home exists, it should specify the location where Oracle Forms Server is installed.
JDK_HOME Specifies the location where a Java Development Kit is installed. This should point to the top level directory only.

Dependencies

This PJC has been tested with the following software components: