HelloWorldMap-Group:Jigsaw
From CS160 User Interfaces Fa06
Contents |
Hello World
Wow.
Map
We used three different map images. One for printing, one for the Swing UI, and one for testing (blank map with scale ruler).
Higher contrast map for Swing UI
Lighter for PDF printing
Blank map for testing
Source Code
RAR archive contains all source, images, README.txt and pdfs.
README.txt (also included in archive)
File Content Comments
The data/ directory contains 3 image files:
map-blank.gif - used to simplify map sheet testing, blank graphic with just the distance ruler
map-lighter.gif - used to try and create map sheet.
map-normal.gif - used by Swing UI
Implementation Comments
We added a compensation factor to the CS160MapPanel to help with accuracy in rendering the strokes in the Swing panel. Not quite sure if this is because of our printer or because of weird scaling issues.
ImageRegion has a bug where the specified name (the one that acts as a key) in the constructor is overwritten by what seems to be a description. We did not alter R3 code but adjusted the Swing code to look for this "key".
The code to calculate strokes is fairly straightforward (assuming we implemented it correctly). However, as was foreseen, set-up of the pen and printing issues, along with some confusion regarding the Swing layout and scaling factors, caused many headaches.
Features
Scale can be re-calibrated.
One path is displayed at a time.
Scale calibration mode can be toggled - we know toggles should be avoided but just working with the controls available.



