/** * GISViewer.java Shapefile Viewer version 0.2 * Neil Moomey, www.neilmoomey.com * Please read the Readme file for instructions. **/ import java.awt.*; import java.awt.event.*; import java.net.*; import java.io.*; import uk.ac.leeds.ccg.geotools.*; import uk.ac.leeds.ccg.widgets.ToolBar; /** * A Shapefile Viewer */ public class GISViewer extends Frame { Viewer view = new Viewer(); GISViewer(String[] args){ setLayout(new BorderLayout()); add(view,"Center"); ToolBar tools = new ToolBar(view); //add the toolbar add(tools,"South"); System.out.println("\n*************************************************************************\n"); try{ for (int i=0; i \n"); System.out.println("Note: Shapefile extensions must be all lower case but "); System.out.println("don't include the extension. You can also point to a "); System.out.println("zip file if the shapefile inside has the same name.\n"); System.out.println("Example: java GISViewer C:\\gisdata\\countries C:\\gisdata\\cities"); System.out.println("where countries.zip and cities.zip contain the shapefile data or"); System.out.println("java http://www.neilmoomey.com/software/GISViewer/data/countries http://www.neilmoomey.com/software/GISViewer/data/cities"); System.out.println("*********************************************************\n"); System.exit(0); } GISViewer frame = new GISViewer(args); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } public void windowActivated(WindowEvent e) { } public void windowOpened(WindowEvent e) { } }); } }