Class LayerManager
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.model.LayerManager
-
-
Constructor Summary
Constructors Constructor Description LayerManager()
-
Method Summary
-
-
-
Method Detail
-
getUndoableEditReceiver
public UndoableEditReceiver getUndoableEditReceiver()
-
deferFiringEvents
public void deferFiringEvents(Runnable r)
-
generateLayerFillColor
public Color generateLayerFillColor()
-
addCategory
public void addCategory(String categoryName)
-
addCategory
public void addCategory(String categoryName, int index)
-
getCategories
public List getCategories()
-
addLayer
public Layer addLayer(String categoryName, String layerName, FeatureCollection featureCollection)
- Parameters:
name
- 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)
-
uniqueLayerName
public String uniqueLayerName(String name)
- Returns:
- a unique layer name based on the given name
-
remove
public void remove(Layerable layerable)
-
removeIfEmpty
public void removeIfEmpty(Category category)
-
indexOf
public int indexOf(Category category)
-
fireCategoryChanged
public void fireCategoryChanged(Category category, CategoryEventType type)
-
fireFeaturesChanged
public void fireFeaturesChanged(Collection features, FeatureEventType type, Layer layer)
-
fireGeometryModified
public void fireGeometryModified(Collection features, Layer layer, Collection oldFeatureClones)
-
fireLayerChanged
public void fireLayerChanged(Layerable layerable, LayerEventType type)
-
setFiringEvents
public void setFiringEvents(boolean firingEvents)
-
isFiringEvents
public boolean isFiringEvents()
-
reverseIterator
public Iterator reverseIterator(Class layerableClass)
- Returns:
- an iterator over the layers, from bottom to top. Layers with #drawingLast = true appear last.
-
iterator
public Iterator iterator()
- Returns:
- Layers, not all Layerables
-
addLayerListener
public void addLayerListener(LayerListener layerListener)
-
removeLayerListener
public void removeLayerListener(LayerListener layerListener)
-
getLayer
public Layer getLayer(int index)
-
size
public int size()
-
getEnvelopeOfAllLayers
public org.locationtech.jts.geom.Envelope getEnvelopeOfAllLayers()
-
indexOf
public int indexOf(Layer layer)
- Returns:
- -1 if the layer does not exist
-
getLayers
public List getLayers()
-
getLayerables
public List getLayerables(Class layerableClass)
To get all Layerables, set layerableClass to Layerable.class.
-
getVisibleLayers
public List getVisibleLayers(boolean includeFence)
-
dispose
public void dispose()
-
layerManagerCount
public static int layerManagerCount()
-
getEditableLayers
public Collection getEditableLayers()
Editability is not enforced; all parties are responsible for heeding the editability of a layer.
-
getBlackboard
public Blackboard getBlackboard()
-
getLayersWithModifiedFeatureCollections
public Collection getLayersWithModifiedFeatureCollections()
-
setCoordinateSystem
public void setCoordinateSystem(CoordinateSystem coordinateSystem)
-
main
public static void main(String[] args) throws org.locationtech.jts.io.ParseException
- Throws:
org.locationtech.jts.io.ParseException
-
getCoordinateSystem
public CoordinateSystem getCoordinateSystem()
-
-