01: package org.objectweb.salome_tmf.ihm.main;
02:
03: import java.awt.BorderLayout;
04:
05: import javax.swing.JPanel;
06: import javax.swing.JTabbedPane;
07: import javax.swing.event.ChangeEvent;
08: import javax.swing.event.ChangeListener;
09:
10: import org.objectweb.salome_tmf.ihm.IHMConstants;
11: import org.objectweb.salome_tmf.ihm.tools.Tools;
12: import org.objectweb.salome_tmf.plugins.core.BugTracker;
13: import org.objectweb.salome_tmf.plugins.core.ReqManager;
14:
15: public class IndicatorsPanel extends JPanel implements IHMConstants {
16:
17: private JTabbedPane indicatorsTabbedPane;
18:
19: private QsScorePanel qsScorePanel;
20:
21: private IcalPanel icalPanel;
22:
23: private BugTracker mantis;
24:
25: private ReqManager reqPlug;
26:
27: public IndicatorsPanel(BugTracker mantis, ReqManager req) {
28: super (new BorderLayout());
29: this .mantis = mantis;
30: this .reqPlug = req;
31: }
32:
33: void initComponents() {
34: try {
35: indicatorsTabbedPane = new JTabbedPane();
36: add(indicatorsTabbedPane, BorderLayout.CENTER);
37: indicatorsTabbedPane
38: .addChangeListener(new ChangeListener() {
39: public void stateChanged(ChangeEvent evt) {
40: indicatorsTabbedPaneStateChanged(evt);
41: }
42: });
43: if (reqPlug != null) {
44: qsScorePanel = new QsScorePanel(mantis, reqPlug);
45: indicatorsTabbedPane.addTab("QS SCORE",
46: Tools.createAppletImageIcon(
47: PATH_TO_QSSCORE_ICON, ""),
48: qsScorePanel, "QS SCORE");
49: }
50: icalPanel = new IcalPanel(mantis);
51: indicatorsTabbedPane.addTab("ICAL", Tools
52: .createAppletImageIcon(PATH_TO_ICAL_ICON, ""),
53: icalPanel, "ICAL");
54: } catch (Exception e) {
55: e.printStackTrace();
56: }
57: }
58:
59: private void indicatorsTabbedPaneStateChanged(ChangeEvent evt) {
60: //TODO
61: }
62:
63: }
|