Coverage Report - org.jtheque.films.view.impl.actions.actor.AcSearchActor
 
Classes in this File Line Coverage Branch Coverage Complexity
AcSearchActor
0 %
0/7
N/A
1
 
 1  
 package org.jtheque.films.view.impl.actions.actor;
 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.Managers;
 20  
 import org.jtheque.core.managers.beans.IBeansManager;
 21  
 import org.jtheque.core.managers.resource.IResourceManager;
 22  
 import org.jtheque.core.managers.resource.ImageType;
 23  
 import org.jtheque.core.managers.view.impl.actions.JThequeAction;
 24  
 import org.jtheque.films.controllers.able.IActorController;
 25  
 import org.jtheque.films.controllers.able.ISearchController;
 26  
 import org.jtheque.films.utils.Constants;
 27  
 
 28  
 import java.awt.event.ActionEvent;
 29  
 
 30  
 /**
 31  
  * Action to search an actor.
 32  
  *
 33  
  * @author Baptiste Wicht
 34  
  */
 35  
 public final class AcSearchActor extends JThequeAction {
 36  
     /**
 37  
      * Construct a new AcSearchActor.
 38  
      */
 39  
     public AcSearchActor() {
 40  0
         super("jtheque.actions.search.actor");
 41  
 
 42  0
         setIcon(Managers.getManager(IResourceManager.class).getIcon(Constants.IMAGE_BASE_NAME, "search", ImageType.PNG));
 43  0
     }
 44  
 
 45  
     @Override
 46  
     public void actionPerformed(ActionEvent event) {
 47  0
         ISearchController searchController = Managers.getManager(IBeansManager.class).getBean("filmSearchController");
 48  
         
 49  0
         searchController.setResearchController(Managers.getManager(IBeansManager.class).<IActorController>getBean("actorController"));
 50  0
         searchController.displayView();
 51  0
     }
 52  
 }