Statistics
| Revision:

gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / fmap / dal / coverage / util / PropertyEvent.java @ 2443

History | View | Annotate | Download (2.25 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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 2
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
 */
22
package org.gvsig.fmap.dal.coverage.util;
23

    
24
import java.util.EventObject;
25

    
26
/**
27
 * Evento de una propiedad con la forma variable=valor
28
 * 
29
 * 07/01/2008
30
 * @author Nacho Brodin (nachobrodin@gmail.com)
31
 */
32
public class PropertyEvent extends EventObject {
33
        private static final long serialVersionUID = -1649548367781607532L;
34
        private String name = null;
35
        private Object value = null;
36
        private Object oldValue = null;
37

    
38
        /**
39
         * Constructor. Se asignan los valores de nombre y valor de la 
40
         * propiedad que ha disparado el evento.
41
         * @param source Objeto fuente
42
         * @param name Nombre de la propiedad
43
         * @param value Valor de la propiedad
44
         */
45
        public PropertyEvent(Object source, String name, Object value, Object oldValue) {
46
                super(source);
47
                this.name = name;
48
                this.value = value;
49
                this.oldValue = oldValue;
50
        }
51

    
52
        /**
53
         * Obtiene el nombre de la propiedad que dispar? el evento
54
         * @return cadena con el nombre de la propiedad que dispar? el evento
55
         */
56
        public String getName() {
57
                return name;
58
        }
59

    
60
        /**
61
         * Obtiene el valor de la propiedad que dispar? el evento
62
         * @return Object con el valor de la propiedad que dispar? el evento
63
         */
64
        public Object getOldValue() {
65
                return oldValue;
66
        }
67
        
68
        /**
69
         * Obtiene el valor de la propiedad antes de que se modificara.
70
         * @return Object con el valor de la propiedad que dispar? el evento
71
         */
72
        public Object getValue() {
73
                return value;
74
        }
75
}