| This example highlights the importance of background tasks by
downloading some very large Mars rover images from JPL's
photojournal web site. There are about a dozen images, most with
10-15M pixels. Clicking the next/prev buttons (or control-N,P)
cancels the current download and starts loading a new image. The
stop button also cancels the current download. The list of images
is defined in the startup() method. The first image is shown by
the application's ready() method.
More images of Mars can be found here:
http://photojournal.jpl.nasa.gov/target/Mars. Some of the
MER images are quite large (like this 22348x4487 whopper,
http://photojournal.jpl.nasa.gov/jpeg/PIA06917.jpg) and can't
be loaded without reconfiguring the Java heap parameters.
This file contains the main class of the application. It extends the
Swing Application Framework's
SingleFrameApplication class
and therefore takes care or simplifies things like
loading resources and saving the session state.
This class calls the
MarsRoverViewerView class, which
contains the code for constructing the user interface and
much of the application logic.
|