Revision 709
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/toc/TOC.java | ||
---|---|---|
41 | 41 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
42 | 42 |
import com.iver.cit.gvsig.fmap.layers.CancelationException; |
43 | 43 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
44 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
|
45 | 44 |
import com.iver.cit.gvsig.fmap.layers.LayerCollectionEvent; |
46 | 45 |
import com.iver.cit.gvsig.fmap.layers.LayerCollectionListener; |
47 | 46 |
import com.iver.cit.gvsig.fmap.layers.LayerPositionEvent; |
48 | 47 |
import com.iver.cit.gvsig.fmap.layers.LegendListener; |
49 | 48 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.Classifiable; |
49 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.LayerCollection; |
|
50 | 50 |
import com.iver.cit.gvsig.fmap.rendering.ClassifiedLegendInfo; |
51 | 51 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
52 | 52 |
import com.iver.cit.gvsig.fmap.rendering.LegendChangedEvent; |
... | ... | |
87 | 87 |
int y = e.getY(); |
88 | 88 |
int row = tree.getRowForLocation(x, y); |
89 | 89 |
TreePath path = tree.getPathForRow(row); |
90 |
FLayers layers = mapContext.getLayers();
|
|
90 |
LayerCollection layers = mapContext.getLayers();
|
|
91 | 91 |
// System.out.println(e.getSource()); |
92 | 92 |
|
93 | 93 |
if (path != null) { |
... | ... | |
101 | 101 |
// Si no, primero desactivamos temas |
102 | 102 |
if (!((e.getModifiers() & InputEvent.SHIFT_MASK) != 0)) |
103 | 103 |
{ |
104 |
layers.setActive(false);
|
|
104 |
layers.setAllActives(false);
|
|
105 | 105 |
|
106 | 106 |
} |
107 | 107 |
|
... | ... | |
237 | 237 |
* @see com.iver.cit.opensig.gui.IToc#refresh() |
238 | 238 |
*/ |
239 | 239 |
public void refresh() { |
240 |
FLayers theLayers = mapContext.getLayers();
|
|
240 |
LayerCollection theLayers = mapContext.getLayers();
|
|
241 | 241 |
m_Root.removeAllChildren(); |
242 | 242 |
m_Root.setAllowsChildren(true); |
243 | 243 |
|
... | ... | |
245 | 245 |
|
246 | 246 |
m_TreeModel.reload(); |
247 | 247 |
} |
248 |
private void doRefresh(FLayers theLayers, DefaultMutableTreeNode parentNode)
|
|
248 |
private void doRefresh(LayerCollection theLayers, DefaultMutableTreeNode parentNode)
|
|
249 | 249 |
{ |
250 | 250 |
Dimension sizeLeaf = new Dimension(m_Tree.getWidth(), 15); |
251 | 251 |
Dimension sizeBranch = new Dimension(m_Tree.getWidth(), 25); |
... | ... | |
259 | 259 |
m_TreeModel.insertNodeInto(nodeLayer, parentNode, parentNode.getChildCount()); |
260 | 260 |
TreePath path = new TreePath(m_TreeModel.getPathToRoot(nodeLayer)); |
261 | 261 |
m_Tree.makeVisible(path); |
262 |
if (lyr instanceof FLayers)
|
|
262 |
if (lyr instanceof LayerCollection)
|
|
263 | 263 |
{ |
264 |
FLayers group = (FLayers) lyr;
|
|
264 |
LayerCollection group = (LayerCollection) lyr;
|
|
265 | 265 |
doRefresh(group, nodeLayer); |
266 | 266 |
} |
267 | 267 |
else |
... | ... | |
313 | 313 |
* @see com.iver.cit.opensig.gui.toc.ITocOrderListener#orderChanged(int, int) |
314 | 314 |
*/ |
315 | 315 |
public void orderChanged(int oldPos, int newPos) { |
316 |
FLayers layers = mapContext.getLayers();
|
|
316 |
LayerCollection layers = mapContext.getLayers();
|
|
317 | 317 |
// El orden es el contrario, hay que traducir. |
318 | 318 |
// El orden es el contrario, hay que traducir. |
319 | 319 |
oldPos = layers.getLayersCount() -1 - oldPos; |
Also available in: Unified diff