Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / layers / LayerEvent.java @ 1082

History | View | Annotate | Download (1.58 KB)

1
package com.iver.cit.gvsig.fmap.layers;
2

    
3
import com.iver.cit.gvsig.fmap.FMapEvent;
4

    
5

    
6
/**
7
 * Eventos de capa
8
 *
9
 * @author Fernando Gonz?lez Cort?s
10
 */
11
public class LayerEvent extends FMapEvent {
12
        private String property;
13
        private FLayer source;
14
        private static final int VISIBILITY_CHANGED = 0;
15
        private static final int ACTIVATION_CHANGED = 1;
16
        private static final int NAME_CHANGED = 2;
17

    
18
        public static LayerEvent createVisibilityChangedEvent(FLyrDefault default1, String property){
19
                return new LayerEvent(default1, property, VISIBILITY_CHANGED);
20
        }
21
        
22
        public static LayerEvent createActivationChangedEvent(FLyrDefault default1, String property){
23
                return new LayerEvent(default1, property, ACTIVATION_CHANGED);
24
        }
25
        
26
        public static LayerEvent createNameChangedEvent(FLyrDefault default1, String property){
27
                return new LayerEvent(default1, property, VISIBILITY_CHANGED);
28
        }
29
        
30
        /**
31
         * Crea un nuevo LayerEvent.
32
         *
33
         * @param default1
34
         * @param property
35
         */
36
        private LayerEvent(FLyrDefault default1, String property, int eventType) {
37
                source = default1;
38
                this.property = property;
39
                setEventType(eventType);
40
        }
41

    
42
        /**
43
         * Devuelve el FLayer.
44
         *
45
         * @return FLayer.
46
         */
47
        public FLayer getSource() {
48
                return source;
49
        }
50

    
51
        /**
52
         * Inserta el FLayer.
53
         *
54
         * @param source FLayer.
55
         */
56
        public void setSource(FLayer source) {
57
                this.source = source;
58
        }
59

    
60
        /**
61
         * Devulve las propiedades.
62
         *
63
         * @return String.
64
         */
65
        public String getProperty() {
66
                return property;
67
        }
68

    
69
        /**
70
         * Inserta las Propiedades.
71
         *
72
         * @param property String.
73
         */
74
        public void setProperty(String property) {
75
                this.property = property;
76
        }
77
}