Bean Extender Guide to Features
The Splash Screen Dip provides the ability to attach an informational dialog
to a JavaBean. This dialog will be displayed just before the bean to which
the dip is applied is displayed. The dialog can contain text and/or an image,
and will have a button that can be used to dismiss the dialog (the original
bean will be disabled until the dialog is dismissed). The dialog can be used
to convey any kind of information, such as advertisements, disclaimers, license
agreements, registration reminders, etc. This dip can only be applied to AWT
beans (that is, beans with java.awt.Component as an ancestor).
The Splash Screen Dip depends on the ImageViewer sample bean. This allows it
to display jpeg images (*.jpg files), as well as static and animated gif images
(*.gif images). The images can come from a resource available on the CLASSPATH
(such as a .jar file), or from a location on your hard drive. To load an image
from a resource file, specify a path such as the following:
"/com/ibm/beans/demos/travel/travlog1.gif". To load an image from a location
on your hard drive, specify a location such as "C:\Extender\doc\bannerx.gif".
Due to the dependency on the ImageViewer bean, the media.jar file needs to be
available in your CLASSPATH for the dip to function properly.
This dip is an example of what can be created by the Dip Creation Wizard - see
the Dip Creation Wizard Walk-Through for
a detailed explanation of how this dip was created. Sample source and a Dip
Creation Wizard model file are provided - just load the model file (splash.wiz)
into the wizard tool to see the settings used to produce this dip. All code
added after the wizard's code generation is clearly marked in the source files.
When you apply the Splash Screen Dip to a dippable bean, its Customizer dialog
will appear. For the imageName property, enter the name of a .jpg
or .gif file, which can be loaded as a resource from the CLASSPATH (using a
name such as "/com/ibm/beans/demos/travel/travlog1.gif") or directly from a
hard drive (such as "C:\Extender\doc\bannerx.gif"). For the noticeText
property, enter the text you would like to appear in the TextArea
on the splash dialog. If either property is left blank, then the corresponding
part of the dialog will not be present (if both are left blank, the dialog will
not appear). Here is an example of how to fill out the customizer dialog:
When you run a bean that has been dipped in the Splash Screen Dip, the splash
dialog will appear. In technical terms, the splash dialog will appear whenever
the addNotify() method of its dippable bean is invoked. Here is an example of
what the splash dialog looks like:
[ Top of Page | Previous Page | Next Page | Table of Contents | Documentation Homepage ]