Revision 402
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/TOC.java | ||
---|---|---|
224 | 224 |
m_Root.removeAllChildren(); |
225 | 225 |
m_Root.setAllowsChildren(true); |
226 | 226 |
|
227 |
for (int i=theLayers.getChildLayerCount()-1;i>=0; i--)
|
|
227 |
for (int i=theLayers.getLayersCount()-1;i>=0; i--)
|
|
228 | 228 |
{ |
229 | 229 |
FLayer lyr = theLayers.getChildLayer(i); |
230 | 230 |
FTheme elTema = new FTheme(lyr); |
... | ... | |
259 | 259 |
if (lyr instanceof FLayers) |
260 | 260 |
{ |
261 | 261 |
FLayers group = (FLayers) lyr; |
262 |
for (int k=0; k < group.getChildLayerCount(); k++)
|
|
262 |
for (int k=0; k < group.getLayersCount(); k++)
|
|
263 | 263 |
{ |
264 | 264 |
FLayer subLayer = group.getChildLayer(k); |
265 | 265 |
FTheme elSubTema = new FTheme(subLayer); |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/layout/fframes/FFrameLegend.java | ||
---|---|---|
152 | 152 |
private int drawTheme(Graphics2D g, Rectangle2D re, double h, |
153 | 153 |
FLayers layers, int n) throws DriverIOException { |
154 | 154 |
//////Se recorren los layers dibujando el s?mbolo y su nombre sobre el graphics |
155 |
for (int i = 0; i < layers.getChildLayerCount(); i++) {
|
|
155 |
for (int i = 0; i < layers.getLayersCount(); i++) {
|
|
156 | 156 |
FLayer layer = (FLayer) layers.getChildLayer(i); |
157 | 157 |
|
158 | 158 |
if (layer instanceof FLayers) { |
... | ... | |
302 | 302 |
|
303 | 303 |
/////Aqu? hay que calcular cuantos layers y sublayers hay, para saber que distancias dejar entre uno y otro. |
304 | 304 |
///y adem?s el tama?o de cada uno de ellos para saber que anchura dejar. |
305 |
for (int i = 0; i < layers.getChildLayerCount(); i++) {
|
|
305 |
for (int i = 0; i < layers.getLayersCount(); i++) {
|
|
306 | 306 |
FLayer layer = (FLayer) layers.getChildLayer(i); |
307 | 307 |
|
308 | 308 |
if (layer.getName().length() > m_max) { |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/FOpenDialog.java | ||
---|---|---|
8 | 8 |
|
9 | 9 |
import java.awt.Color; |
10 | 10 |
import java.awt.Component; |
11 |
import java.awt.geom.Rectangle2D; |
|
12 | 11 |
import java.io.File; |
13 | 12 |
import java.util.ArrayList; |
14 | 13 |
|
... | ... | |
20 | 19 |
import javax.swing.JPanel; |
21 | 20 |
import javax.swing.filechooser.FileFilter; |
22 | 21 |
|
23 |
import com.iver.cit.gvsig.fmap.FMap; |
|
24 |
import com.iver.cit.gvsig.fmap.MapControl; |
|
25 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
|
26 | 22 |
import com.iver.cit.gvsig.gui.wms.WMSWizard; |
27 | 23 |
import com.iver.cit.gvsig.gui.wms.WizardListener; |
28 | 24 |
import com.iver.mdiApp.App; |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/DEMO/SingleView.java | ||
---|---|---|
39 | 39 |
import org.apache.log4j.Logger; |
40 | 40 |
import org.apache.log4j.PropertyConfigurator; |
41 | 41 |
|
42 |
import com.iver.cit.gvsig.fmap.MapControl; |
|
43 |
import com.iver.cit.gvsig.fmap.MapOverview; |
|
44 | 42 |
import com.iver.cit.gvsig.fmap.NewMapControl; |
45 | 43 |
import com.iver.cit.gvsig.fmap.ViewPort; |
46 | 44 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
... | ... | |
50 | 48 |
import com.iver.cit.gvsig.fmap.tools.Behavior.MoveMapTool; |
51 | 49 |
import com.iver.cit.gvsig.fmap.tools.Behavior.PointMapTool; |
52 | 50 |
import com.iver.cit.gvsig.fmap.tools.Behavior.RectangleMapTool; |
53 |
|
|
54 | 51 |
import com.iver.cit.gvsig.gui.TOC; |
55 | 52 |
import com.iver.cit.gvsig.gui.Dialogs.FInfoDialog; |
56 | 53 |
import com.iver.cit.gvsig.gui.Panels.FPanelAbout; |
... | ... | |
373 | 370 |
Point2D pReal = vp.toMapPoint(pScreen); |
374 | 371 |
|
375 | 372 |
FLayer[] sel = m_MapControl.getMapContext().getLayers().getActives(); |
376 |
/* m_MapControl.getLayers().setSelection((IFLayer[]) sel.toArray( |
|
377 |
new IFLayer[0])); */ |
|
378 | 373 |
|
379 | 374 |
// Denro de queryByPoint tenemos que separar los registros que vienen asociados a una |
380 | 375 |
// capa o a otra. Supongo que lo correcto ser?a que montaramos un XML y usar el visor |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/ViewControls.java | ||
---|---|---|
9 | 9 |
import org.apache.log4j.Logger; |
10 | 10 |
|
11 | 11 |
import com.iver.cit.gvsig.fmap.FMap; |
12 |
import com.iver.cit.gvsig.fmap.MapControl; |
|
13 | 12 |
import com.iver.cit.gvsig.fmap.NewMapControl; |
14 | 13 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
15 | 14 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
16 |
import com.iver.cit.gvsig.fmap.tools.MeasureListenerImpl; |
|
17 |
import com.iver.cit.gvsig.fmap.tools.ZoomInListenerImpl; |
|
18 |
import com.iver.cit.gvsig.fmap.tools.Behavior.MeasureMapTool; |
|
19 |
import com.iver.cit.gvsig.fmap.tools.Behavior.RectangleMapTool; |
|
20 |
import com.iver.cit.gvsig.gui.DefaultSelectionByThemeDataSource; |
|
21 | 15 |
import com.iver.cit.gvsig.gui.Encuadrator; |
22 | 16 |
import com.iver.cit.gvsig.gui.ExtentListSelectorModel; |
23 | 17 |
import com.iver.cit.gvsig.gui.FPanelExtentSelector; |
24 |
import com.iver.cit.gvsig.gui.FPanelLocConfig; |
|
25 |
import com.iver.cit.gvsig.gui.MySelectionByThemeListener; |
|
26 | 18 |
import com.iver.cit.gvsig.gui.SelectionByTheme; |
27 | 19 |
import com.iver.cit.gvsig.gui.View; |
28 | 20 |
import com.iver.cit.gvsig.project.Project; |
trunk/applications/appgvSIG/.classpath | ||
---|---|---|
20 | 20 |
<classpathentry kind="lib" path="/FMAP_v02_estable/lib/cms.jar"/> |
21 | 21 |
<classpathentry sourcepath="/gt" kind="lib" path="/FMap 03/lib/main-2.1.x.jar"/> |
22 | 22 |
<classpathentry kind="lib" path="/FMap 03/lib/geoapi-SNAPSHOT.jar"/> |
23 |
<classpathentry kind="lib" path="/FMap 03/lib/jts-1.5.jar"/> |
|
23 | 24 |
<classpathentry kind="output" path="bin"/> |
24 | 25 |
</classpath> |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/demo/ImageFrame.java | ||
---|---|---|
19 | 19 |
import com.iver.cit.gvsig.fmap.layers.ChildrenNotAllowedException; |
20 | 20 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
21 | 21 |
import com.iver.cit.gvsig.fmap.layers.LayerFactory; |
22 |
import com.iver.cit.gvsig.fmap.layers.LayerPath; |
|
23 | 22 |
import com.iver.cit.gvsig.fmap.layers.ProjectionMismatchException; |
24 | 23 |
import com.iver.cit.gvsig.fmap.rendering.LegendFactory; |
25 | 24 |
import com.iver.cit.gvsig.fmap.tools.AreaListenerImpl; |
... | ... | |
111 | 110 |
l3.setLegend(LegendFactory.createUniqueSymbolLegend(pointSym, null, null, null)); |
112 | 111 |
|
113 | 112 |
try { |
114 |
jPanel.getMapContext().getLayers().addLayer(new LayerPath(), l2); |
|
115 |
jPanel.getMapContext().getLayers().addLayer(new LayerPath(), |
|
116 |
l3); |
|
113 |
jPanel.getMapContext().getLayers().addLayer(l2); |
|
114 |
jPanel.getMapContext().getLayers().addLayer(l3); |
|
117 | 115 |
l3.getSource().start(); |
118 | 116 |
jPanel.getMapContext().getViewPort().setExtent(l3.getFullExtent()); |
119 | 117 |
l3.getSource().stop(); |
... | ... | |
172 | 170 |
|
173 | 171 |
break; |
174 | 172 |
} |
175 |
} catch (ProjectionMismatchException e) { |
|
176 |
e.printStackTrace(); |
|
177 |
} catch (ChildrenNotAllowedException e) { |
|
178 |
e.printStackTrace(); |
|
179 | 173 |
} catch (CancelationException e) { |
180 | 174 |
// TODO Auto-generated catch block |
181 | 175 |
e.printStackTrace(); |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/LayerPathOld.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
package com.iver.cit.gvsig.fmap.layers; |
|
3 |
|
|
4 |
import java.util.ArrayList; |
|
5 |
|
|
6 |
|
|
7 |
/** |
|
8 |
* Representa una capa en el arbol de capas |
|
9 |
*/ |
|
10 |
public class LayerPathOld { |
|
11 |
private LayerPathOld parent = null; |
|
12 |
|
|
13 |
/** |
|
14 |
* Crea un nuevo LayerPath vac?o |
|
15 |
*/ |
|
16 |
public LayerPathOld() { |
|
17 |
} |
|
18 |
|
|
19 |
/** |
|
20 |
* Crea un nuevo LayerPath que referencia a un hijo |
|
21 |
* del elemento referenciado por el LayerPath que se |
|
22 |
* pasa como par?metro |
|
23 |
* |
|
24 |
* @param parent |
|
25 |
* @param index DOCUMENT ME! |
|
26 |
*/ |
|
27 |
public LayerPathOld(LayerPathOld parent, int index) { |
|
28 |
path = new ArrayList(parent.path); |
|
29 |
path.add(new Integer(index)); |
|
30 |
} |
|
31 |
|
|
32 |
/** |
|
33 |
* Elimina el primer elemento del path y devuelve el ?ndice de la FLayer |
|
34 |
* que representa |
|
35 |
* |
|
36 |
* @return DOCUMENT ME! |
|
37 |
*/ |
|
38 |
public int popIndex() { |
|
39 |
return ((Integer) path.remove(0)).intValue(); |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* Obtiene el n?mero de elementos del path |
|
44 |
* |
|
45 |
* @return DOCUMENT ME! |
|
46 |
*/ |
|
47 |
public boolean isEmpty() { |
|
48 |
return path.isEmpty(); |
|
49 |
} |
|
50 |
|
|
51 |
/** |
|
52 |
* Devuelve el ?ndice del ?ltimo elemento del path |
|
53 |
* |
|
54 |
* @return DOCUMENT ME! |
|
55 |
*/ |
|
56 |
public int getLastIndex() { |
|
57 |
return ((Integer) path.get(path.size() - 1)).intValue(); |
|
58 |
} |
|
59 |
|
|
60 |
public LayerPathOld getParent(){ |
|
61 |
LayerPathOld ret = new LayerPathOld(); |
|
62 |
if (path.size() <=1) return null; |
|
63 |
|
|
64 |
ret.path = new ArrayList(path.subList(0, path.size()-1)); |
|
65 |
return ret; |
|
66 |
} |
|
67 |
public int getFirstIndex(){ |
|
68 |
if (path.size() == 0) return -1; |
|
69 |
return ((Integer)path.get(0)).intValue(); |
|
70 |
} |
|
71 |
public LayerPathOld getChildPath(){ |
|
72 |
LayerPathOld lp=new LayerPathOld(); |
|
73 |
lp.path=new ArrayList(path.subList(1,path.size())); |
|
74 |
return lp; |
|
75 |
} |
|
76 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLayers.java | ||
---|---|---|
124 | 124 |
} |
125 | 125 |
} |
126 | 126 |
|
127 |
return (FLayer[]) array.toArray();
|
|
127 |
return (FLayer[])array.toArray(new FLayer[0]);
|
|
128 | 128 |
} |
129 | 129 |
|
130 | 130 |
/** |
... | ... | |
133 | 133 |
* @return DOCUMENT ME! |
134 | 134 |
*/ |
135 | 135 |
public FLayer[] getActives() { |
136 |
ArrayList array = new ArrayList();
|
|
136 |
ArrayList ret = new ArrayList();
|
|
137 | 137 |
|
138 |
for (Iterator iter = layers.iterator(); iter.hasNext();) {
|
|
139 |
if (((FLayer) iter.next()).isActive()) {
|
|
140 |
array.add((FLayer) iter.next());
|
|
138 |
for (int i = 0; i < layers.size(); i++) {
|
|
139 |
if (((FLayer) layers.get(i)).isActive()) {
|
|
140 |
ret.add(layers.get(i));
|
|
141 | 141 |
} |
142 | 142 |
} |
143 | 143 |
|
144 |
return (FLayer[]) array.toArray(new FLayer[0]); |
|
144 |
return (FLayer[])ret.toArray(new FLayer[0]); |
|
145 |
|
|
145 | 146 |
} |
146 | 147 |
|
147 | 148 |
/** |
... | ... | |
162 | 163 |
* @return DOCUMENT ME! |
163 | 164 |
*/ |
164 | 165 |
public int getLayersCount() { |
165 |
int all = 0;
|
|
166 |
return layers.size(); }
|
|
166 | 167 |
|
167 |
for (int i = 0; i < layers.size(); i++) { |
|
168 |
all++; |
|
169 |
} |
|
170 |
|
|
171 |
return all; |
|
172 |
} |
|
173 |
|
|
168 |
|
|
174 | 169 |
/** |
175 |
* Obtiene el n?mero de hijos que penden de este nodo del ?rbol de capas |
|
176 |
* |
|
177 |
* @return DOCUMENT ME! |
|
178 |
*/ |
|
179 |
public int getChildLayerCount() { |
|
180 |
return layers.size(); |
|
181 |
} |
|
182 |
|
|
183 |
/** |
|
184 | 170 |
* DOCUMENT ME! |
185 | 171 |
* |
186 | 172 |
* @param xe DOCUMENT ME! |
Also available in: Unified diff