svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extEditing / src / com / iver / cit / gvsig / layers / VectorialLayerEdited.java @ 27398
History | View | Annotate | Download (17.4 KB)
1 |
package com.iver.cit.gvsig.layers; |
---|---|
2 |
|
3 |
import java.awt.Graphics2D; |
4 |
import java.awt.Image; |
5 |
import java.awt.geom.Point2D; |
6 |
import java.awt.image.BufferedImage; |
7 |
import java.util.ArrayList; |
8 |
import java.util.ConcurrentModificationException; |
9 |
import java.util.EmptyStackException; |
10 |
import java.util.Iterator; |
11 |
|
12 |
import org.gvsig.fmap.dal.exception.DataException; |
13 |
import org.gvsig.fmap.dal.exception.ReadException; |
14 |
import org.gvsig.fmap.dal.feature.Feature; |
15 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
16 |
import org.gvsig.fmap.dal.feature.FeatureSelection; |
17 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
18 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
19 |
import org.gvsig.fmap.geom.GeometryLocator; |
20 |
import org.gvsig.fmap.geom.GeometryManager; |
21 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
22 |
import org.gvsig.fmap.geom.Geometry.TYPES; |
23 |
import org.gvsig.fmap.geom.exception.CreateEnvelopeException; |
24 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
25 |
import org.gvsig.fmap.geom.handler.Handler; |
26 |
import org.gvsig.fmap.geom.operation.Draw; |
27 |
import org.gvsig.fmap.geom.operation.DrawOperationContext; |
28 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
29 |
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException; |
30 |
import org.gvsig.fmap.geom.primitive.Circle; |
31 |
import org.gvsig.fmap.geom.primitive.Envelope; |
32 |
import org.gvsig.fmap.geom.primitive.Point; |
33 |
import org.gvsig.fmap.geom.util.UtilFunctions; |
34 |
import org.gvsig.fmap.mapcontext.ViewPort; |
35 |
import org.gvsig.fmap.mapcontext.layers.CancelationException; |
36 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
37 |
import org.gvsig.fmap.mapcontext.layers.LayerDrawEvent; |
38 |
import org.gvsig.fmap.mapcontext.layers.LayerDrawingListener; |
39 |
import org.gvsig.fmap.mapcontext.layers.LayerEvent; |
40 |
import org.gvsig.fmap.mapcontext.layers.vectorial.ContainsGeometryEvaluator; |
41 |
import org.gvsig.fmap.mapcontext.layers.vectorial.CrossEnvelopeEvaluator; |
42 |
import org.gvsig.fmap.mapcontext.layers.vectorial.CrossesGeometryEvaluator; |
43 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
44 |
import org.gvsig.fmap.mapcontext.layers.vectorial.ContainsEnvelopeEvaluator; |
45 |
import org.gvsig.fmap.mapcontext.layers.vectorial.IntersectsGeometryEvaluator; |
46 |
import org.gvsig.fmap.mapcontext.layers.vectorial.OutGeometryEvaluator; |
47 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
48 |
import org.gvsig.fmap.mapcontext.rendering.symbols.FGraphicUtilities; |
49 |
import org.gvsig.fmap.mapcontrol.MapControl; |
50 |
import org.gvsig.tools.evaluator.Evaluator; |
51 |
import org.gvsig.tools.observer.Observable; |
52 |
import org.gvsig.tools.observer.Observer; |
53 |
import org.slf4j.Logger; |
54 |
import org.slf4j.LoggerFactory; |
55 |
|
56 |
import com.iver.andami.PluginServices; |
57 |
import com.iver.andami.messages.NotificationManager; |
58 |
import com.iver.andami.ui.mdiManager.IWindow; |
59 |
import com.iver.cit.gvsig.CADExtension; |
60 |
import com.iver.cit.gvsig.EditionChangeManager; |
61 |
import com.iver.cit.gvsig.StartEditing; |
62 |
import com.iver.cit.gvsig.ViewCommandStackExtension; |
63 |
import com.iver.cit.gvsig.gui.cad.CADTool; |
64 |
import com.iver.cit.gvsig.gui.cad.DefaultCADTool; |
65 |
import com.iver.cit.gvsig.gui.cad.tools.SelectionCADTool; |
66 |
import com.iver.cit.gvsig.project.documents.view.gui.View; |
67 |
|
68 |
public class VectorialLayerEdited extends DefaultLayerEdited implements |
69 |
LayerDrawingListener, Observer {
|
70 |
private static final GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
71 |
private static final Logger logger = LoggerFactory.getLogger(VectorialLayerEdited.class); |
72 |
private ArrayList selectedHandler = new ArrayList(); |
73 |
private Point2D lastPoint; |
74 |
private Point2D firstPoint; |
75 |
private CADTool cadtool = null; |
76 |
|
77 |
private ILegend legend;
|
78 |
private Image imageSelection; |
79 |
private Image imageHandlers; |
80 |
private EditionChangeManager echm=null; |
81 |
|
82 |
public VectorialLayerEdited(FLayer lyr) {
|
83 |
super(lyr);
|
84 |
lyr.getMapContext().addLayerDrawingListener(this);
|
85 |
// Por defecto, siempre hacemos snapping sobre la capa en edici?n.
|
86 |
lyr.getMapContext().getLayersToSnap().add(lyr); |
87 |
try {
|
88 |
((FLyrVect) lyr).getFeatureStore().addObserver(this);
|
89 |
} catch (ReadException e) {
|
90 |
NotificationManager.addError(e.getMessage(), e); |
91 |
} |
92 |
} |
93 |
|
94 |
public ArrayList getSelectedHandler() { |
95 |
return selectedHandler;
|
96 |
} |
97 |
|
98 |
public void clearSelection() throws DataException { |
99 |
if (getFeatureStore() == null) |
100 |
return;
|
101 |
FeatureSelection selection = getFeatureStore().getFeatureSelection(); |
102 |
selectedHandler.clear(); |
103 |
selection.deselectAll(); |
104 |
} |
105 |
|
106 |
public void selectWithPoint(double x, double y, boolean multipleSelection) { |
107 |
try {
|
108 |
firstPoint = new Point2D.Double(x, y); |
109 |
FeatureStore featureStore = getFeatureStore(); |
110 |
// Se comprueba si se pincha en una gemometr?a
|
111 |
ViewPort vp = getLayer().getMapContext().getViewPort(); |
112 |
double tol = vp.toMapDistance(MapControl.tolerance);
|
113 |
|
114 |
GeometryManager manager = GeometryLocator.getGeometryManager(); |
115 |
Point center = (org.gvsig.fmap.geom.primitive.Point)manager.create(TYPES.POINT, SUBTYPES.GEOM2D);
|
116 |
center.setX(x); |
117 |
center.setY(y); |
118 |
Circle circle = (Circle)geomManager.create(TYPES.CIRCLE, SUBTYPES.GEOM2D); |
119 |
circle.setPoints(center, tol); |
120 |
|
121 |
FeatureQuery fq=new FeatureQuery();
|
122 |
fq.setAttributeNames(new String[]{featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName()}); |
123 |
Evaluator evaluator=new IntersectsGeometryEvaluator(circle, vp.getProjection(), featureStore.getDefaultFeatureType(), featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName());
|
124 |
fq.setFilter(evaluator); |
125 |
FeatureSet set = featureStore.getFeatureSet(fq); |
126 |
selectAndDrawGeometries(featureStore, set, vp, multipleSelection); |
127 |
} catch (ReadException e) {
|
128 |
NotificationManager.addError(e.getMessage(), e); |
129 |
} catch (GeometryOperationNotSupportedException e) {
|
130 |
NotificationManager.addError(e.getMessage(), e); |
131 |
} catch (GeometryOperationException e) {
|
132 |
NotificationManager.addError(e.getMessage(), e); |
133 |
} catch (DataException e) {
|
134 |
NotificationManager.addError(e.getMessage(), e); |
135 |
} catch (CreateGeometryException e) {
|
136 |
NotificationManager.addError(e.getMessage(), e); |
137 |
} |
138 |
} |
139 |
|
140 |
public void selectWithSecondPoint(double x, double y) { |
141 |
try {
|
142 |
FeatureStore featureStore = getFeatureStore(); |
143 |
lastPoint = new Point2D.Double(x, y); |
144 |
ViewPort vp = getLayer().getMapContext().getViewPort(); |
145 |
double x1;
|
146 |
double y1;
|
147 |
double w1;
|
148 |
double h1;
|
149 |
|
150 |
if (firstPoint.getX() < lastPoint.getX()) {
|
151 |
x1 = firstPoint.getX(); |
152 |
w1 = lastPoint.getX() - firstPoint.getX(); |
153 |
} else {
|
154 |
x1 = lastPoint.getX(); |
155 |
w1 = firstPoint.getX() - lastPoint.getX(); |
156 |
} |
157 |
|
158 |
if (firstPoint.getY() < lastPoint.getY()) {
|
159 |
y1 = firstPoint.getY(); |
160 |
h1 = lastPoint.getY() - firstPoint.getY(); |
161 |
} else {
|
162 |
y1 = lastPoint.getY(); |
163 |
h1 = firstPoint.getY() - lastPoint.getY(); |
164 |
} |
165 |
|
166 |
Envelope envelope = geomManager.createEnvelope(x1, y1, x1 + w1, y1 + h1, SUBTYPES.GEOM2D); |
167 |
|
168 |
FeatureQuery fq=new FeatureQuery();
|
169 |
fq.setAttributeNames(new String[]{featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName()}); |
170 |
Evaluator evaluator=null;
|
171 |
if (firstPoint.getX() < lastPoint.getX()) {
|
172 |
evaluator=new ContainsEnvelopeEvaluator(envelope, vp.getProjection(), featureStore.getDefaultFeatureType(), featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName());
|
173 |
}else{
|
174 |
evaluator=new CrossEnvelopeEvaluator(envelope, vp.getProjection(), featureStore.getDefaultFeatureType(), featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName());
|
175 |
} |
176 |
fq.setFilter(evaluator); |
177 |
FeatureSet set = featureStore.getFeatureSet(fq); |
178 |
selectAndDrawGeometries(featureStore, set, vp, false);
|
179 |
} catch (ReadException e) {
|
180 |
NotificationManager.addError(e.getMessage(), e); |
181 |
} catch (GeometryOperationNotSupportedException e) {
|
182 |
NotificationManager.addError(e.getMessage(), e); |
183 |
} catch (GeometryOperationException e) {
|
184 |
NotificationManager.addError(e.getMessage(), e); |
185 |
} catch (DataException e) {
|
186 |
NotificationManager.addError(e.getMessage(), e); |
187 |
} catch (CreateEnvelopeException e) {
|
188 |
NotificationManager.addError(e.getMessage(), e); |
189 |
} |
190 |
} |
191 |
|
192 |
public void selectInsidePolygon(org.gvsig.fmap.geom.Geometry polygon) { |
193 |
try {
|
194 |
FeatureStore featureStore = getFeatureStore(); |
195 |
ViewPort vp = getLayer().getMapContext().getViewPort(); |
196 |
FeatureQuery fq=new FeatureQuery();
|
197 |
fq.setAttributeNames(new String[]{featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName()}); |
198 |
Evaluator evaluator=new ContainsGeometryEvaluator(polygon, vp.getProjection(), featureStore.getDefaultFeatureType(), featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName());
|
199 |
fq.setFilter(evaluator); |
200 |
FeatureSet set = featureStore.getFeatureSet(fq); |
201 |
selectAndDrawGeometries(featureStore, set, vp, false);
|
202 |
} catch (ReadException e) {
|
203 |
NotificationManager.addError(e.getMessage(), e); |
204 |
} catch (DataException e) {
|
205 |
NotificationManager.addError(e.getMessage(), e); |
206 |
} catch (GeometryOperationNotSupportedException e) {
|
207 |
NotificationManager.addError(e.getMessage(), e); |
208 |
} catch (GeometryOperationException e) {
|
209 |
NotificationManager.addError(e.getMessage(), e); |
210 |
} |
211 |
} |
212 |
private void selectAndDrawGeometries(FeatureStore featureStore, FeatureSet set, ViewPort vp, boolean multipleSelection) throws DataException, GeometryOperationNotSupportedException, GeometryOperationException{ |
213 |
BufferedImage selectionImage = null; |
214 |
BufferedImage handlersImage = null; |
215 |
// if (!multipleSelection) {
|
216 |
// clearSelection();
|
217 |
// }
|
218 |
if (multipleSelection && getSelectionImage()!=null && getHandlersImage()!=null) { |
219 |
selectionImage=(BufferedImage)getSelectionImage();
|
220 |
handlersImage = (BufferedImage)getHandlersImage();
|
221 |
}else{
|
222 |
selectionImage = new BufferedImage(vp.getImageWidth(), vp.getImageHeight(), BufferedImage.TYPE_INT_ARGB); |
223 |
handlersImage = new BufferedImage(vp.getImageWidth(), vp.getImageHeight(), BufferedImage.TYPE_INT_ARGB); |
224 |
} |
225 |
Graphics2D gs = selectionImage.createGraphics();
|
226 |
Graphics2D gh = handlersImage.createGraphics();
|
227 |
FeatureSelection featureSelection = null;
|
228 |
if (multipleSelection){
|
229 |
featureSelection=(FeatureSelection)featureStore.getSelection(); |
230 |
featureSelection.select(set); |
231 |
}else{
|
232 |
featureSelection=featureStore.createFeatureSelection(); |
233 |
featureSelection.select(set); |
234 |
featureStore.setSelection(featureSelection); |
235 |
} |
236 |
|
237 |
Iterator<Feature> iterator = set.iterator();
|
238 |
|
239 |
DrawOperationContext doc = new DrawOperationContext();
|
240 |
doc.setGraphics(gs); |
241 |
doc.setViewPort(vp); |
242 |
doc.setSymbol(DefaultCADTool.selectionSymbol); |
243 |
while (iterator.hasNext()) {
|
244 |
Feature feature = (Feature) iterator.next(); |
245 |
org.gvsig.fmap.geom.Geometry geom = (org.gvsig.fmap.geom.Geometry) feature |
246 |
.getDefaultGeometry(); |
247 |
if (geom == null) { |
248 |
continue;
|
249 |
} |
250 |
geom.cloneGeometry().invokeOperation(Draw.CODE, doc); |
251 |
drawHandlers(geom.cloneGeometry(), gh, vp); |
252 |
} |
253 |
|
254 |
set.dispose(); |
255 |
setSelectionImage(selectionImage); |
256 |
setHandlersImage(handlersImage); |
257 |
} |
258 |
public void selectCrossPolygon(org.gvsig.fmap.geom.Geometry polygon) { |
259 |
try {
|
260 |
FeatureStore featureStore = getFeatureStore(); |
261 |
ViewPort vp = getLayer().getMapContext().getViewPort(); |
262 |
FeatureQuery fq=new FeatureQuery();
|
263 |
fq.setAttributeNames(new String[]{featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName()}); |
264 |
Evaluator evaluator=new CrossesGeometryEvaluator(polygon, vp.getProjection(), featureStore.getDefaultFeatureType(), featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName());
|
265 |
fq.setFilter(evaluator); |
266 |
FeatureSet set = featureStore.getFeatureSet(fq); |
267 |
selectAndDrawGeometries(featureStore,set,vp,false);
|
268 |
} catch (ReadException e) {
|
269 |
NotificationManager.addError(e.getMessage(), e); |
270 |
} catch (DataException e) {
|
271 |
NotificationManager.addError(e.getMessage(), e); |
272 |
} catch (GeometryOperationNotSupportedException e) {
|
273 |
NotificationManager.addError(e.getMessage(), e); |
274 |
} catch (GeometryOperationException e) {
|
275 |
NotificationManager.addError(e.getMessage(), e); |
276 |
} |
277 |
} |
278 |
|
279 |
public void selectOutPolygon(org.gvsig.fmap.geom.Geometry polygon) { |
280 |
try {
|
281 |
FeatureStore featureStore = getFeatureStore(); |
282 |
ViewPort vp = getLayer().getMapContext().getViewPort(); |
283 |
FeatureQuery fq=new FeatureQuery();
|
284 |
fq.setAttributeNames(new String[]{featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName()}); |
285 |
Evaluator evaluator=new OutGeometryEvaluator(polygon, vp.getProjection(), featureStore.getDefaultFeatureType(), featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName());
|
286 |
fq.setFilter(evaluator); |
287 |
FeatureSet set = featureStore.getFeatureSet(fq); |
288 |
selectAndDrawGeometries(featureStore, set, vp, false);
|
289 |
|
290 |
} catch (ReadException e) {
|
291 |
NotificationManager.addError(e.getMessage(), e); |
292 |
} catch (DataException e) {
|
293 |
NotificationManager.addError(e.getMessage(), e); |
294 |
} catch (GeometryOperationNotSupportedException e) {
|
295 |
NotificationManager.addError(e.getMessage(), e); |
296 |
} catch (GeometryOperationException e) {
|
297 |
NotificationManager.addError(e.getMessage(), e); |
298 |
} |
299 |
} |
300 |
|
301 |
public void selectAll() { |
302 |
try {
|
303 |
FeatureStore featureStore = getFeatureStore(); |
304 |
ViewPort vp = getLayer().getMapContext().getViewPort(); |
305 |
FeatureSet set = featureStore.getFeatureSet(); |
306 |
selectAndDrawGeometries(featureStore, set, vp, false);
|
307 |
} catch (ReadException e) {
|
308 |
NotificationManager.addError(e.getMessage(), e); |
309 |
} catch (DataException e) {
|
310 |
NotificationManager.addError(e.getMessage(), e); |
311 |
} catch (GeometryOperationNotSupportedException e) {
|
312 |
NotificationManager.addError(e.getMessage(), e); |
313 |
} catch (GeometryOperationException e) {
|
314 |
NotificationManager.addError(e.getMessage(), e); |
315 |
} |
316 |
} |
317 |
|
318 |
public void drawHandlers(org.gvsig.fmap.geom.Geometry geom, Graphics2D gs, |
319 |
ViewPort vp) { |
320 |
// if (!(getLayer() instanceof FLyrAnnotation)){
|
321 |
Handler[] handlers = geom |
322 |
.getHandlers(org.gvsig.fmap.geom.Geometry.SELECTHANDLER); |
323 |
FGraphicUtilities.DrawHandlers(gs, vp.getAffineTransform(), handlers, |
324 |
DefaultCADTool.handlerSymbol); |
325 |
// }
|
326 |
} |
327 |
|
328 |
public Image getSelectionImage() { |
329 |
return imageSelection;
|
330 |
} |
331 |
|
332 |
public void setSelectionImage(Image image) { |
333 |
imageSelection = image; |
334 |
} |
335 |
|
336 |
public Image getHandlersImage() { |
337 |
return imageHandlers;
|
338 |
} |
339 |
|
340 |
public void setHandlersImage(Image image) { |
341 |
imageHandlers = image; |
342 |
} |
343 |
|
344 |
public void beforeLayerDraw(LayerDrawEvent e) throws CancelationException { |
345 |
FeatureStore featureStore = null;
|
346 |
try {
|
347 |
featureStore = getFeatureStore(); |
348 |
} catch (ReadException e2) {
|
349 |
e2.printStackTrace(); |
350 |
} |
351 |
if (featureStore.isEditing()) {
|
352 |
ViewPort vp = getLayer().getMapContext().getViewPort(); |
353 |
BufferedImage selectionImage = new BufferedImage( |
354 |
vp.getImageWidth(), vp.getImageHeight(), |
355 |
BufferedImage.TYPE_INT_ARGB);
|
356 |
BufferedImage handlersImage = new BufferedImage(vp.getImageWidth(), |
357 |
vp.getImageHeight(), BufferedImage.TYPE_INT_ARGB);
|
358 |
Graphics2D gs = selectionImage.createGraphics();
|
359 |
Graphics2D gh = handlersImage.createGraphics();
|
360 |
Iterator iterator = null; |
361 |
try {
|
362 |
iterator = featureStore.getFeatureSelection() |
363 |
.iterator(); |
364 |
} catch (DataException e2) {
|
365 |
e2.printStackTrace(); |
366 |
} |
367 |
try{
|
368 |
while (iterator.hasNext()) {
|
369 |
Feature feature = (Feature) iterator.next(); |
370 |
org.gvsig.fmap.geom.Geometry geom = (org.gvsig.fmap.geom.Geometry) feature |
371 |
.getDefaultGeometry(); |
372 |
|
373 |
DrawOperationContext doc = new DrawOperationContext();
|
374 |
doc.setGraphics(gs); |
375 |
doc.setViewPort(vp); |
376 |
doc.setSymbol(DefaultCADTool.selectionSymbol); |
377 |
try {
|
378 |
geom.cloneGeometry().invokeOperation(Draw.CODE, doc); |
379 |
} catch (GeometryOperationNotSupportedException e1) {
|
380 |
e1.printStackTrace(); |
381 |
} catch (GeometryOperationException e1) {
|
382 |
e1.printStackTrace(); |
383 |
} |
384 |
drawHandlers(geom.cloneGeometry(), gh, vp); |
385 |
} |
386 |
}catch (ConcurrentModificationException e1) { |
387 |
// throw new CancelationException(e1);
|
388 |
//A mitad de pintado se cambia la selecci?n y por tanto no se puede seguir recorriendo la anterior.
|
389 |
return;
|
390 |
} |
391 |
setSelectionImage(selectionImage); |
392 |
setHandlersImage(handlersImage); |
393 |
} |
394 |
} |
395 |
|
396 |
public void afterLayerDraw(LayerDrawEvent e) throws CancelationException { |
397 |
} |
398 |
|
399 |
public void beforeGraphicLayerDraw(LayerDrawEvent e) |
400 |
throws CancelationException {
|
401 |
} |
402 |
|
403 |
public void afterLayerGraphicDraw(LayerDrawEvent e) |
404 |
throws CancelationException {
|
405 |
} |
406 |
|
407 |
public void activationGained(LayerEvent e) { |
408 |
if (ViewCommandStackExtension.csd != null) { |
409 |
try {
|
410 |
ViewCommandStackExtension.csd.setModel(((FLyrVect) getLayer()) |
411 |
.getFeatureStore()); |
412 |
} catch (ReadException e1) {
|
413 |
e1.printStackTrace(); |
414 |
} |
415 |
} |
416 |
IWindow window = PluginServices.getMDIManager().getActiveWindow(); |
417 |
if (window instanceof View) { |
418 |
View view = (View) window; |
419 |
if (e.getSource().isEditing()) {
|
420 |
view.showConsole(); |
421 |
} |
422 |
} |
423 |
if (cadtool != null) { |
424 |
CADExtension.getCADToolAdapter().setCadTool(cadtool); |
425 |
PluginServices.getMainFrame().setSelectedTool(cadtool.toString()); |
426 |
StartEditing.startCommandsApplicable(null, (FLyrVect) getLayer());
|
427 |
CADExtension.initFocus(); |
428 |
} |
429 |
|
430 |
} |
431 |
|
432 |
public void activationLost(LayerEvent e) { |
433 |
try {
|
434 |
cadtool = CADExtension.getCADTool(); |
435 |
IWindow window = PluginServices.getMDIManager().getActiveWindow(); |
436 |
if (window instanceof View) { |
437 |
View view = (View) window; |
438 |
view.hideConsole(); |
439 |
} |
440 |
} catch (EmptyStackException e1) { |
441 |
cadtool = new SelectionCADTool();
|
442 |
cadtool.init(); |
443 |
} |
444 |
|
445 |
} |
446 |
|
447 |
public void setLegend(ILegend legend) { |
448 |
this.legend = legend;
|
449 |
} |
450 |
|
451 |
public ILegend getLegend() {
|
452 |
return legend;
|
453 |
} |
454 |
|
455 |
public FeatureStore getFeatureStore() throws ReadException { |
456 |
return ((FLyrVect) getLayer()).getFeatureStore();
|
457 |
} |
458 |
|
459 |
public void update(Observable observable, Object notification) { |
460 |
echm.update(observable, notification); |
461 |
} |
462 |
|
463 |
public EditionChangeManager getEditionChangeManager() {
|
464 |
return echm;
|
465 |
} |
466 |
|
467 |
public void setEditionChangeManager(EditionChangeManager echm) { |
468 |
this.echm = echm;
|
469 |
} |
470 |
} |