United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6624980 Support animated GIF images for custom loading screens in Plugin
JDK-6624980 : Support animated GIF images for custom loading screens in Plugin

Details
Type:
Enhancement
Submit Date:
2007-11-01
Status:
Closed
Updated Date:
2011-05-13
Project Name:
JDK
Resolved Date:
2008-02-20
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
6u10 (b12)

Related Reports
Backport:
Relates:
Relates:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
As documented here:
http://java.sun.com/javase/6/docs/technotes/guides/plugin/developer_guide/special_attributes.html
one can use the following syntax to provide a custom splash/startup screen for an
applet, which overrides the default Java Plugin animation:
  <APPLET ...>
  <PARAM name="image" value="my_image.gif">
  </APPLET>

The problem is that if one provides an animated GIF image, only the first frame
is shown, so this solution cannot be used to provide a custom "loading..." screen
that provides user feedback.  We need to fix the Java Plugin so that it can
display animated GIF images properly in this context.

Many customers have requested a way to override the default Java Plugin animation,
since in many cases it clashes with the aesthetics of a website or may conflict with
their own branding requirements.  While an animated GIF isn't the most ideal solution
to this problem, it is a reasonable stopgap until such a time that we can provide
a more complete solution.  (For one thing, we currently have no way to make a custom
animated GIF show the true loading progress of an applet, so these custom animated
GIFs would have to be more of an indeterminate progress indicator, which is better
than a static image at least.)

Also requested a number of times in the comments of this blog entry:
http://weblogs.java.net/blog/campbell/archive/2007/02/orange_box_new.html

                                    

Comments
EVALUATION

I believe we should focus on implementing this in the new Java Plug-In. Perhaps the same mechanism (or even code) can be used for the old one. Recategorizing to plugin2 subcategory.
                                     
2007-11-01
EVALUATION

Added support for animated GIF images in the custom loading screen in
the Java Plug-In by adding an ImageObserver watching for the
ImageObserver.FRAMEBITS notification and scheduling a repaint.
Technique suggested by ###@###.###.

As part of this fix, cleaned up a couple of places in the GrayBoxPanel
which were doing painting of the component in a thread-unsafe or
otherwise discouraged manner.

Also as part of this fix, added two new parameters for better control
of the behavior of the gray box painter. The boolean parameter
"centerimage", with default to false (necessary for backward
compatibility), places the custom image in the center of the applet's
area rather than at the upper-left corner. The boolean parameter
"boxborder", with default to true (again necessary for backward
compatibility), can be set to "false" to disable the drawing of the
single-pixel border around the edge of the custom image, which was
causing flickering in some situations. These new parameters will be
sent through the CCC and documented under 6652734.
                                     
2008-01-24



Hardware and Software, Engineered to Work Together