imp.addImagePanelListener(new DataVisualizationListener() {
@Override
public void originalVisualizationChanged(DataVisualizationChangedEvent event) {
DataVisualization dataVis = (DataVisualization)event.getSource();
dataVis.fireSaveStateChange(true);
dataVis.getTopComponent().requestActive();
}
});
WindowManager.getDefault().invokeWhenUIReady(new Runnable() {