@@ -0,0 +1,2333 @@
+/*******************************************************************************%0A * Mission Control Technologies, Copyright (c) 2009-2012, United States Government%0A * as represented by the Administrator of the National Aeronautics and Space %0A * Administration. All rights reserved.%0A *%0A * The MCT platform is licensed under the Apache License, Version 2.0 (the %0A * %22License%22); you may not use this file except in compliance with the License. %0A * You may obtain a copy of the License at %0A * http://www.apache.org/licenses/LICENSE-2.0.%0A *%0A * Unless required by applicable law or agreed to in writing, software %0A * distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT %0A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the %0A * License for the specific language governing permissions and limitations under %0A * the License.%0A *%0A * MCT includes source code licensed under additional open source licenses. See %0A * the MCT Open Source Licenses file included with this distribution or the About %0A * MCT Licenses dialog available at runtime from the MCT Help menu for additional %0A * information. %0A *******************************************************************************/%0Apackage gov.nasa.arc.mct.scenario.actions;%0A%0Aimport gov.nasa.arc.mct.components.AbstractComponent;%0A%0Aimport java.awt.Component;%0Aimport java.beans.PropertyChangeEvent;%0Aimport java.beans.PropertyChangeListener;%0Aimport java.io.File;%0Aimport java.util.Collection;%0A%0Aimport javax.swing.ProgressMonitor;%0A%0Apublic class CSVExporter %7B%0A%09private Component component;%0A%09private Collection%3CAbstractComponent%3E components;%0A%09private File file;%0A%09%0A%09public CSVExporter(Component component,%0A%09%09%09Collection%3CAbstractComponent%3E components, File file) %7B%0A%09%09super();%0A%09%09this.component = component;%0A%09%09this.components = components;%0A%09%09this.file = file;%0A%09%7D%0A%09%0A%09public void export() %7B%0A%09%09final CSVExportWorker worker = new CSVExportWorker(components, file);%0A%09%09final ProgressMonitor monitor = new ProgressMonitor(component, %22Exporting%22, %22CSV export%22, 0, 100);%0A%09%09monitor.setMillisToDecideToPopup(200);%0A%09%09monitor.setMillisToPopup(750);%0A%09%09%0A%09%09worker.addPropertyChangeListener(new PropertyChangeListener() %7B%0A%09%09%09@Override%0A%09%09%09public void propertyChange(PropertyChangeEvent evt) %7B%0A%09%09%09%09monitor.setProgress(worker.getProgress());%0A%09%09%09%7D%09%09%09%0A%09%09%7D);%0A%09%09%0A%09%09worker.execute();%0A%09%7D%0A%09%0A%7D%0A

Add class to manage CSV export