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    
005    package graphlab.plugins.main.help;
006    
007    import graphlab.graph.ui.GHTMLPageComponent;
008    import graphlab.graph.ui.GTabbedGraphPane;
009    import graphlab.platform.core.BlackBoard;
010    import graphlab.ui.extension.UIActionExtension;
011    
012    import java.io.File;
013    import java.net.MalformedURLException;
014    
015    /**
016     * @author Azin Azadi
017     */
018    public class ShowWelcomePage implements UIActionExtension {
019    
020    
021        public ShowWelcomePage() {
022        }
023    
024        public void actionPerformed(BlackBoard blackBoard) {
025    
026            GTabbedGraphPane p = GTabbedGraphPane.getCurrentGTabbedGraphPane(blackBoard);
027            try {
028                ((GHTMLPageComponent) p.jtp.getComponentAt(0)).setPage(new File("doc/").toURL());
029                ((GHTMLPageComponent) p.jtp.getComponentAt(0)).setPage(new File("doc/welcome_page.html").toURL());
030    
031            } catch (MalformedURLException e) {
032                e.printStackTrace();
033            }
034        }
035    }