Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] SelectionListener Problem

If you select a feature with the edit tool it is possible that it doesn't fire a selection event.  I think I changed this for RC11.  

Jesse

On Aug 10, 2007, at 7:20 AM, Lucas, Michael wrote:

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@xxxxxxxxxxxxxxxxxxxxx [mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] 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)

_______________________________________________
User-friendly Desktop Internet GIS (uDig)


Back to the top