I will look for you on IRC; I am not sure I can answer without the code in 
front of me and an understanding of the problem.

I do note that Layer has all the fire utility events that are needed:

- fireMapLayerListenerLayerChanged(int)
- fireMapLayerListenerLayerShown()
- fireMapLayerListenerLayerHidden()
- fireMapLayerListenerLayerSelected()
- fireMapLayerListenerLayerDeselected()

So my take on it is that you could add a call to these methods from the setters 
and watch it go? Indeed that is what the subclass is doing; so you may be able 
to pull up the methods...

So the bright shiny code already has references to MapLayerEvent; if you are 
hacking you could make it use an Enum rather than an int (but I would hook it 
up first).

Cheers-- 
Jody Garnett

On Thursday, 14 April 2011 at 6:13 PM, Michael Bedward wrote: 
> Hi Jody,
> 
> As per our IRC chat, I've been looking at the code for events and map
> layers in the render module. I started with the idea of just fixing
> the problem that I first noticed: ie. no event being fired when the
> visibility of a Layer changes, but after I while I decided what I'd
> prefer to do is put the cleaners through the code for version 8.0. It
> seems all wrong to have your bright, shiny Layer code mixing with the
> old event and listener code.
> 
> I'd like to create new classes: LayerEvent, LayerEventListener etc.
> aiming for a cleaner API. The existing classes (MapLayerEvent etc. )
> would be removed from trunk and deprecated in 2.7.x.
> 
> What do you think about me proceeding down that track ? I know it goes
> somewhat beyond the small patch that we talked about on IRC, but it
> would be terrifically helpful for me to get the layer-related event
> API in neater shape before returning to work on the swing module.
> 
> Michael
> 
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to