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 / rendering / legend / events / ValueLegendEvent.java @ 40559
History | View | Annotate | Download (2.34 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.rendering.legend.events; |
25 |
|
26 |
import org.gvsig.fmap.mapcontext.events.FMapEvent; |
27 |
import org.gvsig.fmap.mapcontext.rendering.legend.events.ClassificationLegendEvent; |
28 |
import org.gvsig.fmap.mapcontext.rendering.legend.events.LegendEvent; |
29 |
|
30 |
|
31 |
/**
|
32 |
* <p>Event produced when changes any value of a legend.</p>
|
33 |
*
|
34 |
* @see FMapEvent
|
35 |
* @author Vicente Caballero Navarro
|
36 |
*/
|
37 |
public class ValueLegendEvent extends ClassificationLegendEvent { |
38 |
/**
|
39 |
* <p>Previous legend value.</p>
|
40 |
*/
|
41 |
private Object oldValue; |
42 |
|
43 |
/**
|
44 |
* <p>New legend value.</p>
|
45 |
*/
|
46 |
private Object newValue; |
47 |
|
48 |
/**
|
49 |
* <p>Creates a new value legend event.</p>
|
50 |
*
|
51 |
* @param oldValue previous legend value
|
52 |
* @param newValue new legend value
|
53 |
*/
|
54 |
public ValueLegendEvent(Object oldValue, Object newValue) { |
55 |
this.oldValue = oldValue;
|
56 |
this.newValue = newValue;
|
57 |
} |
58 |
|
59 |
/**
|
60 |
* <p>Gets the previous value.</p>
|
61 |
*
|
62 |
* @return the previous value
|
63 |
*/
|
64 |
public Object getOldValue() { |
65 |
return oldValue;
|
66 |
} |
67 |
|
68 |
/**
|
69 |
* <p>Gets the new value.</p>
|
70 |
*
|
71 |
* @return the new value
|
72 |
*/
|
73 |
public Object getNewValue() { |
74 |
return newValue;
|
75 |
} |
76 |
|
77 |
/**
|
78 |
* <p>Returns the type of this legend event.</p>
|
79 |
*
|
80 |
* @return the type of this legend event
|
81 |
*
|
82 |
* @see LegendEvent#LEGEND_VALUE_CHANGED
|
83 |
*/
|
84 |
public int getEventType() { |
85 |
return LegendEvent.LEGEND_VALUE_CHANGED;
|
86 |
} |
87 |
} |