org.geotools.swing
Class SingleLayerMapContent

Object
  extended by MapContent
      extended by SingleLayerMapContent

public class SingleLayerMapContent
extends MapContent

Used by DefaultRenderingExecutor to hold a single Layer that is being passed to a renderer. Calling the dispose 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
SingleLayerMapContent(Layer layer)
          Creates a new instance to hold the given layer.
 
Method Summary
 boolean addLayer(Layer layer)
          Throws an UnsupportedOperationException if called.
 void dispose()
          Does nothing.
protected  void finalize()
          Does nothing.
 void moveLayer(int sourcePosition, int destPosition)
          Throws an UnsupportedOperationException if called.
 boolean removeLayer(Layer layer)
          Throws an UnsupportedOperationException 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
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleLayerMapContent

public SingleLayerMapContent(Layer layer)
Creates a new instance to hold the given layer.

Parameters:
layer - the layer
Throws:
IllegalArgumentException - if layer is null
Method Detail

addLayer

public boolean addLayer(Layer layer)
Throws an UnsupportedOperationException if called.

Overrides:
addLayer in class MapContent
Returns:

moveLayer

public void moveLayer(int sourcePosition,
                      int destPosition)
Throws an UnsupportedOperationException if called.

Overrides:
moveLayer in class MapContent
Parameters:
sourcePosition - existing position of the layer
destPosition - new position of the layer

removeLayer

public boolean removeLayer(Layer layer)
Throws an UnsupportedOperationException if called.

Overrides:
removeLayer in class MapContent
Parameters:
layer - the layer to be removed
Returns:

dispose

public void dispose()
Does nothing.

Overrides:
dispose in class MapContent

finalize

protected void finalize()
                 throws Throwable
Does nothing.

Overrides:
finalize in class MapContent
Throws:
Throwable


Copyright © 1996-2014 Geotools. All Rights Reserved.