Revision 30011 branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/legend/IVectorLegend.java
IVectorLegend.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package org.gvsig.fmap.mapcontext.rendering.legend; |
42 | 42 |
|
43 |
import org.gvsig.fmap.dal.exception.DataException; |
|
43 |
import java.awt.Graphics2D; |
|
44 |
import java.awt.image.BufferedImage; |
|
45 |
import java.util.Map; |
|
46 |
|
|
47 |
import org.cresques.cts.ICoordTrans; |
|
48 |
import org.gvsig.compat.print.PrintAttributes; |
|
44 | 49 |
import org.gvsig.fmap.dal.feature.Feature; |
45 | 50 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
51 |
import org.gvsig.fmap.mapcontext.MapContextException; |
|
52 |
import org.gvsig.fmap.mapcontext.ViewPort; |
|
46 | 53 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
47 |
import org.gvsig.utils.XMLEntity;
|
|
54 |
import org.gvsig.tools.task.Cancellable;
|
|
48 | 55 |
|
49 | 56 |
|
50 | 57 |
|
... | ... | |
53 | 60 |
* |
54 | 61 |
* @author Vicente Caballero Navarro |
55 | 62 |
*/ |
56 |
public interface IVectorLegend extends ILegend { |
|
63 |
public interface IVectorLegend extends ILegend, DrawingObservable {
|
|
57 | 64 |
/** |
58 | 65 |
* Inserts the DataSource. |
59 | 66 |
* |
60 | 67 |
* @param ds DataSource. |
61 | 68 |
* @throws DataException TODO |
62 | 69 |
* @throws FieldNotFoundException when the field is not found. |
63 |
* @throws DriverException When the driver fails. |
|
64 | 70 |
*/ |
65 |
void setFeatureStore(FeatureStore fs) |
|
66 |
throws DataException; |
|
71 |
// void setFeatureStore(FeatureStore fs)
|
|
72 |
// throws DataException;
|
|
67 | 73 |
|
68 | 74 |
/** |
69 | 75 |
* Returns the symbol to be used to represent the feature in the i-th |
... | ... | |
71 | 77 |
* @param i, the record index |
72 | 78 |
* |
73 | 79 |
* @return ISymbol. |
74 |
* |
|
75 |
* @throws DriverException |
|
76 | 80 |
*/ |
77 | 81 |
// ISymbol getSymbol(int i) throws ReadException; |
78 | 82 |
/** |
... | ... | |
85 | 89 |
* @param feat IFeature. |
86 | 90 |
* |
87 | 91 |
* @return S?mbolo. |
92 |
* @throws MapContextException |
|
88 | 93 |
*/ |
89 |
ISymbol getSymbolByFeature(Feature feat); |
|
94 |
ISymbol getSymbolByFeature(Feature feat) throws MapContextException;
|
|
90 | 95 |
|
91 | 96 |
/** |
92 | 97 |
* Returns the type of the shape. |
... | ... | |
108 | 113 |
* is established by calling this method. |
109 | 114 |
* |
110 | 115 |
* @param s default symbol. |
111 |
* @throws IllegalArgumentException, if the symbol isn't suitable for the |
|
112 |
* layer's data type. |
|
113 | 116 |
*/ |
114 |
void setDefaultSymbol(ISymbol s) throws IllegalArgumentException;
|
|
117 |
void setDefaultSymbol(ISymbol s); |
|
115 | 118 |
|
116 | 119 |
/** |
117 | 120 |
* Returns true or false depending on if the rest of values are used. |
... | ... | |
122 | 125 |
|
123 | 126 |
void useDefaultSymbol(boolean b); |
124 | 127 |
|
125 |
public ZSort getZSort(); |
|
128 |
// jjdc los eliminamos, y debe quedar dependiente de la implementacion y n de api |
|
129 |
// public ZSort getZSort(); |
|
130 |
// |
|
131 |
// public void setZSort(ZSort zSort); |
|
132 |
// |
|
133 |
public boolean isSuitableForShapeType(int shapeType); |
|
126 | 134 |
|
127 |
public void setZSort(ZSort zSort); |
|
135 |
/** |
|
136 |
* Draws ... |
|
137 |
* |
|
138 |
* @param image |
|
139 |
* the base image to draw over |
|
140 |
* @param graphics2D |
|
141 |
* the {@link Graphics2D} to draw to |
|
142 |
* @param viewPort |
|
143 |
* the ViewPort to use |
|
144 |
* @param cancel |
|
145 |
* the {@link Cancellable} delegate object |
|
146 |
* @param scale |
|
147 |
* the scale of the view |
|
148 |
* @param queryParameters |
|
149 |
* the query parameters |
|
150 |
* @param coordTrans |
|
151 |
* the transformation coordinates to use for reprojection |
|
152 |
* @param featureStore |
|
153 |
* {@link FeatureStore} to load the data to draw from |
|
154 |
* @throws LegendException |
|
155 |
*/ |
|
156 |
void draw(BufferedImage image, Graphics2D graphics2D, ViewPort viewPort, |
|
157 |
Cancellable cancel, double scale, Map queryParameters, |
|
158 |
ICoordTrans coordTrans, FeatureStore featureStore) |
|
159 |
throws LegendException; |
|
128 | 160 |
|
129 |
public boolean isSuitableForShapeType(int shapeType); |
|
161 |
void print(Graphics2D g, ViewPort viewPort, Cancellable cancel, |
|
162 |
double scale, Object object, ICoordTrans coordTrans, |
|
163 |
FeatureStore featureStore, PrintAttributes properties) throws LegendException; |
|
130 | 164 |
|
131 | 165 |
} |
Also available in: Unified diff