Applets (developed with the Java computer language created by Sun Microsystems) are embedded within the HTML script of a web page as an <applet>...</applet> tag. There are a number of attributes you can specify as part of applet tags that are defined within HTML, and a number of parameters you can specify within the two tags which are used in ChView. Although the following exposition is not intended to be a complete reference to the variety of parameters that HTML defines for <applet>, it covers the basic ones useful in ChView.
This is pretty much a required tag. It is the Java class file that is executed to run the applet. For ChView applets, this will always be chview.ChViewer. So you would write something like:
<applet code="chview.ChViewer"> ... </applet>
In reality, the actual code for ChView is spread amongst innumerable .class files, which would be a pain to deploy. Fortunately, Java allows those files to be all wrapped up in a single Java Archive file, better known as a "jar" file. (For those interested in etymology, jar, java-archive, derives from "tar", tape-archview, a Unix command now used for much more than archiving tapes.) A Jar file is just like a ZIP file and so you can use PKZIP or WINZIP to view it.
ChView is distributed in a jar file called chview.jar. (It pays not to be imaginative in such things.) This is specified to the archive parameter, like so:
<applet archive="chview.jar"> ... </applet>
Another equivalent was is using a cab file, which you would specify with a cabinets attribute. However, because Microsoft invented this, cab files only work for Internet Explorer, and so we are only distributing ChView as a jar file ("chview.jar"). (It does, of course, beg the question: "Why did Microsoft bother doing something just the same?", but that is beyond the scope of this documentation, and we'll leave it up to the judical inquiries.
Normally, we assign "ChViewer" to id like this:
<applet id="ChViewer"> ... </applet>
This describes what part of the applet to align on, for example: "left", "right", "bottom" and other fairly obvious options are available. Normally, ChView is assigned to "middle" this, like this:
<applet align="middle"> ... </applet>
This describes the amount of physical space the applet will take up, so that ChView will scale to whatever size you give it. Hence, you can have a big spread for a full page, or a long thin one for a navagational bar.
<applet height="440" width="440"> ... </applet>
So, all put together, your basic applet ends up looking something like this in HTML:
<applet code="chview.ChViewer" archive="chview.jar" id="ChViewer" align="middle" width="640" height="160"> ... </applet>
And renders like:
Note how there isn't actually anything in view. That's because we haven't added any data yet. We'll cover that in the next section on Adding Stars.
© 1998-2001 Sol Company. All Rights Reserved. Any other trademarks appearing on this website are the property of their respective owners. Unless explicitly stated, SolStation.com and the Sol Company do not imply any business relationship with Earth-based institutions.