root / org.gvsig.educa.thematicmap / trunk / org.gvsig.educa.thematicmap / org.gvsig.educa.thematicmap.swing / org.gvsig.educa.thematicmap.swing.api / src / main / java / org / gvsig / fmap / swing / toc / event / LegendActionEvent.java @ 24
History | View | Annotate | Download (2.04 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.
|
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., 59 Temple Place - Suite 330,
|
19 |
* Boston, MA 02111-1307, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.fmap.swing.toc.event; |
23 |
|
24 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
25 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
26 |
import org.gvsig.fmap.swing.toc.TOC; |
27 |
|
28 |
/**
|
29 |
* Event class to notify that user has shown interest in one of the
|
30 |
* sample symbols of a legend
|
31 |
* (typically user double clicked on it)
|
32 |
*
|
33 |
* @author Juan Lucas Dominguez jldominguez prodevelop es
|
34 |
* @version $Id$
|
35 |
*
|
36 |
*/
|
37 |
public class LegendActionEvent extends TOCEvent { |
38 |
|
39 |
private ILegend legend = null; |
40 |
private ISymbol symbol = null; |
41 |
|
42 |
/**
|
43 |
*
|
44 |
* @param t
|
45 |
* TOC where action was performed
|
46 |
* @param sym
|
47 |
* symbol on which user performed action
|
48 |
* @param leg
|
49 |
* legend that contains that symbol
|
50 |
*/
|
51 |
public LegendActionEvent(TOC t, ISymbol sym, ILegend leg) {
|
52 |
super(t);
|
53 |
symbol = sym; |
54 |
legend = leg; |
55 |
} |
56 |
|
57 |
/**
|
58 |
*
|
59 |
* @return the affected legend
|
60 |
*/
|
61 |
public ILegend getLegend() {
|
62 |
return legend;
|
63 |
} |
64 |
|
65 |
/**
|
66 |
*
|
67 |
* @return the symbol on which user performed an action
|
68 |
*/
|
69 |
public ISymbol getSymbol() {
|
70 |
return symbol;
|
71 |
} |
72 |
|
73 |
} |