@Test public void testDispose() { MapContent map = new MapContent(); map.dispose(); map = new MapContent(DefaultGeographicCRS.WGS84); map.dispose(); }
public void dispose(){ if( this.mapListeners != null ){ this.mapListeners.clear(); this.mapListeners = null; } if( this.layerList != null ){ for( Layer layer : layerList ){ if( layer == null ) continue; if( this.layerListener != null ){ layer.removeMapLayerListener(layerListener); } layer.dispose(); } layerList.clear(); layerList = null; } if( this.layerListener != null ){ this.layerListener = null; } if( this.propertyListeners != null ){ this.propertyListeners.clear(); this.propertyListeners = null; } this.title = null; if( this.userData != null ){ this.userData.clear(); this.userData = null; } }
MapContent { public void dispose(){ if( this.mapListeners != null ){ this.mapListeners.clear(); this.mapListeners = null; } if( this.layerList != null ){ for( Layer layer : layerList ){ if( layer == null ) continue; if( this.layerListener != null ){ layer.removeMapLayerListener(layerListener); } layer.dispose(); } layerList.clear(); layerList = null; } if( this.layerListener != null ){ this.layerListener = null; } if( this.propertyListeners != null ){ this.propertyListeners.clear(); this.propertyListeners = null; } this.title = null; if( this.userData != null ){ this.userData.clear(); this.userData = null; } } }
MapContent { public void dispose(){ if( this.mapListeners != null ){ this.mapListeners.clear(); this.mapListeners = null; } if( this.layerList != null ){ for( Layer layer : layerList ){ if( layer == null ) continue; if( this.layerListener != null ){ layer.removeMapLayerListener(layerListener); } layer.dispose(); } layerList.clear(); layerList = null; } if( this.layerListener != null ){ this.layerListener = null; } if( this.propertyListeners != null ){ this.propertyListeners.clear(); this.propertyListeners = null; } this.title = null; if( this.userData != null ){ this.userData.clear(); this.userData = null; } } MapContent();  MapContent(MapContext context); @Deprecated  MapContent(CoordinateReferenceSystem crs); @Deprecated  MapContent(MapLayer[] array); @Deprecated  MapContent(MapLayer[] array, CoordinateReferenceSystem crs); @Deprecated  MapContent(MapLayer[] array, String title, String contextAbstract, String contactInformation,
            String[] keywords); @Deprecated  MapContent(MapLayer[] array, String title, String contextAbstract, String contactInformation,
            String[] keywords, final CoordinateReferenceSystem crs); }
MapContent { public void dispose(){ if( this.mapListeners != null ){ this.mapListeners.clear(); this.mapListeners = null; } if( this.layerList != null ){ for( Layer layer : layerList ){ if( layer == null ) continue; if( this.layerListener != null ){ layer.removeMapLayerListener(layerListener); } layer.dispose(); } layerList.clear(); layerList = null; } if( this.layerListener != null ){ this.layerListener = null; } if( this.propertyListeners != null ){ this.propertyListeners.clear(); this.propertyListeners = null; } this.title = null; if( this.userData != null ){ this.userData.clear(); this.userData = null; } } MapContent();  MapContent(MapContext context); @Deprecated  MapContent(CoordinateReferenceSystem crs); @Deprecated  MapContent(MapLayer[] array); @Deprecated  MapContent(MapLayer[] array, CoordinateReferenceSystem crs); @Deprecated  MapContent(MapLayer[] array, String title, String contextAbstract, String contactInformation,
            String[] keywords); @Deprecated  MapContent(MapLayer[] array, String title, String contextAbstract, String contactInformation,
            String[] keywords, final CoordinateReferenceSystem crs); void dispose(); void addMapLayerListListener(MapLayerListListener listener); void removeMapLayerListListener(MapLayerListListener listener); boolean addLayer(Layer layer); boolean removeLayer(Layer layer); void moveLayer(int sourcePosition, int destPosition); synchronized CopyOnWriteArrayList<Layer> layers(); ReferencedEnvelope getMaxBounds(); synchronized MapViewport getViewport(); void addMapBoundsListener(MapBoundsListener listener); void removeMapBoundsListener(MapBoundsListener listener); CoordinateReferenceSystem getCoordinateReferenceSystem(); void addPropertyChangeListener(java.beans.PropertyChangeListener listener); void removePropertyChangeListener(java.beans.PropertyChangeListener listener); synchronized java.util.Map<String, Object> getUserData(); String getTitle(); void setTitle(String title); }
MapContent { public void dispose(){ if( this.mapListeners != null ){ this.mapListeners.clear(); this.mapListeners = null; } if( this.layerList != null ){ for( Layer layer : layerList ){ if( layer == null ) continue; if( this.layerListener != null ){ layer.removeMapLayerListener(layerListener); } layer.dispose(); } layerList.clear(); layerList = null; } if( this.layerListener != null ){ this.layerListener = null; } if( this.propertyListeners != null ){ this.propertyListeners.clear(); this.propertyListeners = null; } this.title = null; if( this.userData != null ){ this.userData.clear(); this.userData = null; } } MapContent();  MapContent(MapContext context); @Deprecated  MapContent(CoordinateReferenceSystem crs); @Deprecated  MapContent(MapLayer[] array); @Deprecated  MapContent(MapLayer[] array, CoordinateReferenceSystem crs); @Deprecated  MapContent(MapLayer[] array, String title, String contextAbstract, String contactInformation,
            String[] keywords); @Deprecated  MapContent(MapLayer[] array, String title, String contextAbstract, String contactInformation,
            String[] keywords, final CoordinateReferenceSystem crs); void dispose(); void addMapLayerListListener(MapLayerListListener listener); void removeMapLayerListListener(MapLayerListListener listener); boolean addLayer(Layer layer); boolean removeLayer(Layer layer); void moveLayer(int sourcePosition, int destPosition); synchronized CopyOnWriteArrayList<Layer> layers(); ReferencedEnvelope getMaxBounds(); synchronized MapViewport getViewport(); void addMapBoundsListener(MapBoundsListener listener); void removeMapBoundsListener(MapBoundsListener listener); CoordinateReferenceSystem getCoordinateReferenceSystem(); void addPropertyChangeListener(java.beans.PropertyChangeListener listener); void removePropertyChangeListener(java.beans.PropertyChangeListener listener); synchronized java.util.Map<String, Object> getUserData(); String getTitle(); void setTitle(String title);  }