[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] Layer Selection vs Current Layer
|
M.S.Bachler wrote:
Hi!
"Perhaps getting interested views to ask the Map for a selection manger
tracking the selected view"
I think that is the sort of thing I had expected.
So when I set the selected layer using:
((EditManager)map.getEditManager()).setSelectedLayer(layer);
I expected the layer to be selected in the Layer View (which it now is
thanks to Jesse), and the Selection View to refresh displaying the
correct data.
I thought the setSelectedLayer method would fire a layer changed event
or something, and all the relevant bits would respond appropriatly.
I am afraid the add/remove listener model does not always match with
what is needed. Did you
read the article I was talking about?
- http://www.eclipse.org/articles/Article-WorkbenchSelections/article.html
We actually have two things going on here:
- we would like user interfaces to be able to respond to a layer (or
georesource) whenever it is selected
(in say either the Layers view or Projects view). This is the subject of
the above article, they have a single SelectionService for the entire
window and each view/editor only gets to control it when that view is
active.
- some views may want to ignore the workbench and focus on the current
Map (if there is a current map),
I am not sure if the Map keeps a "selected layer" right now, but if it
does you can "listen to it" using a EMF
adapter.
So you have a trade off, do you want to work against the idea of a Layer,
or explicitly against the layer selected in the current Map? This is
something
to be considered for each and every view ...
Jody