TheGalleryApplet

LICENSE

This license ("License") contains rights and restrictions associated with use of the accompanying software. Read the License carefully before utilizing the software. By using the software you agree to be bound by the terms and conditions of this license.

  1. Limited License Grant. David Griffiths ("The author") grants to you ("Licensee") a nonexclusive, nontransferable, worldwide, royalty-free license to use this The Gallery Applet software (the "Software"). Licensee agrees that it shall not use the Software for computer operations of any critical nature.
  2. Source Code Whilst the author may occasionally make source code available, it is NOT in the public domain and the author retains full copyright over it. UNDER NO CIRCUMSTANCES may software be sold containing code derived from this source code without David Griffiths giving his explicit permission.
  3. Restrictions. The Software is copyrighted and title to all copies is retained by the author. Licensee shall not make copies of Software, other than a single copy of Software in machine-readable format for back-up or archival purposes and, if applicable, Licensee may print one copy of on-line documentation, in which event all proprietary rights notices on Software and on-line documentation shall be reproduced and applied to all copies. Unless enforcement of this provision is prohibited by applicable law, Licensee shall not modify, decompile, disassemble, decrypt, extract, or otherwise reverse engineer Software. Software may not be transferred, leased, assigned, or sublicensed, in whole or in part.
  4. Disclaimer of Warranty. The Software is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANT-ABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
  5. Limitation of Liability. IN NO EVENT WILL THE AUTHOR BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  6. Termination. Licensee may terminate this License at any time by destroying all copies of Software including any documentation. This License will terminate immediately without notice from David Griffiths if Licensee fails to comply with any provision of this License. Upon termination, Licensee must destroy all copies of Software.
  7. Severability. If any of the above provisions are held to be in violation of applicable law, void, or unenforceable in any jurisdiction, then such provisions are herewith waived to the extent necessary for the License to be otherwise enforceable in such jurisdiction, However, if in the author's opinion deletion of any provisions of the License by operation of this paragraph unreasonably compromises the rights or liabilities of the author, David Griffiths reserves the right to terminate the License and refund the fee paid by Licensee as Licensee's sole and exclusive remedy.
  8. Integration. This Agreement is the entire agreement between Licensee and David Griffiths relating to Software and: (i) supersedes all prior or contemporaneous oral or written communications, proposals and representations with respect to its subject matter; and (ii) prevails over any conflicting or additional terms of any quote, order, acknowledgment, or similar communication between the parties during the term of this Agreement. No modification to the Agreement will be binding, unless in writing and signed by a duly authorized representative of each party.

Congratulations...

...upon choosing this product. Not only will it improve your health, and enhance your general spirituality, it will also clean the bath, cook you breakfast, take care of the children, end armed conflict and invigorate the look of your web page.

Introduction

You should be careful to check that your unzipping program has named the files correctly. Some DOS programs will name according to the old 8.3 format, rename .class files "*.cla".

The Gallery Example

Put something here for browsers that don't understand Java
NB: If you cannot see an applet above, then you may need to extract more files from the .ZIP archive before reading this page.

The code which produces the above is:


<applet code="Gallery" archive="gallery.jar" 
	width="200" height="300" name=gallery1>
	<param name="image0" value="svetlana_01sm.jpg">
	<param name="image1" value="svetlana_02sm.jpg">
	<param name="image2" value="svetlana_03sm.jpg">
	<param name="image3" value="svetlana_04sm.jpg">
      <param name="mixers" value="ImageMixer, Burn, Butterfly, Smoke, Wipe">
      Put something here for browsers that don't understand Java
</applet>

Paying for the Applet

There is NOTHING to pay. The applet is completely free. However, if you make a donation ($5 - $10?) to Ty Hafan, Children's Hospice of Wales, which is a charitable appeal formed to build, equip and run a Children's Hospice in Wales to provide care for terminally ill children, you can consider your applet well-and-truly registered. Click here for details on how to make a donation. They now have an excellent new OnLine donation page. In just a few minutes you can change a few old, crinkly, dirty little bank notes into a nice warm glow...

Using Gallery in a web page...

To include Gallery in a web page, you should copy the gallery.jar file into the same directory as the web page and then insert an <APPLET...> tag into the page, e.g.


