View Javadoc

1   // %2136143411:hoplugins.teamAnalyzer.ui.controller%
2   package hoplugins.teamAnalyzer.ui.controller;
3   
4   import hoplugins.commons.utils.PluginProperty;
5   
6   import hoplugins.teamAnalyzer.SystemManager;
7   import hoplugins.teamAnalyzer.ui.component.DownloadPanel;
8   import hoplugins.teamAnalyzer.vo.Team;
9   
10  import java.awt.event.ActionEvent;
11  import java.awt.event.ActionListener;
12  
13  import javax.swing.JOptionPane;
14  
15  
16  /***
17   * Action listener for the download menu item
18   *
19   * @author <a href=mailto:draghetto@users.sourceforge.net>Massimiliano Amato</a>
20   */
21  public class DownloadItemListener implements ActionListener {
22      //~ Methods ------------------------------------------------------------------------------------
23  
24      /***
25       * Action performed event listener Show the download dialog
26       *
27       * @param arg0 the event
28       */
29      public void actionPerformed(ActionEvent arg0) {
30          JOptionPane.showMessageDialog(SystemManager.getPlugin().getPluginPanel(),
31                                        new DownloadPanel(),
32                                        PluginProperty.getString("Menu.DownloadMatch"),
33                                        JOptionPane.PLAIN_MESSAGE);
34          ;
35  
36          Team selectedTeam = SystemManager.getPlugin().getFilterPanel().getSelectedTeam();
37  
38          SystemManager.setActiveTeam(selectedTeam);
39          SystemManager.refresh();
40      }
41  }