svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.fmap.control / src / main / java / org / gvsig / fmap / mapcontrol / CompoundLayersTreeModel.java @ 45535
History | View | Annotate | Download (586 Bytes)
1 | 42651 | jjdelcerro | package org.gvsig.fmap.mapcontrol; |
---|---|---|---|
2 | |||
3 | import org.gvsig.fmap.mapcontext.layers.FLayers; |
||
4 | |||
5 | |||
6 | 42657 | jjdelcerro | public class CompoundLayersTreeModel extends LayersTreeModel { |
7 | 42651 | jjdelcerro | |
8 | public CompoundLayersTreeModel() {
|
||
9 | 42657 | jjdelcerro | super(new FLayers()); |
10 | 42651 | jjdelcerro | } |
11 | |||
12 | public void addLayers(FLayers layers) { |
||
13 | 45535 | fdiaz | try {
|
14 | FLayers lyrs = layers.cloneLayer(); |
||
15 | lyrs.setMapContext(null);
|
||
16 | this.layers.add(lyrs);
|
||
17 | } catch (Exception ex) { |
||
18 | throw new RuntimeException("Can't add layers to model", ex); |
||
19 | } |
||
20 | 42651 | jjdelcerro | } |
21 | } |