View Javadoc

1   /*
2    * @(#)$Id: WelcomeView.java 739 2009-08-14 18:59:10Z kurmannu $
3    *
4    * Author		:	Ueli Kurmann, igesture@uelikurmann.ch
5    *                  
6    *
7    * Purpose		: 
8    *
9    * -----------------------------------------------------------------------
10   *
11   * Revision Information:
12   *
13   * Date				Who			Reason
14   *
15   * 17.04.2008			ukurmann	Initial Release
16   *
17   * -----------------------------------------------------------------------
18   *
19   * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20   *
21   * This software is the proprietary information of ETH Zurich.
22   * Use is subject to license terms.
23   * 
24   */
25  
26  
27  package org.ximtec.igesture.tool.view.welcome;
28  
29  import java.awt.Dimension;
30  import java.net.URL;
31  
32  import javax.swing.Icon;
33  import javax.swing.JComponent;
34  
35  import org.ximtec.igesture.tool.core.Controller;
36  import org.ximtec.igesture.tool.core.TabbedView;
37  import org.ximtec.igesture.tool.util.HtmlPanel;
38  import org.ximtec.igesture.tool.util.TitleFactory;
39  import org.ximtec.igesture.tool.view.AbstractPanel;
40  
41  
42  /**
43   * Comment
44   * 
45   * @version 1.0 17.04.2008
46   * @author Ueli Kurmann
47   */
48  public class WelcomeView extends AbstractPanel implements TabbedView {
49  
50     private static final String HTML_FILE = "html/welcomeTab.html";
51  
52  
53     public WelcomeView(Controller controller) {
54        super(controller);
55        init();
56     }
57  
58  
59     private void init() {
60        setTitle(TitleFactory.createStaticTitle("Welcome to the iGesture Workbench"));
61        URL path = WelcomeView.class.getClassLoader().getResource(HTML_FILE);
62        HtmlPanel htmlPanel = new HtmlPanel(path, new Dimension(400, 400));
63        setContent(htmlPanel);
64     }
65  
66  
67     @Override
68     public Icon getIcon() {
69        return null;
70     }
71  
72  
73     @Override
74     public String getTabName() {
75        // FIXME: property file
76        return "Welcome";
77     }
78  
79  
80     @Override
81     public JComponent getPane() {
82        return this;
83     }
84  
85  
86     @Override
87     public void refreshUILogic() {
88        super.refreshUILogic();
89        init();
90     }
91  
92  }