Revision 45532 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/BaseViewDocument.java
BaseViewDocument.java | ||
---|---|---|
33 | 33 |
import javax.swing.JOptionPane; |
34 | 34 |
import javax.swing.JPanel; |
35 | 35 |
import javax.swing.JScrollPane; |
36 |
import org.apache.commons.lang.StringUtils; |
|
36 | 37 |
|
37 | 38 |
import org.cresques.cts.IProjection; |
38 | 39 |
|
... | ... | |
44 | 45 |
import org.gvsig.app.project.documents.DocumentManager; |
45 | 46 |
import org.gvsig.app.project.documents.view.info.gui.HTMLInfoToolPanel; |
46 | 47 |
import org.gvsig.fmap.dal.DataStore; |
48 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
47 | 49 |
import org.gvsig.fmap.geom.Geometry; |
48 | 50 |
import org.gvsig.fmap.geom.GeometryLocator; |
49 | 51 |
import org.gvsig.fmap.geom.primitive.Envelope; |
... | ... | |
56 | 58 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
57 | 59 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
58 | 60 |
import org.gvsig.fmap.mapcontext.layers.operations.SingleLayer; |
61 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
59 | 62 |
import org.gvsig.tools.exception.BaseException; |
60 | 63 |
import org.gvsig.tools.persistence.PersistentState; |
61 | 64 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
... | ... | |
415 | 418 |
} |
416 | 419 |
|
417 | 420 |
} |
421 |
|
|
422 |
@Override |
|
423 |
public boolean contains(Object value) { |
|
424 |
if( value == null ) { |
|
425 |
return false; |
|
426 |
} |
|
427 |
if( !(value instanceof FeatureStore) ) { |
|
428 |
return false; |
|
429 |
} |
|
430 |
String storeFullName = ((FeatureStore)value).getFullName(); |
|
431 |
for (Iterator<FLayer> it = this.deepiterator(); it.hasNext();) { |
|
432 |
FLayer layer = it.next(); |
|
433 |
if(layer instanceof FLyrVect){ |
|
434 |
if( StringUtils.equals(((FLyrVect) layer).getFeatureStore().getFullName(), storeFullName)){ |
|
435 |
return true; |
|
436 |
} |
|
437 |
} |
|
438 |
} |
|
439 |
return false; |
|
440 |
} |
|
441 |
|
|
442 |
@Override |
|
443 |
public void refresh() { |
|
444 |
this.getMapContext().invalidate(); |
|
445 |
} |
|
446 |
|
|
418 | 447 |
} |
Also available in: Unified diff