Javier Sánchez Ramírez wrote:
I am new with uDgi, but at least I´m managing to extend certain functionallity. 
The problem we are facing lately is that We don´t know which is supposed to be 
the best way to manage the uDig action buttons availability, that is to say, 
how to enable/disable certain buttons in response to application events. We 
know how to do it with our extended action buttons through listeners, but don´t 
know how to do it with the existing ones. We are missing a way to 
enable/disable uDig buttons...
I am not sure I understand? The action buttons should actually just be the view/controller for an Action? Changing the enabled state of the action will broadcast the enabled/state to all listeners (including the menu items, toolbar buttons, view menu items, context menus items and so on ....).

I can't imagine you are doing things differently, so is your question really about set up application events for your Actions to listen to?

If so you can consider placing your "ApplicationController" on the map blackboard, your tools and view can check the current map, and if there is one of your "ApplicationController" objects you can then start listening...

When the map changes you need to change who you are listening to... it would be nice to set up this much as a MapView that people can extend ...

If you are brave you can get into EMF and start making use of its event model, in which case your listeners would be able to listen to all EMF events in one go, and then filter out that which is not of interest to them.

Jody

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

Reply via email to