<applet code="Gallery" archive="gallery.jar" 
	width="200" height="300" name=gallery1>
	<param name="image0" value="svetlana_01sm.jpg">
	<param name="image1" value="svetlana_02sm.jpg">
	<param name="image2" value="svetlana_03sm.jpg">
	<param name="image3" value="svetlana_04sm.jpg">
      <param name="mixers" value="ImageMixer, Burn, Butterfly, Smoke, Wipe">
      Put something here for browsers that don't understand Java
</applet>

The following parameters can be passed to Ripple:

"imagen"
This parameter is used to specify the list of images used in the slide show. The value n always starts at zero, so the parameters should be passed as image0, image1, image2 and so on.

"mixers"
These are the transition effects that will be used in the slideshow, given as a comma-separated list. Valid entries in the list are "ImageMixer" (simple cross-fade), "Burn" (irregular fade, coloured to resemble fire), "Butterfly" (expanding X fade), "Smoke" (irregular smoke-like fade) and "Wipe" (horizontal or vertical wipe). So, for instance, if you wanted to only use "Smoke" and "ImageMixer", the mixers parameter should be set to "Smoke, ImageMixer". Be careful with the capitalization of the mixer names. If you get the cases of the letters wrong, they will not work. If no mixers are specified, all mixers will be used.

"href"
If you want to use the applet as a hyperlink, then the href parameter should be set to the URL of the page you want to go to when the applet is clicked.

"target"
If the applet is being used as a link, then this is the name of the target frame it will load te page in to.

"map"
Gallery can use image maps from the page contains it. For example, if you have a <MAP...> tag in the page called "fred" then "fred" (not "#fred") is the value you should set the map parameter to.

I'd suggest you put the .jar file in the same directory as the page on which it will appear. If you want to move it elsewhere then use the "CODEBASE" option to point to the appropriate directory. Because the applet is stored in the gallery.jar archive file, you will need to add "archive=gallery.jar" into your applet statement (see gallery example code).

Troubleshooting

Why won't the applet work off my hard disk?


Some web browsers have trouble opening applets straight from a hard disk. I have noticed this happen with Internet Explorer 3 and Netscape 4. Once you have loaded the class file and the web page onto your web site you should find it works OK.

Why doesn't it open when I double-click it?


Don't! This is an applet, it is intended for use within web pages. You can't open it directly. If you try, it won't harm your computer, but neither will it show you the applet. The only way you will be able to see the applet is by inserting it into a web page (using these instructions) and then opening the web page.

Why does my web page say "Class Not Found"?


This is a very common problem. It may be because of one of the following:

  1. You have not put the .jar file onto the web site
  2. You have include a "codebase=…" clause inside your <applet…> code in your web page. "codebase=…" tells the browser to look some place else for the class file.
  3. You have include a "archive=…" clause inside your <applet…> code in your web page. "archive=…" tells the browser the name of the .jar file that the applet is stored in.
  4. Some other reason I haven't thought of :-)

Examples from the Web

Linking to my site

If you use this applet then it would be nice if you gave me a link by copying the image:

(this is the file "dglogo.gif" in the .zip archive) into the same directory as your web page and then pasting the following into your page.


    <a href="http://www.spigots.com/spigots.htm" target="_top">
    <img src="dglogo.gif"
          width=88 height=31 border=0></a>

It will put a little button on your page that will link through to my Java Spigots page.

It is only a request: feel free to omit it.

Transferring files

Remember that if you are transferring the .class file to another machine with FTP, you should set the 'binary' mode on. Failure to do so will corrupt the file and give rise to a "Class Format" error.

Contacting Me

If you still have trouble getting the applet to work and you have tried all of the possible solutions listed above, then feel to contact me, remembering to include:

  1. A precise description of the problem (do you just get a grey rectangle, or an error message etc. etc.)

  2. The URL of the page containing the applet (that's the actual page - not just the front page on your site)

These two pieces of information will make it a lot easier for me to solve the problem. I cannot guarantee that I will be able to respond to all messages (there's only so many hours in the day...) but sending the URL of a page that doesn't work will greatly increase the chances of getting an answer.

Remember to keep a look out at my web site for new applets.

David Griffiths,

29/06/2001



To advertise on spigots.com, please contact our ad agency
Privacy Statement
Last updated: Friday 29 June 2001