Class apps.ADILBrowser.ADILViewerApplet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class apps.ADILBrowser.ADILViewerApplet

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----apps.ADILBrowser.ADILViewerApplet

public class ADILViewerApplet
extends Applet
An applet for browsing GIF preview images from the NCSA Astronomy Digital Image Library (ADIL).

The ADIL is an on-line library of astronomical images in FITS format. For every FITS image in the Library there is a preview GIF version available for browsing over the Web. In general, these preview images download more quickly than their FITS counterparts. The ADIL also provides access to the FITS headers separately. This applet allows users to browse a preview image and its related header. Through use of the ADILViewer, users may:

the Applet Interface

This applet contains one visual component: ncsa.horizon.viewer.ADILViewer. This viewer provides two display areas side-by-side. The left side displays a scaled version of the requested slice. The right side displays zoomed version of the image. Clicking positions in the left display will cause a new zoomed image to appear in the right display centered over the selected pixel. The user may control how much the right image is zoomed via buttons along the bottom of the viewer panel. The user may optionally choose "Region" zooming which allows a box to be drawn in the left display, representing the region to be shown in the right display. The coordinate positions corresponding to the pixel below the mouse are displayed as the mouse is moved about within either display. Users may display the image's text header by clicking on the header button.

Using the Applet within an HTML Document

Although this applet was developed for use with the ADIL, the data it displays need not originate from the ADIL's Web server. The information needed to download the data are passed to the applet from the HTML document via the following parameters:

URLbase
the base URL to be used for obtaining the data specified by imgFile, header1, and header2. This should not end in a forward slash.

imgFile
the filename of the GIF or JPEG preview image. This file will be downloaded to the applet via a URL formed by appending a slash to the URLbase parameter followed by this filename.

header1
the filename containing the header text. If this parameter is set, the file is downloaded (prior to downloading the preview image) via a URL formed by appending a slash to the URLbase parameter followed by this filename.

If downloaded successfully, the header is parsed for coordinate information assuming a modified FITS header format. This format differs from standard FITS header format in that linefeeds appear at the end of every 80-character card-record. (Eventually, this applet will be trained to take the standard format as well.)

header2
a second (optional) file containing additional header information. If this parameter is set, the file is downloaded only if and when the user clicks the "Header" button for the first time. The file is downloaded via a URL formed by appending a slash to the URLbase parameter followed by this filename.

This parameter is provided because the ADIL keeps the keyword and the "HISTORY" portions of the header in seperate files; thus, this parameter is used to specify the HISTORY portion. When the header is displayed, this text is appended to the text specified by the header1 parameter.

headerButtonText
the text to display on the header display request button. If not specified, the default "FITS Header Text" is printed on the button.

Of the above parameters, only URLbase and imgFile are required.

Variable Index

 o browseButton
 o data
 o fileDialog
 o getURL
 o hdr1
 o hdrldr
 o hdrURL1
 o hdrURL2
 o imageLoader
 o isApplet
 o URLentry
 o viewer

Constructor Index

 o ADILViewerApplet()
 o ADILViewerApplet(boolean)

Method Index

 o action(Event, Object)
 o getCoordSys(URL)
 o init()
 o main(String[])
 o newViewable(String, boolean)

Variables

 o viewer
  protected ADILViewer viewer
 o data
  protected AVAp_Viewable data
 o isApplet
  protected boolean isApplet
 o imageLoader
  protected Thread imageLoader
 o hdrldr
  protected AVAp_HeaderLoader hdrldr
 o getURL
  protected AVAp_Button getURL
 o URLentry
  protected TextField URLentry
 o browseButton
  protected AVAp_Button browseButton
 o fileDialog
  protected FileDialog fileDialog
 o hdrURL1
  protected URL hdrURL1
 o hdrURL2
  protected URL hdrURL2
 o hdr1
  protected String hdr1

Constructors

 o ADILViewerApplet
  public ADILViewerApplet()
 o ADILViewerApplet
  public ADILViewerApplet(boolean isApplet)

Methods

 o init
  public void init()
Overrides:
init in class Applet
 o getCoordSys
  public CoordinateSystem getCoordSys(URL header)
 o main
  public static void main(String args[])
 o action
  public boolean action(Event event,
                        Object obj)
Overrides:
action in class Component
 o newViewable
  public void newViewable(String urlstr,
                          boolean gethdr)

All Packages  Class Hierarchy  This Package  Previous  Next  Index