svn-gvsig-desktop / tags / v1_1_Build_1014 / libraries / libFMap / src / com / iver / cit / gvsig / fmap / layers / layerOperations / LayerCollection.java @ 13593
History | View | Annotate | Download (5.15 KB)
1 | 1100 | fjp | /* 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 | 562 | fernando | 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 | 1005 | vcaballero | /**
|
48 | 13116 | ppiqueras | * <p>Interface with methods of a collection of layers.</p>
|
49 | 1005 | vcaballero | */
|
50 | 562 | fernando | public interface LayerCollection { |
51 | /**
|
||
52 | 13014 | ppiqueras | * Adds a listener about the events produced on a layers collection.
|
53 | 562 | fernando | *
|
54 | 13014 | ppiqueras | * @param listener a <code>LayerCollectionListener</code>
|
55 | 13483 | ppiqueras | *
|
56 | * @see #removeLayerCollectionListener(LayerCollectionListener)
|
||
57 | 562 | fernando | */
|
58 | public void addLayerCollectionListener(LayerCollectionListener listener); |
||
59 | |||
60 | /**
|
||
61 | 13014 | ppiqueras | * Removes a listener about the events produced on a layers collection.
|
62 | 562 | fernando | *
|
63 | 13014 | ppiqueras | * @param listener a <code>LayerCollectionListener</code>
|
64 | 13483 | ppiqueras | *
|
65 | * @see #addLayerCollectionListener(LayerCollectionListener)
|
||
66 | 562 | fernando | */
|
67 | public void removeLayerCollectionListener(LayerCollectionListener listener); |
||
68 | |||
69 | /**
|
||
70 | 13106 | ppiqueras | * Adds a layer at the end of the layers list.
|
71 | 562 | fernando | *
|
72 | 13014 | ppiqueras | * @param layer a layer
|
73 | 562 | fernando | *
|
74 | 13014 | ppiqueras | * @throws CancelationException any exception produced during the cancellation of the driver.
|
75 | 13483 | ppiqueras | *
|
76 | * @see #removeLayer(FLayer)
|
||
77 | * @see #removeLayer(int)
|
||
78 | * @see #removeLayer(String)
|
||
79 | 562 | fernando | */
|
80 | public void addLayer(FLayer layer) throws CancelationException; |
||
81 | |||
82 | /**
|
||
83 | 13139 | ppiqueras | * <p>Moves a layer of the collection to another position in internal list. It does not consider subnodes.</p>
|
84 | 562 | fernando | *
|
85 | 13014 | ppiqueras | * @param from origin position
|
86 | * @param to destination position
|
||
87 | 562 | fernando | *
|
88 | 13014 | ppiqueras | * @throws CancelationException any exception produced during the cancellation of the driver.
|
89 | 562 | fernando | */
|
90 | public void moveTo(int from, int to) throws CancelationException; |
||
91 | |||
92 | /**
|
||
93 | 13106 | ppiqueras | * Removes a layer from the collection.
|
94 | 562 | fernando | *
|
95 | 13014 | ppiqueras | * @param lyr a layer
|
96 | 562 | fernando | *
|
97 | 13014 | ppiqueras | * @throws CancelationException any exception produced during the cancellation of the driver.
|
98 | 13483 | ppiqueras | *
|
99 | * @see #removeLayer(int)
|
||
100 | * @see #removeLayer(String)
|
||
101 | * @see #addLayer(FLayer)
|
||
102 | 562 | fernando | */
|
103 | public void removeLayer(FLayer lyr) throws CancelationException; |
||
104 | |||
105 | /**
|
||
106 | 13014 | ppiqueras | * Removes a layer using its identifier.
|
107 | 562 | fernando | *
|
108 | 13014 | ppiqueras | * @param idLayer layer id
|
109 | 13483 | ppiqueras | *
|
110 | * @see #removeLayer(FLayer)
|
||
111 | * @see #removeLayer(String)
|
||
112 | * @see #addLayer(FLayer)
|
||
113 | 562 | fernando | */
|
114 | public void removeLayer(int idLayer); |
||
115 | |||
116 | /**
|
||
117 | 13014 | ppiqueras | * Removes a layer using its name.
|
118 | 562 | fernando | *
|
119 | 13014 | ppiqueras | * @param layerName the name of the layer
|
120 | 13483 | ppiqueras | *
|
121 | * @see #removeLayer(FLayer)
|
||
122 | * @see #removeLayer(int)
|
||
123 | * @see #addLayer(FLayer)
|
||
124 | 562 | fernando | */
|
125 | public void removeLayer(String layerName); |
||
126 | |||
127 | /**
|
||
128 | 13106 | ppiqueras | * Returns an array with all visible layers in this collection.
|
129 | 562 | fernando | *
|
130 | 13014 | ppiqueras | * @return array with layers, or <code>null</code> if no there is no layer visible
|
131 | 13483 | ppiqueras | *
|
132 | * @see #setAllVisibles(boolean)
|
||
133 | 562 | fernando | */
|
134 | public FLayer[] getVisibles(); |
||
135 | |||
136 | /**
|
||
137 | 13106 | ppiqueras | * Returns an array with all active layers in this collection.
|
138 | 562 | fernando | *
|
139 | 13014 | ppiqueras | * @return array with layers, or <code>null</code> if no there is no layer active
|
140 | 13483 | ppiqueras | *
|
141 | * @see #setAllActives(boolean)
|
||
142 | 562 | fernando | */
|
143 | public FLayer[] getActives(); |
||
144 | |||
145 | /**
|
||
146 | 13014 | ppiqueras | * Returns the ith-output directed son (from bottom up) of this collection.
|
147 | 562 | fernando | *
|
148 | 13106 | ppiqueras | * @param index index of the ith-output layer in this collection.
|
149 | 562 | fernando | *
|
150 | 13014 | ppiqueras | * @return a layer
|
151 | 13483 | ppiqueras | *
|
152 | * @see #getLayer(String)
|
||
153 | 562 | fernando | */
|
154 | public FLayer getLayer(int index); |
||
155 | |||
156 | /**
|
||
157 | 13014 | ppiqueras | * Returns a directed son layer of this collection, using its name.
|
158 | 562 | fernando | *
|
159 | 13106 | ppiqueras | * @param layerName name of a layer of this collection
|
160 | 562 | fernando | *
|
161 | 13483 | ppiqueras | * @return a layer
|
162 | *
|
||
163 | * @see #getLayer(int)
|
||
164 | 562 | fernando | */
|
165 | public FLayer getLayer(String layerName); |
||
166 | |||
167 | /**
|
||
168 | 13014 | ppiqueras | * <p>Returns the number of layers that are at the same level as this one.</p>
|
169 | *
|
||
170 | 13106 | ppiqueras | * <p>Doesn't counts the sublayers of a <code>FLayers</code> node object.</p>
|
171 | 562 | fernando | *
|
172 | 13014 | ppiqueras | * @return number >= 0 with layers that are at the same level
|
173 | 13483 | ppiqueras | *
|
174 | * @see #getLayer(int)
|
||
175 | * @see #getLayer(String)
|
||
176 | 562 | fernando | */
|
177 | public int getLayersCount(); |
||
178 | 708 | fernando | |
179 | /**
|
||
180 | 13058 | ppiqueras | * Changes the status of all layers to active or inactive.
|
181 | 1005 | vcaballero | *
|
182 | 13014 | ppiqueras | * @param active the boolean to be set
|
183 | 13483 | ppiqueras | *
|
184 | * @see #getActives()
|
||
185 | 708 | fernando | */
|
186 | public void setAllActives(boolean active); |
||
187 | |||
188 | /**
|
||
189 | 13058 | ppiqueras | * Changes the status of all layers to visible or invisible.
|
190 | 1005 | vcaballero | *
|
191 | 13014 | ppiqueras | * @param visible the boolean to be set
|
192 | 13483 | ppiqueras | *
|
193 | * @see #getVisibles()
|
||
194 | 708 | fernando | */
|
195 | public void setAllVisibles(boolean visible); |
||
196 | 1005 | vcaballero | } |