Package org.geotools.swing
Class SingleLayerMapContent
- Object
-
- MapContent
-
- SingleLayerMapContent
-
public class SingleLayerMapContent extends MapContent
Used by DefaultRenderingExecutor to hold a singleLayerthat is being passed to a renderer. Calling thedisposemethod 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 booleanaddLayer(Layer layer)Throws anUnsupportedOperationExceptionif called.voiddispose()Does nothing.protected voidfinalize()Does nothing.voidmoveLayer(int sourcePosition, int destPosition)Throws anUnsupportedOperationExceptionif called.booleanremoveLayer(Layer layer)Throws anUnsupportedOperationExceptionif 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- iflayerisnull
-
-
Method Detail
-
addLayer
public boolean addLayer(Layer layer)
Throws anUnsupportedOperationExceptionif called.- Overrides:
addLayerin classMapContent- Returns:
- true if the layer was added
-
moveLayer
public void moveLayer(int sourcePosition, int destPosition)Throws anUnsupportedOperationExceptionif called.- Overrides:
moveLayerin classMapContent- Parameters:
sourcePosition- existing position of the layerdestPosition- new position of the layer
-
removeLayer
public boolean removeLayer(Layer layer)
Throws anUnsupportedOperationExceptionif called.- Overrides:
removeLayerin classMapContent- Parameters:
layer- the layer to be removed- Returns:
trueif the layer was removed
-
dispose
public void dispose()
Does nothing.- Overrides:
disposein classMapContent
-
finalize
protected void finalize() throws ThrowableDoes nothing.- Overrides:
finalizein classMapContent- Throws:
Throwable
-
-