org.geotools.swing
Class JCRSChooser

java.lang.Object
  extended by org.geotools.swing.JCRSChooser

public class JCRSChooser
extends java.lang.Object

This class has a single static method that shows a dialog to prompt the user to choose a coordinate reference system. The options listed are those supported by the EPSG database.

Example of use:


 CoordinateReferenceSystem crs = JCRSChooser.showDialog(
         null,  // parent component
         "Choose a projection",  // title
         "Select the CRS to re-project your data",  // message
         "EPSG:4326");  // initial selection

 if (crs != null) {
     // use the CRS...
 }
 

Since:
2.6
Version:
$Id: JCRSChooser.java 34138 2009-10-13 06:35:19Z mbedward $
Author:
Michael Bedward

Constructor Summary
JCRSChooser()
           
 
Method Summary
static org.opengis.referencing.crs.CoordinateReferenceSystem showDialog(java.awt.Component parent, java.lang.String title, java.lang.String message, java.lang.String initialSelection)
          Displays a dialog with a list of coordinate reference systems in the EPSG database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCRSChooser

public JCRSChooser()
Method Detail

showDialog

public static org.opengis.referencing.crs.CoordinateReferenceSystem showDialog(java.awt.Component parent,
                                                                               java.lang.String title,
                                                                               java.lang.String message,
                                                                               java.lang.String initialSelection)
Displays a dialog with a list of coordinate reference systems in the EPSG database.

Parameters:
parent - the parent Component; may be null
title - dialog title; if null title will be "Choose Projection"
message - dialog message; null for no message
initialSelection - the initial selection for the dialog to display (e.g. "EPSG:4326")
Returns:
a CoordinateReferenceSystem object or null if the user cancelled the dialog or a problem occurred


Copyright © 1996-2010 Geotools. All Rights Reserved.