Coverage Report - org.seasar.teeda.core.taglib.html.GraphicImageTag
 
Classes in this File Line Coverage Branch Coverage Complexity
GraphicImageTag
100%
19/19
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.HtmlGraphicImage;
 20  
 
 21  
 import org.seasar.teeda.core.JsfConstants;
 22  
 import org.seasar.teeda.core.taglib.UIComponentTagBase;
 23  
 
 24  
 /**
 25  
  * @author yone
 26  
  */
 27  3
 public class GraphicImageTag extends UIComponentTagBase {
 28  
 
 29  
     private String url;
 30  
 
 31  
     public String getComponentType() {
 32  1
         return HtmlGraphicImage.COMPONENT_TYPE;
 33  
     }
 34  
 
 35  
     public String getRendererType() {
 36  2
         return "javax.faces.Image";
 37  
     }
 38  
 
 39  
     protected void setProperties(UIComponent component) {
 40  1
         super.setProperties(component);
 41  1
         setComponentProperty(component, JsfConstants.URL_ATTR, getUrl());
 42  1
         setComponentProperty(component, JsfConstants.ALT_ATTR, getAlt());
 43  1
         setComponentProperty(component, JsfConstants.HEIGHT_ATTR, getHeight());
 44  1
         setComponentProperty(component, JsfConstants.ISMAP_ATTR, getIsmap());
 45  1
         setComponentProperty(component, JsfConstants.LONGDESC_ATTR,
 46  
                 getLongdesc());
 47  1
         setComponentProperty(component, JsfConstants.USEMAP_ATTR, getUsemap());
 48  1
         setComponentProperty(component, JsfConstants.WIDTH_ATTR, getWidth());
 49  1
         setComponentProperty(component, JsfConstants.BORDER_ATTR, getBorder());
 50  1
     }
 51  
 
 52  
     public void release() {
 53  1
         super.release();
 54  1
         url = null;
 55  1
     }
 56  
 
 57  
     public void setUrl(String url) {
 58  2
         this.url = url;
 59  2
     }
 60  
 
 61  
     public String getUrl() {
 62  2
         return url;
 63  
     }
 64  
 
 65  
 }