1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
44
45
46
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
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 }