The Rollover Button Pluggable Java Component (PJC) provides an enhanced Forms button which has two new features. Firstly it can simply be turned into an Oracle Look and Feel rounded button with either or both sides of the button rounded. Secondly it can act as a web style rollover button which can contain two images, an image which is shown when the button is in a normal state and a second image which is displayed when the mouse moves over the button (or rolls over it). This feature can be used to create active buttons which, for instance, are normally gray, but color as the user moves the mouse over them, giving better visual feedback as to where and what the user is about to click on.
The Rollover button demo consists of the following files (relative directories shown in brackets):
The doc directory and the classes directory contain the JavaDoc for the code and the compiled classes respectively. An images directory is also supplied which contains all the images used by the standard rollovers described below.
In order for an application to be able to use the Rollover Button PJC the relevant configuration in the formsweb.cfg file has to ensure that the supplied rolloverbutton.jar (or another jar file containing the compiled RolloverButton.class) is included in the relevant archive setting.
An entry in the formsweb.cfg file for an application that used the RolloverButton PJC would look like this:
[Rollover] pageTitle=OracleAS Forms Services - Rollover Button Demo IE=jinitiator baseHTMLJInitiator=demobasejini.html archive_jini=frmall_jinit.jar,rolloverbutton.jar form=rolloverforms/java width=675 height=480 separateFrame=false splashScreen=no lookAndFeel=oracle colorScheme=blue background=/formsdemo/images/blue.gif
To use the Rollover Button PJC you must first create a normal Forms button, with the Iconic property set to No, and set the Implementation Class property for this item to oracle.forms.demos.enhancedItems.RolloverButton. Note that this property is case sensitive and must be entered exactly as shown.
To create a rounded edge to the button, simply include a leading or trailing rounded bracket in the label property (you can define this at build time). The brackets will be stripped out of the final label. So an instance of the PJC with the label "(Press)" will create a button with both ends rounded and the label "Press". "(Press" would create a button with just the left side rounded and the right side squared.
To use rollover images with the PJC One of three methods can be adopted:
Property | Get | Set | Valid Values / Return Value | Purpose |
---|---|---|---|---|
IMAGE_NAME_ON | Yes | Yes | String | Defines the name of the image that is shown when the mouse rolls over the button |
IMAGE_NAME_OFF | Yes | Yes | String | Defines the image shown when the mouse is not over the button |
DEBUGMESSAGES | No | Yes | 'true' | 'false' | Enables/disables debugging to the Java Console for this instance of the control. |
DEBUGMESSAGES_ALL | No | Yes | 'true' | 'false' | Enables/disables debugging to the Java Console for all instances of the control. |