Class LayerManager
java.lang.Object
com.vividsolutions.jump.workbench.model.LayerManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCategory(String categoryName) / Unused : we don't want to reproject new layers automatically, / even if they don't match the project's CoordinateReferenceSystemvoidaddCategory(String categoryName, int index) addLayer(String categoryName, String layerName, FeatureCollection featureCollection) voidaddLayerable(String categoryName, Layerable layerable) voidaddLayerListener(LayerListener layerListener) addOrReplaceLayer(String categoryName, String layerName, FeatureCollection featureCollection) voidvoiddispose()voidvoidvoidfireFeaturesAttChanged(Collection<Feature> features, FeatureEventType type, Layer layer, Collection<Feature> oldFeatureClones) voidfireFeaturesChanged(Collection<Feature> features, FeatureEventType type, Layer layer) voidfireGeometryModified(Collection<Feature> features, Layer layer, Collection<Feature> oldFeatureClones) voidfireLayerChanged(Layerable layerable, LayerEventType type) getCategory(Layerable layerable) getCategory(String name) Editability is not enforced; all parties are responsible for heeding the editability of a layer.org.locationtech.jts.geom.Envelopeorg.locationtech.jts.geom.EnvelopegetEnvelopeOfAllLayers(boolean visibleLayersOnly) getLayer(int index) getLayerables(Class<T> layerableClass) To get all Layerables, set layerableClass to Layerable.class.[Giuseppe Aruta] July 8 2015 Gets the list of RasterImageLayer.class registered in this managergetTask()getVisibleLayers(boolean includeFence) [Giuseppe Aruta] July 8 2015 Gets the list of WMSLayer.class registered in this managerintintboolean<T> Iterator<T> static intvoidConvenience method.voidremove, but do not dispose layer (as used e.g. by MoveLayerPlugin)voidremoveIfEmpty(Category category) voidremoveLayerListener(LayerListener layerListener) reverseIterator(Class<T> layerableClass) voidsetCoordinateSystem(CoordinateSystem coordinateSystem) voidsetFiringEvents(boolean firingEvents) intsize()uniqueLayerName(String name)
-
Constructor Details
-
LayerManager
public LayerManager() -
LayerManager
-
-
Method Details
-
getUndoableEditReceiver
-
deferFiringEvents
-
generateLayerFillColor
-
addLayer
-
addLayerable
-
addCategory
/ Unused : we don't want to reproject new layers automatically, / even if they don't match the project's CoordinateReferenceSystem -
addCategory
-
getCategory
-
getCategories
-
addLayer
- Parameters:
layerName- the name of the layer. A number will be appended if a layer with the same name already exists. Set to null to automatically generate a new name.
-
addOrReplaceLayer
public Layer addOrReplaceLayer(String categoryName, String layerName, FeatureCollection featureCollection) - Parameters:
categoryName- name of the category where the Layer will be addedlayerName- the Layer namefeatureCollection- the new FeatureCollection which will be added or which will replace the one in the previous Layer named layerName if any- Returns:
- the Layer with its new FeatureCollection
-
uniqueLayerName
-
remove
Convenience method. Use dispose rather than remove if you want to free the memory. remove is only used to temporarily remove a layer from the layer (ex. in the MoveLayerPlugIn).- Parameters:
layerable- Layerable to remove
-
remove
remove, but do not dispose layer (as used e.g. by MoveLayerPlugin) -
removeIfEmpty
-
dispose
public void dispose() -
dispose
-
dispose
-
indexOf
-
fireFeaturesChanged
-
fireGeometryModified
public void fireGeometryModified(Collection<Feature> features, Layer layer, Collection<Feature> oldFeatureClones) -
fireLayerChanged
-
setFiringEvents
public void setFiringEvents(boolean firingEvents) -
isFiringEvents
public boolean isFiringEvents() -
reverseIterator
-
iterator
-
getLayer
-
addLayerListener
-
removeLayerListener
-
getLayer
-
size
public int size() -
getEnvelopeOfAllLayers
public org.locationtech.jts.geom.Envelope getEnvelopeOfAllLayers() -
getEnvelopeOfAllLayers
public org.locationtech.jts.geom.Envelope getEnvelopeOfAllLayers(boolean visibleLayersOnly) - Returns:
- the envelope containing all layers
- Since:
- [Giuseppe Aruta] July 8 2015. Now it takes into account Sextante Raster and WMS layers
-
getWMSLayers
-
getRasterImageLayers
[Giuseppe Aruta] July 8 2015 Gets the list of RasterImageLayer.class registered in this manager -
indexOf
- Returns:
- -1 if the layer does not exist
-
getCategory
-
getLayers
-
getLayerables
-
getVisibleLayers
-
layerManagerCount
public static int layerManagerCount() -
getEditableLayers
Editability is not enforced; all parties are responsible for heeding the editability of a layer. -
getBlackboard
-
getLayersWithModifiedFeatureCollections
-
getTemporaryRasterImageLayers
- Returns:
- a List of Temporary Raster Layers (RasterImageLayer.class in TMP folder)
-
getLayersWithNullDataSource
-
setCoordinateSystem
-
getCoordinateSystem
-
fireFeaturesAttChanged
public void fireFeaturesAttChanged(Collection<Feature> features, FeatureEventType type, Layer layer, Collection<Feature> oldFeatureClones) -
getTask
-