svn-gvsig-desktop / trunk / extensions / extRasterTools-SE / src / org / gvsig / rastertools / PropertyEvent.java @ 18277
History | View | Annotate | Download (2.18 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007 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 |
package org.gvsig.rastertools; |
20 |
|
21 |
import java.util.EventObject; |
22 |
|
23 |
/**
|
24 |
* Evento de una propiedad con la forma variable=valor
|
25 |
*
|
26 |
* 07/01/2008
|
27 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
28 |
*/
|
29 |
public class PropertyEvent extends EventObject { |
30 |
private static final long serialVersionUID = -1649548367781607532L; |
31 |
private String name = null; |
32 |
private Object value = null; |
33 |
private Object oldValue = null; |
34 |
|
35 |
/**
|
36 |
* Constructor. Se asignan los valores de nombre y valor de la
|
37 |
* propiedad que ha disparado el evento.
|
38 |
* @param source Objeto fuente
|
39 |
* @param name Nombre de la propiedad
|
40 |
* @param value Valor de la propiedad
|
41 |
*/
|
42 |
public PropertyEvent(Object source, String name, Object value, Object oldValue) { |
43 |
super(source);
|
44 |
this.name = name;
|
45 |
this.value = value;
|
46 |
this.oldValue = oldValue;
|
47 |
} |
48 |
|
49 |
/**
|
50 |
* Obtiene el nombre de la propiedad que dispar? el evento
|
51 |
* @return cadena con el nombre de la propiedad que dispar? el evento
|
52 |
*/
|
53 |
public String getName() { |
54 |
return name;
|
55 |
} |
56 |
|
57 |
/**
|
58 |
* Obtiene el valor de la propiedad que dispar? el evento
|
59 |
* @return Object con el valor de la propiedad que dispar? el evento
|
60 |
*/
|
61 |
public Object getOldValue() { |
62 |
return oldValue;
|
63 |
} |
64 |
|
65 |
/**
|
66 |
* Obtiene el valor de la propiedad antes de que se modificara.
|
67 |
* @return Object con el valor de la propiedad que dispar? el evento
|
68 |
*/
|
69 |
public Object getValue() { |
70 |
return value;
|
71 |
} |
72 |
} |