org.geotools.demo
Class SelectionLab

java.lang.Object
  extended by org.geotools.demo.SelectionLab

public class SelectionLab
extends java.lang.Object

In this example we create a map tool to select a feature clicked with the mouse. The selected feature will be painted yellow.


Constructor Summary
SelectionLab()
           
 
Method Summary
 void displaySelectedFeatures(java.util.Set<org.opengis.filter.identity.FeatureId> IDs)
          Sets the display to paint selected features yellow and unselected features in the default style.
 void displayShapefile(java.io.File file)
          This method connects to the shapefile; retrieves information about its features; creates a map frame to display the shapefile and adds a custom feature selection tool to the toolbar of the map frame.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionLab

public SelectionLab()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

displayShapefile

public void displayShapefile(java.io.File file)
                      throws java.lang.Exception
This method connects to the shapefile; retrieves information about its features; creates a map frame to display the shapefile and adds a custom feature selection tool to the toolbar of the map frame.

Throws:
java.lang.Exception

displaySelectedFeatures

public void displaySelectedFeatures(java.util.Set<org.opengis.filter.identity.FeatureId> IDs)
Sets the display to paint selected features yellow and unselected features in the default style.

Parameters:
IDs - identifiers of currently selected features


Copyright © 1996-2010 Geotools. All Rights Reserved.