Coverage Report - org.jtheque.films.stats.view.impl.JMenuBarStats
 
Classes in this File Line Coverage Branch Coverage Complexity
JMenuBarStats
0 %
0/9
N/A
1
 
 1  
 package org.jtheque.films.stats.view.impl;
 2  
 
 3  
 /*
 4  
  * This file is part of JTheque.
 5  
  *
 6  
  * JTheque is free software: you can redistribute it and/or modify
 7  
  * it under the terms of the GNU General Public License as published by
 8  
  * the Free Software Foundation, either version 3 of the License.
 9  
  *
 10  
  * JTheque is distributed in the hope that it will be useful,
 11  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  
  * GNU General Public License for more details.
 14  
  *
 15  
  * You should have received a copy of the GNU General Public License
 16  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 17  
  */
 18  
 
 19  
 import org.jtheque.core.managers.view.impl.components.menu.JThequeMenu;
 20  
 import org.jtheque.core.managers.view.impl.components.menu.JThequeMenuItem;
 21  
 import org.jtheque.films.stats.view.impl.actions.AcCloseStatsView;
 22  
 import org.jtheque.films.stats.view.impl.actions.AcRefreshStats;
 23  
 
 24  
 import javax.swing.JMenu;
 25  
 import javax.swing.JMenuBar;
 26  
 import javax.swing.JMenuItem;
 27  
 import javax.swing.KeyStroke;
 28  
 import java.awt.event.KeyEvent;
 29  
 
 30  
 /**
 31  
  * MenuBar for the stats view.
 32  
  *
 33  
  * @author Baptiste Wicht
 34  
  */
 35  
 public final class JMenuBarStats extends JMenuBar {
 36  
     private static final long serialVersionUID = 3470421907899720330L;
 37  
 
 38  
     /**
 39  
      * Construct a new JMenuBarStats for the specified actions.
 40  
      */
 41  
     public JMenuBarStats(){
 42  0
         super();
 43  
 
 44  0
         JMenu menu = new JThequeMenu("menu.stats");
 45  
 
 46  0
         JMenuItem menuItem = new JThequeMenuItem(new AcRefreshStats());
 47  0
         menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0));
 48  0
         menu.add(menuItem);
 49  
 
 50  0
         menu.addSeparator();
 51  
 
 52  0
         menu.add(new JThequeMenuItem(new AcCloseStatsView()));
 53  
 
 54  0
         add(menu);
 55  0
     }
 56  
 }