Search in sources :

Example 1 with AbstractOverlay

use of com.revolsys.swing.map.overlay.AbstractOverlay in project com.revolsys.open by revolsys.

the class MapPanel method destroy.

public void destroy() {
    setDropTarget(null);
    Property.removeAllListeners(this);
    setDropTarget(null);
    this.layerOverlay.dispose();
    for (final Component overlay : this.layeredPane.getComponents()) {
        if (overlay instanceof AbstractOverlay) {
            final AbstractOverlay abstractOverlay = (AbstractOverlay) overlay;
            abstractOverlay.destroy();
        }
    }
    removeAll();
    this.layeredPane.removeAll();
    this.statusBarPanel.removeAll();
    this.leftStatusBar = null;
    this.rightStatusBar = null;
    if (this.baseMapLayers != null) {
        this.baseMapLayers.delete();
    }
    this.baseMapLayers = null;
    this.baseMapOverlay = null;
    this.fileDropListener = null;
    this.layerOverlay = null;
    this.progressBar = null;
    this.project.reset();
    this.toolBar.clear();
    this.toolTipOverlay = null;
    this.undoManager.die();
    Property.removeAllListeners(this.viewport.getPropertyChangeSupport());
    this.zoomBookmarkButton = null;
    this.zoomHistory.clear();
}
Also used : AbstractOverlay(com.revolsys.swing.map.overlay.AbstractOverlay) Component(java.awt.Component) GeometryComponent(com.revolsys.geometry.model.GeometryComponent) JComponent(javax.swing.JComponent)

Aggregations

GeometryComponent (com.revolsys.geometry.model.GeometryComponent)1 AbstractOverlay (com.revolsys.swing.map.overlay.AbstractOverlay)1 Component (java.awt.Component)1 JComponent (javax.swing.JComponent)1