001    // GraphLab Project: http://graphlab.sharif.edu
002    // Copyright (C) 2008 Mathematical Science Department of Sharif University of Technology
003    // Distributed under the terms of the GNU General Public License (GPL): http://www.gnu.org/licenses/
004    package graphlab.plugins.main.preview;
005    
006    import graphlab.platform.core.BlackBoard;
007    import graphlab.platform.plugin.PluginInterface;
008    import graphlab.ui.UI;
009    import org.xml.sax.SAXException;
010    
011    import java.io.IOException;
012    
013    /**
014     * @author azin
015     */
016    public class Init implements PluginInterface {
017    
018        public void init(BlackBoard blackboard) {
019            UI ui = (UI) blackboard.getData(UI.name);
020            try {
021                ui.addXML("/graphlab/plugins/main/preview/config.xml", getClass());
022            } catch (IOException e) {
023                e.printStackTrace();
024                System.out.println("xml file was not found , or IO error");
025            } catch (SAXException e) {
026                e.printStackTrace();
027            }
028        }
029    }