com.vividsolutions.jump.workbench.model
Class LayerManager
java.lang.Object
com.vividsolutions.jump.workbench.model.LayerManager
- public class LayerManager
- extends java.lang.Object
Registry of Layers in a Task.
- See Also:
Task,
Layer
|
Method Summary |
void |
addCategory(java.lang.String categoryName)
|
void |
addCategory(java.lang.String categoryName,
int index)
|
Layer |
addLayer(java.lang.String categoryName,
Layer layer)
|
Layer |
addLayer(java.lang.String categoryName,
java.lang.String layerName,
FeatureCollection featureCollection)
|
void |
addLayerable(java.lang.String categoryName,
Layerable layerable)
|
void |
addLayerListener(LayerListener layerListener)
|
Layer |
addOrReplaceLayer(java.lang.String categoryName,
java.lang.String layerName,
FeatureCollection featureCollection)
|
void |
deferFiringEvents(java.lang.Runnable r)
|
void |
dispose()
|
void |
fireCategoryChanged(Category category,
CategoryEventType type)
|
void |
fireFeaturesChanged(java.util.Collection features,
FeatureEventType type,
Layer layer)
|
void |
fireGeometryModified(java.util.Collection features,
Layer layer,
java.util.Collection oldFeatureClones)
|
void |
fireLayerChanged(Layerable layerable,
LayerEventType type)
|
java.awt.Color |
generateLayerFillColor()
|
Blackboard |
getBlackboard()
|
java.util.List |
getCategories()
|
Category |
getCategory(Layerable layerable)
|
Category |
getCategory(java.lang.String name)
|
CoordinateSystem |
getCoordinateSystem()
|
java.util.Collection |
getEditableLayers()
Editability is not enforced; all parties are responsible for heeding the
editability of a layer. |
com.vividsolutions.jts.geom.Envelope |
getEnvelopeOfAllLayers()
|
com.vividsolutions.jts.geom.Envelope |
getEnvelopeOfAllLayers(boolean visibleLayersOnly)
|
Layer |
getLayer(int index)
|
Layer |
getLayer(java.lang.String name)
|
java.util.List |
getLayerables(java.lang.Class layerableClass)
To get all Layerables, set layerableClass to Layerable.class. |
java.util.List |
getLayers()
|
java.util.Collection |
getLayersWithModifiedFeatureCollections()
|
UndoableEditReceiver |
getUndoableEditReceiver()
|
java.util.List |
getVisibleLayers(boolean includeFence)
|
int |
indexOf(Category category)
|
int |
indexOf(Layer layer)
|
boolean |
isFiringEvents()
|
java.util.Iterator |
iterator()
|
static int |
layerManagerCount()
|
static void |
main(java.lang.String[] args)
|
void |
remove(Layerable layerable)
|
void |
removeIfEmpty(Category category)
|
void |
removeLayerListener(LayerListener layerListener)
|
java.util.Iterator |
reverseIterator(java.lang.Class layerableClass)
|
void |
setCoordinateSystem(CoordinateSystem coordinateSystem)
|
void |
setFiringEvents(boolean firingEvents)
|
int |
size()
|
java.lang.String |
uniqueLayerName(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LayerManager
public LayerManager()
getUndoableEditReceiver
public UndoableEditReceiver getUndoableEditReceiver()
deferFiringEvents
public void deferFiringEvents(java.lang.Runnable r)
generateLayerFillColor
public java.awt.Color generateLayerFillColor()
addLayer
public Layer addLayer(java.lang.String categoryName,
Layer layer)
addLayerable
public void addLayerable(java.lang.String categoryName,
Layerable layerable)
addCategory
public void addCategory(java.lang.String categoryName)
addCategory
public void addCategory(java.lang.String categoryName,
int index)
getCategory
public Category getCategory(java.lang.String name)
getCategories
public java.util.List getCategories()
addLayer
public Layer addLayer(java.lang.String categoryName,
java.lang.String layerName,
FeatureCollection featureCollection)
addOrReplaceLayer
public Layer addOrReplaceLayer(java.lang.String categoryName,
java.lang.String layerName,
FeatureCollection featureCollection)
uniqueLayerName
public java.lang.String uniqueLayerName(java.lang.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(java.util.Collection features,
FeatureEventType type,
Layer layer)
fireGeometryModified
public void fireGeometryModified(java.util.Collection features,
Layer layer,
java.util.Collection oldFeatureClones)
fireLayerChanged
public void fireLayerChanged(Layerable layerable,
LayerEventType type)
setFiringEvents
public void setFiringEvents(boolean firingEvents)
isFiringEvents
public boolean isFiringEvents()
reverseIterator
public java.util.Iterator reverseIterator(java.lang.Class layerableClass)
- Returns:
- an iterator over the layers, from bottom to top. Layers with
#drawingLast = true appear last.
iterator
public java.util.Iterator iterator()
- Returns:
- Layers, not all Layerables
getLayer
public Layer getLayer(java.lang.String name)
- Returns:
- null if there is no such layer
addLayerListener
public void addLayerListener(LayerListener layerListener)
removeLayerListener
public void removeLayerListener(LayerListener layerListener)
getLayer
public Layer getLayer(int index)
size
public int size()
getEnvelopeOfAllLayers
public com.vividsolutions.jts.geom.Envelope getEnvelopeOfAllLayers()
getEnvelopeOfAllLayers
public com.vividsolutions.jts.geom.Envelope getEnvelopeOfAllLayers(boolean visibleLayersOnly)
- Parameters:
visibleLayersOnly -
- Returns:
indexOf
public int indexOf(Layer layer)
- Returns:
- -1 if the layer does not exist
getCategory
public Category getCategory(Layerable layerable)
getLayers
public java.util.List getLayers()
getLayerables
public java.util.List getLayerables(java.lang.Class layerableClass)
- To get all Layerables, set layerableClass to Layerable.class.
getVisibleLayers
public java.util.List getVisibleLayers(boolean includeFence)
dispose
public void dispose()
layerManagerCount
public static int layerManagerCount()
getEditableLayers
public java.util.Collection getEditableLayers()
- Editability is not enforced; all parties are responsible for heeding the
editability of a layer.
getBlackboard
public Blackboard getBlackboard()
getLayersWithModifiedFeatureCollections
public java.util.Collection getLayersWithModifiedFeatureCollections()
setCoordinateSystem
public void setCoordinateSystem(CoordinateSystem coordinateSystem)
main
public static void main(java.lang.String[] args)
throws com.vividsolutions.jts.io.ParseException
- Throws:
com.vividsolutions.jts.io.ParseException
getCoordinateSystem
public CoordinateSystem getCoordinateSystem()