Coverage Report - org.seasar.teeda.core.taglib.html.PanelGridTag
 
Classes in this File Line Coverage Branch Coverage Complexity
PanelGridTag
100%
40/40
N/A
1
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package org.seasar.teeda.core.taglib.html;
 17  
 
 18  
 import javax.faces.component.UIComponent;
 19  
 import javax.faces.component.html.HtmlPanelGrid;
 20  
 
 21  
 import org.seasar.teeda.core.JsfConstants;
 22  
 import org.seasar.teeda.core.taglib.UIComponentTagBase;
 23  
 
 24  
 /**
 25  
  * @author yone
 26  
  * @author shot
 27  
  */
 28  4
 public class PanelGridTag extends UIComponentTagBase {
 29  
 
 30  
     private String columnClasses;
 31  
 
 32  
     private String columns;
 33  
 
 34  
     private String footerClass;
 35  
 
 36  
     private String headerClass;
 37  
 
 38  
     private String rowClasses;
 39  
 
 40  
     public String getComponentType() {
 41  1
         return HtmlPanelGrid.COMPONENT_TYPE;
 42  
     }
 43  
 
 44  
     public String getRendererType() {
 45  3
         return "javax.faces.Grid";
 46  
     }
 47  
 
 48  
     protected void setProperties(UIComponent component) {
 49  1
         super.setProperties(component);
 50  1
         setComponentProperty(component, JsfConstants.BORDER_ATTR, getBorder());
 51  1
         setComponentProperty(component, JsfConstants.BGCOLOR_ATTR, getBgcolor());
 52  1
         setComponentProperty(component, JsfConstants.CELLPADDING_ATTR,
 53  
                 getCellpadding());
 54  1
         setComponentProperty(component, JsfConstants.CELLSPACING_ATTR,
 55  
                 getCellspacing());
 56  1
         setComponentProperty(component, JsfConstants.COLUMN_CLASSES_ATTR,
 57  
                 getColumnClasses());
 58  1
         setComponentProperty(component, JsfConstants.COLUMNS_ATTR, getColumns());
 59  1
         setComponentProperty(component, JsfConstants.FOOTER_CLASS_ATTR,
 60  
                 getFooterClass());
 61  1
         setComponentProperty(component, JsfConstants.FRAME_ATTR, getFrame());
 62  1
         setComponentProperty(component, JsfConstants.HEADER_CLASS_ATTR,
 63  
                 getHeaderClass());
 64  1
         setComponentProperty(component, JsfConstants.ROW_CLASSES_ATTR,
 65  
                 getRowClasses());
 66  1
         setComponentProperty(component, JsfConstants.RULES_ATTR, getRules());
 67  1
         setComponentProperty(component, JsfConstants.SUMMARY_ATTR, getSummary());
 68  1
         setComponentProperty(component, JsfConstants.WIDTH_ATTR, getWidth());
 69  1
     }
 70  
 
 71  
     public void release() {
 72  1
         super.release();
 73  1
         columnClasses = null;
 74  1
         columns = null;
 75  1
         footerClass = null;
 76  1
         headerClass = null;
 77  1
         rowClasses = null;
 78  1
     }
 79  
 
 80  
     public void setColumnClasses(String columnClasses) {
 81  2
         this.columnClasses = columnClasses;
 82  2
     }
 83  
 
 84  
     public void setColumns(String columns) {
 85  2
         this.columns = columns;
 86  2
     }
 87  
 
 88  
     public void setFooterClass(String footerClass) {
 89  2
         this.footerClass = footerClass;
 90  2
     }
 91  
 
 92  
     public void setHeaderClass(String headerClass) {
 93  2
         this.headerClass = headerClass;
 94  2
     }
 95  
 
 96  
     public void setRowClasses(String rowClasses) {
 97  2
         this.rowClasses = rowClasses;
 98  2
     }
 99  
 
 100  
     public String getColumnClasses() {
 101  2
         return columnClasses;
 102  
     }
 103  
 
 104  
     public String getColumns() {
 105  2
         return columns;
 106  
     }
 107  
 
 108  
     public String getFooterClass() {
 109  2
         return footerClass;
 110  
     }
 111  
 
 112  
     public String getHeaderClass() {
 113  2
         return headerClass;
 114  
     }
 115  
 
 116  
     public String getRowClasses() {
 117  2
         return rowClasses;
 118  
     }
 119  
 
 120  
 }