Coverage Report - org.jtheque.core.managers.view.impl.components.panel.AbstractPanelView
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractPanelView
0 %
0/11
N/A
1
 
 1  
 package org.jtheque.core.managers.view.impl.components.panel;
 2  
 
 3  
 import org.jtheque.core.managers.view.able.IView;
 4  
 import org.jtheque.core.managers.view.able.components.IModel;
 5  
 
 6  
 import javax.swing.JPanel;
 7  
 
 8  
 /*
 9  
  * This file is part of JTheque.
 10  
  *
 11  
  * JTheque is free software: you can redistribute it and/or modify
 12  
  * it under the terms of the GNU General Public License as published by
 13  
  * the Free Software Foundation, either version 3 of the License.
 14  
  *
 15  
  * JTheque is distributed in the hope that it will be useful,
 16  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 17  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 18  
  * GNU General Public License for more details.
 19  
  *
 20  
  * You should have received a copy of the GNU General Public License
 21  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 22  
  */
 23  
 
 24  
 /**
 25  
  * An abstract view made of a panel.
 26  
  *
 27  
  * @param <T> The type of model.
 28  
  *
 29  
  * @author Baptiste Wicht
 30  
  */
 31  0
 public abstract class AbstractPanelView<T extends IModel> extends JPanel implements IView {
 32  
     private T model;
 33  
 
 34  
     @Override
 35  
     public final void display(){
 36  
         //Nothing by default
 37  0
     }
 38  
 
 39  
     @Override
 40  
     public final void closeDown(){
 41  
         //Nothing by default
 42  0
     }
 43  
 
 44  
     @Override
 45  
     public final void toFirstPlan(){
 46  
         //Nothing by default
 47  0
     }
 48  
 
 49  
     @Override
 50  
     public final void sendMessage(String message, Object value){
 51  
         //Nothing by default
 52  0
     }
 53  
 
 54  
     @Override
 55  
     public final void refresh(){
 56  
         //Nothing by default
 57  0
     }
 58  
 
 59  
     @Override
 60  
     public final Object getImpl(){
 61  0
         return this;
 62  
     }
 63  
 
 64  
     @Override
 65  
     public final T getModel(){
 66  0
         return model;
 67  
     }
 68  
 
 69  
     @Override
 70  
     public boolean validateContent(){
 71  0
         return true;
 72  
     }
 73  
 
 74  
     /**
 75  
      * Set the model.
 76  
      *
 77  
      * @param model The model of the view.
 78  
      */
 79  
     protected void setModel(T model){
 80  0
         this.model = model;
 81  0
     }
 82  
 }