The MIDlet loads a preset picture on the device screen and scrolls it across the screen according to the device's orientation. The picture used in the MIDlet is a 360 degree panorama loop that wraps around horizontally. The picture is provided courtesy of www.roundus.com, where you can find other similar pictures. The following figure shows the panorama loop of the MIDlet.
Figure: Cottage360 panorama loop
The MIDlet consists of two classes:
Cottage360—MIDlet main class, which displays the picture and opens a sensor connection.
PanoramaCanvas—Determines whether the picture is in portrait or landscape orientation and calculates the picture scrolling from the orientation changes of the device. The class also allows you to traverse the picture with arrow key presses.
For instructions on how to implement the MIDlet, see section Implementation.