Coverage Report - org.jtheque.films.view.impl.actions.DisplayBeanViewAction
 
Classes in this File Line Coverage Branch Coverage Complexity
DisplayBeanViewAction
0 %
0/5
N/A
1
 
 1  
 package org.jtheque.films.view.impl.actions;
 2  
 
 3  
 import org.jtheque.core.managers.Managers;
 4  
 import org.jtheque.core.managers.beans.IBeansManager;
 5  
 import org.jtheque.core.managers.view.able.IView;
 6  
 import org.jtheque.core.managers.view.impl.actions.JThequeAction;
 7  
 
 8  
 import java.awt.event.ActionEvent;
 9  
 
 10  
 /*
 11  
  * This file is part of JTheque.
 12  
  *            
 13  
  * JTheque is free software: you can redistribute it and/or modify
 14  
  * it under the terms of the GNU General Public License as published by
 15  
  * the Free Software Foundation, either version 3 of the License. 
 16  
  *
 17  
  * JTheque is distributed in the hope that it will be useful,
 18  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 20  
  * GNU General Public License for more details.
 21  
  *
 22  
  * You should have received a copy of the GNU General Public License
 23  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 24  
  */
 25  
 
 26  
 public class DisplayBeanViewAction extends JThequeAction {
 27  
     private final String view;
 28  
 
 29  
     /**
 30  
      * Construct a new DisplayViewAction with a specific internationalization key.
 31  
      *
 32  
      * @param key The i18n key.
 33  
      * @param view
 34  
      */
 35  
     public DisplayBeanViewAction(String key, String view) {
 36  0
         super(key);
 37  
         
 38  0
         this.view = view;
 39  0
     }
 40  
 
 41  
     @Override
 42  
     public void actionPerformed(ActionEvent e) {
 43  0
         Managers.getManager(IBeansManager.class).<IView>getBean(view).display();
 44  0
     }
 45  
 }