@Override protected void finalize() throws Throwable { // ok, ditch the layer if (_myLayer != null) _myLayer.dispose(); // and let the parent do it's stuff super.finalize(); }
@Override public void setVisible(boolean visible) { super.setVisible(visible); if (_myLayer != null) _myLayer.setVisible(visible); }