Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.mapcontext / org.gvsig.fmap.mapcontext.api / src / main / java / org / gvsig / fmap / mapcontext / layers / LayerCollectionListener.java @ 40559

History | View | Annotate | Download (3.84 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.mapcontext.layers;
25

    
26

    
27
/**
28
 * <p><code>LayerCollectionListener</code> defines listeners for events that can be produced in a
29
 *  collection of layers.</p>
30
 */
31
public interface LayerCollectionListener {
32
    /**
33
          * <p>Called when a layer has been added or replaced in the internal list of layers.</p>
34
     *
35
     * @param e a layer collection event object
36
     */
37
    void layerAdded(LayerCollectionEvent e);
38

    
39
    /**
40
          * <p>Called when a layer has been moved in the internal list of layers.</p>
41
     *
42
     * @param e a layer collection event object
43
     */
44
    void layerMoved(LayerPositionEvent e);
45

    
46
    /**
47
           * <p>Called when a layer has been removed from the internal list of layers.</p>
48
     *
49
     * @param e a layer collection event object
50
     */
51
    void layerRemoved(LayerCollectionEvent e);
52

    
53
    /**
54
          * <p>Called when a layer is just going to be added or replaced in the internal list of layers.</p>
55
     *
56
     * @param e a layer collection event object
57
     *
58
     * @throws CancelationException if cancels the adding operation, this exception will have the message
59
     *  that user will see.
60
     */
61
    void layerAdding(LayerCollectionEvent e) throws CancelationException;
62

    
63
    /**
64
          * <p>Called when a layer is just going to be moved in the internal list of layers.</p>
65
     *
66
     * @param e a layer collection event object
67
     *
68
     * @throws CancelationException if cancels the moving operation, this exception will have the message
69
     *  that user will see.
70
     */
71
    void layerMoving(LayerPositionEvent e) throws CancelationException;
72

    
73
    /**
74
          * <p>Called when a layer is just going to be removed from the internal list of layers.</p>
75
     *
76
     * @param e a layer collection event object
77
     *
78
     * @throws CancelationException if cancels the removing operation, this exception will have the message
79
     *  that user will see.
80
     */
81
    void layerRemoving(LayerCollectionEvent e) throws CancelationException;
82

    
83

    
84
    ///**
85
    // * <p>Called when the activation state of the collection of layers has changed.</p>
86
    // *
87
    // * @param e a layer collection event object
88
    // *
89
    // * @throws CancelationException Si se quiere cancelar la operaci?n. El
90
    // *         mensaje de la excepci?n es el que se mostrar? al usuario en su
91
    // *         caso
92
    // */
93
    //  useless. Please, use LayerListener interface instead
94
    // void activationChanged(LayerCollectionEvent e) throws CancelationException;
95

    
96
    /**
97
          * <p>Called when the visibility of the collection of layers has changed.</p>
98
     *
99
     * @param e a layer collection event object
100
     *
101
     * @throws CancelationException if cancels the operation of change visibility, this exception will have the
102
     *  message that user will see.
103
     */
104
    void visibilityChanged(LayerCollectionEvent e) throws CancelationException;
105
}