1
2
3
4
5
6 package hoplugins;
7
8 import hoplugins.commons.ui.DebugWindow;
9
10 import hoplugins.seriesstats.ui.GeneralPanelTab;
11 import hoplugins.seriesstats.ui.RatingPanelTab;
12 import hoplugins.seriesstats.ui.SeriesPanelTab;
13
14 import plugins.IHOMiniModel;
15 import plugins.IOfficialPlugin;
16 import plugins.IPlugin;
17 import plugins.IRefreshable;
18
19 import java.awt.BorderLayout;
20
21 import java.io.File;
22
23 import java.util.Date;
24
25 import javax.swing.JPanel;
26 import javax.swing.JTabbedPane;
27
28
29 /***
30 * DOCUMENT ME!
31 *
32 * @author Stefan Cyris TODO:
33 */
34 public class SeriesStats implements IPlugin, IRefreshable, IOfficialPlugin {
35
36
37 private static plugins.IDebugWindow IDB;
38
39
40
41 /***
42 * TODO Missing Method Documentation
43 *
44 * @return TODO Missing Return Method Documentation
45 */
46 public static plugins.IDebugWindow getIDB() {
47 return IDB;
48 }
49
50 /***
51 * TODO Missing Method Documentation
52 *
53 * @return TODO Missing Return Method Documentation
54 */
55 public String getName() {
56 return getPluginName() + " " + getVersion();
57 }
58
59 /***
60 * TODO Missing Method Documentation
61 *
62 * @return TODO Missing Return Method Documentation
63 */
64 public int getPluginID() {
65 return 11;
66 }
67
68 /***
69 * TODO Missing Method Documentation
70 *
71 * @return TODO Missing Return Method Documentation
72 */
73 public String getPluginName() {
74 return "SeriesStats";
75 }
76
77 /***
78 * TODO Missing Method Documentation
79 *
80 * @return TODO Missing Return Method Documentation
81 */
82 public File[] getUnquenchableFiles() {
83
84 return null;
85 }
86
87 /***
88 * TODO Missing Method Documentation
89 *
90 * @return TODO Missing Return Method Documentation
91 */
92 public double getVersion() {
93 return 1.0;
94 }
95
96 /***
97 * TODO Missing Method Documentation
98 */
99 public void refresh() {
100 Date now = new Date();
101 long nowLong = now.getTime();
102
103 IDB.append("" + nowLong + ": refresh");
104 }
105
106 /***
107 * TODO Missing Method Documentation
108 *
109 * @param myhOMiniModel TODO Missing Method Parameter Documentation
110 */
111 public void start(IHOMiniModel myhOMiniModel) {
112 final JPanel PanelOuter;
113 final JTabbedPane PanelOuterTabbed;
114
115
116 IDB = myhOMiniModel.getGUI().createDebugWindow(new java.awt.Point(100, 200),
117 new java.awt.Dimension(700, 400));
118
119
120 try {
121
122
123
124 PanelOuter = myhOMiniModel.getGUI().createImagePanel();
125 PanelOuter.setLayout(new BorderLayout());
126
127 PanelOuterTabbed = new JTabbedPane();
128 PanelOuterTabbed.addTab(myhOMiniModel.getResource().getProperty("Allgemein"),
129 new GeneralPanelTab());
130 PanelOuterTabbed.addTab(myhOMiniModel.getResource().getProperty("Bewertung"),
131 new RatingPanelTab());
132 PanelOuterTabbed.addTab(myhOMiniModel.getResource().getProperty("Liga"),
133 new SeriesPanelTab());
134 PanelOuter.add(PanelOuterTabbed, BorderLayout.CENTER);
135
136
137 myhOMiniModel.getGUI().addTab(getPluginName(), PanelOuter);
138
139
140
141
142
143
144
145
146
147
148
149 refresh();
150 } catch (RuntimeException e) {
151 DebugWindow.debug(e);
152 }
153 }
154 }