Package org.geotools.swing
Class SingleLayerMapContent
- Object
-
- MapContent
-
- SingleLayerMapContent
-
public class SingleLayerMapContent extends MapContent
Used by DefaultRenderingExecutor to hold a singleLayer
that is being passed to a renderer. Calling thedispose
method of this class does not dispose of the layer unlike MapContent.dispose(). It does not permit subsequent changes to its layer list.- Since:
- 8.0
- Author:
- Michael Bedward
-
-
Field Summary
-
Fields inherited from class MapContent
LOGGER, viewport
-
-
Constructor Summary
Constructors Constructor Description SingleLayerMapContent(Layer layer)
Creates a new instance to hold the given layer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addLayer(Layer layer)
Throws anUnsupportedOperationException
if called.void
dispose()
Does nothing.protected void
finalize()
Does nothing.void
moveLayer(int sourcePosition, int destPosition)
Throws anUnsupportedOperationException
if called.boolean
removeLayer(Layer layer)
Throws anUnsupportedOperationException
if called.-
Methods inherited from class MapContent
addLayers, addMapBoundsListener, addMapLayerListListener, addPropertyChangeListener, fireLayerAdded, fireLayerEvent, fireLayerMoved, fireLayerPreDispose, fireLayerRemoved, fireProperty, getCoordinateReferenceSystem, getMaxBounds, getTitle, getUserData, getViewport, layers, listenToMapLayers, removeMapBoundsListener, removeMapLayerListListener, removePropertyChangeListener, setTitle, setViewport
-
-
-
-
Constructor Detail
-
SingleLayerMapContent
public SingleLayerMapContent(Layer layer)
Creates a new instance to hold the given layer.- Parameters:
layer
- the layer- Throws:
IllegalArgumentException
- iflayer
isnull
-
-
Method Detail
-
addLayer
public boolean addLayer(Layer layer)
Throws anUnsupportedOperationException
if called.- Overrides:
addLayer
in classMapContent
- Returns:
- true if the layer was added
-
moveLayer
public void moveLayer(int sourcePosition, int destPosition)
Throws anUnsupportedOperationException
if called.- Overrides:
moveLayer
in classMapContent
- Parameters:
sourcePosition
- existing position of the layerdestPosition
- new position of the layer
-
removeLayer
public boolean removeLayer(Layer layer)
Throws anUnsupportedOperationException
if called.- Overrides:
removeLayer
in classMapContent
- Parameters:
layer
- the layer to be removed- Returns:
true
if the layer was removed
-
dispose
public void dispose()
Does nothing.- Overrides:
dispose
in classMapContent
-
finalize
protected void finalize() throws Throwable
Does nothing.- Overrides:
finalize
in classMapContent
- Throws:
Throwable
-
-