View Javadoc

1   // %2330994818:hoplugins.trainingExperience.ui%
2   package hoplugins.trainingExperience.ui;
3   
4   import hoplugins.Commons;
5   
6   import hoplugins.commons.utils.PluginProperty;
7   
8   import java.awt.BorderLayout;
9   
10  import javax.swing.JPanel;
11  import javax.swing.JTabbedPane;
12  
13  
14  /***
15   * The Main Tab Panel
16   *
17   * @author <a href=mailto:draghetto@users.sourceforge.net>Massimiliano Amato</a>
18   */
19  public class MainPanel extends JPanel {
20      //~ Instance fields ----------------------------------------------------------------------------
21  
22      private AnalyzerPanel analyzer;
23      private EffectPanel effect;
24      private OutputPanel output;
25      private TrainingRecapPanel recap;
26  
27      //~ Constructors -------------------------------------------------------------------------------
28  
29      /***
30       * Creates a new OutputPanel object.
31       */
32      public MainPanel() {
33          super();
34          output = new OutputPanel();
35          recap = new TrainingRecapPanel();
36          analyzer = new AnalyzerPanel();
37          effect = new EffectPanel();
38          jbInit();
39      }
40  
41      //~ Methods ------------------------------------------------------------------------------------
42  
43      /***
44       * TODO Missing Method Documentation
45       *
46       * @return TODO Missing Return Method Documentation
47       */
48      public OutputPanel getOutput() {
49          return output;
50      }
51  
52      /***
53       * Return Recap Panel
54       *
55       * @return TrainingRecapPanel
56       */
57      public TrainingRecapPanel getRecap() {
58          return recap;
59      }
60  
61      /***
62       * update the panel with the new value
63       */
64      public void reload() {
65          output.reload();
66          recap.reload();
67          analyzer.reload();
68          effect.reload();
69      }
70  
71      /***
72       * Initialize the GUI
73       */
74      private void jbInit() {
75          setLayout(new BorderLayout());
76  
77          JTabbedPane pane = new JTabbedPane();
78  
79          pane.addTab(Commons.getModel().getResource().getProperty("Training"), output);
80          pane.addTab(PluginProperty.getString("MainPanel.Prediction"), recap);
81          pane.addTab(PluginProperty.getString("MainPanel.Analyzer"), analyzer);
82          pane.addTab(PluginProperty.getString("MainPanel.Effect"), effect);
83          add(pane, BorderLayout.CENTER);
84      }
85  }