[udig-devel] SelectionListener Problem

Lucas, Michael lucas_michael at bah.com
Fri Aug 10 07:20:11 PDT 2007


I am having a similar problem, I tried to instantiate an ILayerListener
in my plugin and tried to trap the selection event with the following
statement: 

if(event.getType()==LayerEvent.EventType.FILTER)

But, when selecting a feature, the listener code never seems to be
executing.  Is there anything else I need to do to plug the listener
into uDig so it picks up the selection event?  Or is there any sample
code out there that listens for selection tool events?

thanks!

-Mike


________________________________

From: udig-devel-bounces at lists.refractions.net
[mailto:udig-devel-bounces at lists.refractions.net] On Behalf Of Jesse
Eichar
Sent: Wednesday, July 25, 2007 11:55 AM
To: User-friendly Desktop Internet GIS
Subject: Re: [udig-devel] SelectionListener Problem 


Hi, 

The selection listener API hasn't been fully integrated with the rest of
the platform yet.  So you have to use ILayerListeners and listen for
Filter events.  When something is selected the filter that represents
that selection is set on the layer where the selection occurred.  That
layer is typically the currently selected layer so you can either listen
to all layers or have a IEditManagerListener that listens to layer
selection events and retargets your listener each time the selected
layer changes.

Jesse


On Jul 25, 2007, at 3:17 AM, Robineau Peter wrote:


	Hi,
	 
	is there a way to track selection of features in a layer?
	I want to do some operations in a plugin when a new feature is
selected...
	 
	Is there an easy-to-handle listener comparable with the
ShellListener? Just found SelectionListener (okay, sounds good...), 
	but don't know how to handle it properly.... 
	 
	 
	thanks a lot,
	 
	Peter  
	 
	_______________________________________________
	User-friendly Desktop Internet GIS (uDig)
	http://udig.refractions.net
	http://lists.refractions.net/mailman/listinfo/udig-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20070810/806a0dd4/attachment.html


More information about the udig-devel mailing list