@Override public void stop(VisatApp visatApp) { visatApp.getProductManager().removeListener(productManagerListener); }
public synchronized void releaseProducts() { appContext.getProductManager().removeListener(productManagerListener); if (extraProduct != null && getSelectedProduct() != extraProduct) { extraProduct.dispose(); } extraProduct = null; productListModel.removeAllElements(); }
/** * Sets the <code>TreeModel</code> that will provide the data. * * @param newModel the <code>TreeModel</code> that is to provide the data. Must be an * instance of {@link org.esa.beam.framework.ui.product.tree.ProductTreeModel}. * description: The TreeModel that will provide the data. */ @Override public void setModel(TreeModel newModel) { if (newModel != null && !(newModel instanceof ProductTreeModel)) { throw new IllegalStateException("newModel must be instance of ProductTreeModel"); } if (getModel() != null) { ProductManager productManager = getModel().getProductManager(); productManager.removeListener(productManagerListener); getModel().removeTreeModelListener(productTreeModelListener); } if (newModel != null) { ProductTreeModel ptm = (ProductTreeModel) newModel; ptm.getProductManager().addListener(productManagerListener); ptm.addTreeModelListener(productTreeModelListener); } super.setModel(newModel); }