Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] animation advice

2 things.

1. You can create a LayerAddedInterceptor extension to detect when your layer is added to a map... I think it is also called when the map is loaded but I may be wrong. So maybe you should create a MapOpening interceptor that adds the listener I'm going to discuss in point 2. 2. You can add a listener to the edit manager to listen to the currently selected layer. and starrt/stop the timer based on that.

Jesse

On 28-Oct-06, at 6:33 AM, Andy Czerwonka wrote:

I've spawned a thread that basically tell's the animation layer to refresh in a Display#asyncExec(...). The MapGraphic#draw method knows what do draw, so off it goes. The trouble I'm having is with the lifecycle of the thread. Given that layers are persisted, I'd like to spawn it when the animation layer is selected and interrupt it when it isn't. So, to make that happen, I need to figure our how to create a specific layer (my subclass or Layer) from the Map#getLayerFactory(). Otherwise, I'm not sure how to get the
layer lifecycle.

Does anyone have an opinion if I'm going down the right path?



_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top