root / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / view / legend / gui / ILegendPanel.java @ 10679
History | View | Annotate | Download (3.95 KB)
1 |
/*
|
---|---|
2 |
* Created on 14-dic-2004
|
3 |
*
|
4 |
* TODO To change the template for this generated file go to
|
5 |
* Window - Preferences - Java - Code Generation - Code and Comments
|
6 |
*/
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
8 |
*
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or
|
12 |
* modify it under the terms of the GNU General Public License
|
13 |
* as published by the Free Software Foundation; either version 2
|
14 |
* of the License, or (at your option) any later version.
|
15 |
*
|
16 |
* This program is distributed in the hope that it will be useful,
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
* GNU General Public License for more details.
|
20 |
*
|
21 |
* You should have received a copy of the GNU General Public License
|
22 |
* along with this program; if not, write to the Free Software
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
24 |
*
|
25 |
* For more information, contact:
|
26 |
*
|
27 |
* Generalitat Valenciana
|
28 |
* Conselleria d'Infraestructures i Transport
|
29 |
* Av. Blasco Ib??ez, 50
|
30 |
* 46010 VALENCIA
|
31 |
* SPAIN
|
32 |
*
|
33 |
* +34 963862235
|
34 |
* gvsig@gva.es
|
35 |
* www.gvsig.gva.es
|
36 |
*
|
37 |
* or
|
38 |
*
|
39 |
* IVER T.I. S.A
|
40 |
* Salamanca 50
|
41 |
* 46005 Valencia
|
42 |
* Spain
|
43 |
*
|
44 |
* +34 963163400
|
45 |
* dac@iver.es
|
46 |
*/
|
47 |
package com.iver.cit.gvsig.project.documents.view.legend.gui; |
48 |
|
49 |
import javax.swing.JPanel; |
50 |
|
51 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
52 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
53 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
54 |
|
55 |
/**
|
56 |
* @author jaume dominguez faus - jaume.dominguez@iver.es
|
57 |
*
|
58 |
* Este interfaz es el que debe cumplir cualquier panel que empleemos
|
59 |
* para confeccionar una leyenda. Se le pasa una capa para que
|
60 |
* tome su leyenda, y con el m?todo getLegend tomamos la leyenda
|
61 |
* que ha confeccionado el usuario.
|
62 |
*/
|
63 |
public interface ILegendPanel { |
64 |
/**
|
65 |
* Initializes the data required for this legend panel. That is, the layer that
|
66 |
* will adopt the changes and the current legend that this layer has. If the
|
67 |
* legend is not the type of legend that this panel manage then it initializes
|
68 |
* the panel with the default values. In case it is, then the panel should
|
69 |
* refresh its components with the current values of the Legend.
|
70 |
* @param lyr, target layer
|
71 |
* @param legend, the legend currently applied to lyr
|
72 |
*/
|
73 |
public void setData(FLayer lyr, Legend legend); |
74 |
|
75 |
/**
|
76 |
* Returns an instance of Legend
|
77 |
* @return Legend, the legend result of the settings
|
78 |
*/
|
79 |
public Legend getLegend();
|
80 |
|
81 |
/**
|
82 |
* Returns a brief human-readable description about what kind of legend builds this panel
|
83 |
* @return String with a brief description
|
84 |
*/
|
85 |
public String getDescription(); |
86 |
|
87 |
/**
|
88 |
* Returns the icon which should graphically describe what this panel's legend does.
|
89 |
* @return ImageIcon with the icon to be displayed
|
90 |
*/
|
91 |
public ISymbol getPreviewSymbol();
|
92 |
|
93 |
/**
|
94 |
* If this panel should appear as a subnode of the legends tree, in other words it is not
|
95 |
* a first-level node, then this method would return <b>its parent's class</b>. Otherwise, if
|
96 |
* it is a first-level node, then it will return <b>null</b>.
|
97 |
* @return String containing the parent's title.
|
98 |
*/
|
99 |
public Class getParentClass(); |
100 |
|
101 |
/**
|
102 |
* Returns the title (a human-readable one) of this panel.
|
103 |
*/
|
104 |
public String getTitle(); |
105 |
|
106 |
/**
|
107 |
* <p>If this is a complete panel (it is a child node in the legend tree) to set up a legend
|
108 |
* this method will return a <b>JPanel</b> containing the necessary components. Otherwise, if
|
109 |
* it is just a classification node (it has children) in the legend tree it will return
|
110 |
* just <b>null</b>.<br></p>
|
111 |
*
|
112 |
* <p>If <b>null</b> is returned, the ILegendPanel that will be shown and selected each time
|
113 |
* it is selected is the very first child of this parent node.</p>
|
114 |
*/
|
115 |
public JPanel getPanel(); |
116 |
|
117 |
/**
|
118 |
* Returns the class of the legend produced by this ILegendPanel.
|
119 |
*/
|
120 |
public Class getLegendClass(); |
121 |
} |
122 |
|