Statistics
| Revision:

root / branches / v2_0_0_prep / libFMap_mapcontext / src / org / gvsig / fmap / mapcontext / layers / LayerCollectionListener.java @ 21200

History | View | Annotate | Download (4.11 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 org.gvsig.fmap.mapcontext.layers;
42

    
43

    
44
/**
45
 * <p><code>LayerCollectionListener</code> defines listeners for events that can be produced in a
46
 *  collection of layers.</p>
47
 */
48
public interface LayerCollectionListener {
49
    /**
50
          * <p>Called when a layer has been added or replaced in the internal list of layers.</p>
51
     *
52
     * @param e a layer collection event object
53
     */
54
    void layerAdded(LayerCollectionEvent e);
55

    
56
    /**
57
          * <p>Called when a layer has been moved in the internal list of layers.</p>
58
     *
59
     * @param e a layer collection event object
60
     */
61
    void layerMoved(LayerPositionEvent e);
62

    
63
    /**
64
           * <p>Called when a layer has been removed from the internal list of layers.</p>
65
     *
66
     * @param e a layer collection event object
67
     */
68
    void layerRemoved(LayerCollectionEvent e);
69

    
70
    /**
71
          * <p>Called when a layer is just going to be added or replaced in the internal list of layers.</p>
72
     *
73
     * @param e a layer collection event object
74
     *
75
     * @throws CancelationException if cancels the adding operation, this exception will have the message
76
     *  that user will see.
77
     */
78
    void layerAdding(LayerCollectionEvent e) throws CancelationException;
79

    
80
    /**
81
          * <p>Called when a layer is just going to be moved in the internal list of layers.</p>
82
     *
83
     * @param e a layer collection event object
84
     *
85
     * @throws CancelationException if cancels the moving operation, this exception will have the message
86
     *  that user will see.
87
     */
88
    void layerMoving(LayerPositionEvent e) throws CancelationException;
89

    
90
    /**
91
          * <p>Called when a layer is just going to be removed from the internal list of layers.</p>
92
     *
93
     * @param e a layer collection event object
94
     *
95
     * @throws CancelationException if cancels the removing operation, this exception will have the message
96
     *  that user will see.
97
     */
98
    void layerRemoving(LayerCollectionEvent e) throws CancelationException;
99

    
100

    
101
    ///**
102
    // * <p>Called when the activation state of the collection of layers has changed.</p>
103
    // *
104
    // * @param e a layer collection event object
105
    // *
106
    // * @throws CancelationException Si se quiere cancelar la operaci?n. El
107
    // *         mensaje de la excepci?n es el que se mostrar? al usuario en su
108
    // *         caso
109
    // */
110
    //  useless. Please, use LayerListener interface instead
111
    // void activationChanged(LayerCollectionEvent e) throws CancelationException;
112

    
113
    /**
114
          * <p>Called when the visibility of the collection of layers has changed.</p>
115
     *
116
     * @param e a layer collection event object
117
     *
118
     * @throws CancelationException if cancels the operation of change visibility, this exception will have the
119
     *  message that user will see.
120
     */
121
    void visibilityChanged(LayerCollectionEvent e) throws CancelationException;
122
}