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 / layers / operations / Classifiable.java @ 40559
History | View | Annotate | Download (3.31 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.layers.operations; |
25 |
|
26 |
import org.gvsig.fmap.dal.exception.ReadException; |
27 |
import org.gvsig.fmap.geom.type.GeometryType; |
28 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
29 |
import org.gvsig.fmap.mapcontext.rendering.legend.events.listeners.LegendListener; |
30 |
|
31 |
/**
|
32 |
* <p>Interface that all layers that can be classifiable, must implement.</p>
|
33 |
* <p>The interface <code>Classifiable</code> allows classify a layer in <i>raster</i> or <i>vector</i>,
|
34 |
* and then, generates a legend.</p>
|
35 |
*/
|
36 |
public interface Classifiable { |
37 |
/**
|
38 |
* Adds the specified legend listener to receive legend events from the inner legend.
|
39 |
* If the parameter is null, no exception is thrown and no action is performed.
|
40 |
*
|
41 |
* @param listener the legend listener
|
42 |
*
|
43 |
* @see #removeLegendListener(LegendListener)
|
44 |
*/
|
45 |
void addLegendListener(LegendListener listener);
|
46 |
|
47 |
/**
|
48 |
* Removes the specified legend listener so that it no longer receives legend events from the inner
|
49 |
* legend. This method performs no function, nor does it throw an exception, if the listener specified
|
50 |
* by the argument was not previously added to the legend. If the parameter is null, no exception is
|
51 |
* thrown and no action is performed.
|
52 |
*
|
53 |
* @param listener the legend listener
|
54 |
*
|
55 |
* @see #addLegendListener(LegendListener)
|
56 |
*/
|
57 |
void removeLegendListener(LegendListener listener);
|
58 |
|
59 |
/**
|
60 |
* Returns the inner legend.
|
61 |
*
|
62 |
* @return Legend.
|
63 |
*/
|
64 |
public ILegend getLegend();
|
65 |
|
66 |
/**
|
67 |
* <p>Returns the type of the shape.</p>
|
68 |
* <p>All geometry types are defined in <code>Geometry.TYPES</code>.
|
69 |
* For getting the equivalent shape of a geometry type, you must use a method like
|
70 |
* <code>{@linkplain SHPFileWrite#getShapeType()}</code>.</p>
|
71 |
*
|
72 |
* @return the type of this shape.
|
73 |
* @throws ReadException
|
74 |
*
|
75 |
* @see Geometry
|
76 |
* @see Constant
|
77 |
*
|
78 |
* @throws ReadDriverException if the driver fails reading the data.
|
79 |
*
|
80 |
* @deprecated to be removed in gvSIG 2.1. Use {@link #getGeometryType()} instead.
|
81 |
*/
|
82 |
public int getShapeType() throws ReadException; |
83 |
|
84 |
/**
|
85 |
* Returns the layer's geometry type
|
86 |
*
|
87 |
* @return the geometry type
|
88 |
*
|
89 |
* @throws ReadException
|
90 |
* if there is an error getting the geometry type
|
91 |
*/
|
92 |
public GeometryType getGeometryType() throws ReadException; |
93 |
} |