svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / layers / layerOperations / LayerCollection.java @ 6311
History | View | Annotate | Download (4.1 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package com.iver.cit.gvsig.fmap.layers.layerOperations; |
42 |
|
43 |
import com.iver.cit.gvsig.fmap.layers.CancelationException; |
44 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
45 |
import com.iver.cit.gvsig.fmap.layers.LayerCollectionListener; |
46 |
|
47 |
|
48 |
/**
|
49 |
* Interfaz que implementan todas las capas que pueden ser colecci?n de otras.
|
50 |
*/
|
51 |
public interface LayerCollection { |
52 |
/**
|
53 |
* A?ade un listener de los eventos de la colecci?n de capas
|
54 |
*
|
55 |
* @param listener LayerCollectionListener.
|
56 |
*/
|
57 |
public void addLayerCollectionListener(LayerCollectionListener listener); |
58 |
|
59 |
/**
|
60 |
* ELimina un listener de los eventos de la colecci?n de capas
|
61 |
*
|
62 |
* @param listener LayerCollectionListener.
|
63 |
*/
|
64 |
public void removeLayerCollectionListener(LayerCollectionListener listener); |
65 |
|
66 |
/**
|
67 |
* A?ade una capa al final de la lista de subcapas
|
68 |
*
|
69 |
* @param layer FLayer.
|
70 |
*
|
71 |
* @throws CancelationException
|
72 |
*/
|
73 |
public void addLayer(FLayer layer) throws CancelationException; |
74 |
|
75 |
/**
|
76 |
* Mueve una capa de la posici?n from a la posici?n to. (Se supone que
|
77 |
* est?n dentro del mismo nivel). Para mover entre niveles, usar otro
|
78 |
* m?todo (por hacer)
|
79 |
*
|
80 |
* @param from origen.
|
81 |
* @param to destino.
|
82 |
*
|
83 |
* @throws CancelationException
|
84 |
*/
|
85 |
public void moveTo(int from, int to) throws CancelationException; |
86 |
|
87 |
/**
|
88 |
* Borra un FLayer a partir del objeto FLayer que se pasa como par?metro.
|
89 |
*
|
90 |
* @param lyr Layer a borrar.
|
91 |
*
|
92 |
* @throws CancelationException
|
93 |
*/
|
94 |
public void removeLayer(FLayer lyr) throws CancelationException; |
95 |
|
96 |
/**
|
97 |
* Borra una FLayer del vector a partir del identificador.
|
98 |
*
|
99 |
* @param idLayer
|
100 |
*/
|
101 |
public void removeLayer(int idLayer); |
102 |
|
103 |
/**
|
104 |
* M?todo de conveniencia para borrar una capa con ese nombre
|
105 |
*
|
106 |
* @param layerName
|
107 |
*/
|
108 |
public void removeLayer(String layerName); |
109 |
|
110 |
/**
|
111 |
* Obtiene el array de capas visibles que penden del arbol cuya ra?z es
|
112 |
* este nodo
|
113 |
*
|
114 |
* @return Array capas visibles.
|
115 |
*/
|
116 |
public FLayer[] getVisibles(); |
117 |
|
118 |
/**
|
119 |
* Obtiene el array de capas activas en el sub?rbol que pende de este nodo
|
120 |
*
|
121 |
* @return Array capas activas.
|
122 |
*/
|
123 |
public FLayer[] getActives(); |
124 |
|
125 |
/**
|
126 |
* Obtiene el hijo i-?simo directo de esta colecci?n
|
127 |
*
|
128 |
* @param index ?ndice de la capa.
|
129 |
*
|
130 |
* @return FLayer.
|
131 |
*/
|
132 |
public FLayer getLayer(int index); |
133 |
|
134 |
/**
|
135 |
* M?todo de conveniencia para buscar una capa por su nombre Es conveniente
|
136 |
* usar getLayer(int) siempre que se pueda, es m?s directo.
|
137 |
*
|
138 |
* @param layerName Nombre de la capa.
|
139 |
*
|
140 |
* @return FLayer.
|
141 |
*/
|
142 |
public FLayer getLayer(String layerName); |
143 |
|
144 |
/**
|
145 |
* Obtiene el n?mero de capas que hay en su mismo nivel Es decir, no cuenta
|
146 |
* las subcapas de un FLayers
|
147 |
*
|
148 |
* @return N?mero de capas.
|
149 |
*/
|
150 |
public int getLayersCount(); |
151 |
|
152 |
/**
|
153 |
* Pone todas las capas a activas o inactivas.
|
154 |
*
|
155 |
* @param active boolean.
|
156 |
*/
|
157 |
public void setAllActives(boolean active); |
158 |
|
159 |
/**
|
160 |
* Pone todas las capas a visibles o invisibles.
|
161 |
*
|
162 |
* @param visible boolean.
|
163 |
*/
|
164 |
public void setAllVisibles(boolean visible); |
165 |
} |