Clover coverage report - angkor - 0.4
Coverage timestamp: ti okt 15 2002 22:32:48 CEST
file stats: LOC: 78   Methods: 8
NCLOC: 53   Classes: 1
Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover.
 
 Source file Conditionals Statements Methods TOTAL
Image.java 0% 0% 0% 0%
 1   
 /*
 2   
  * Angkor Web Framework
 3   
  *
 4   
  * Distributable under LGPL license.
 5   
  * See terms of license at gnu.org.
 6   
  */
 7   
 
 8   
 package com.tirsen.angkor.widget;
 9   
 
 10   
 import com.tirsen.angkor.RenderContext;
 11   
 import com.tirsen.angkor.Component;
 12   
 
 13   
 import java.io.IOException;
 14   
 
 15   
 /**
 16   
  * @author $Author: tirsen $
 17   
  * @version $Revision: 1.6 $
 18   
  * <BR>
 19   
  * $Id: Image.java,v 1.6 2002/10/13 19:59:23 tirsen Exp $
 20   
  */
 21   
 public class Image extends Component
 22   
 {
 23   
     private String sourceURL;
 24   
     private ImageMap imageMap;
 25   
     private String alt;
 26   
 
 27  0
     public void setSourceURL(String sourceURL)
 28   
     {
 29  0
         this.sourceURL = sourceURL;
 30   
     }
 31   
 
 32  0
     public String getSourceURL()
 33   
     {
 34  0
         return sourceURL;
 35   
     }
 36   
 
 37  0
     public void setAlt(String alt)
 38   
     {
 39  0
         this.alt = alt;
 40   
     }
 41   
 
 42  0
     public String getAlt()
 43   
     {
 44  0
         return alt;
 45   
     }
 46   
 
 47  0
     public void render(RenderContext context) throws IOException
 48   
     {
 49  0
         if (isVisible())
 50   
         {
 51  0
             System.out.println("getImageMap() = " + getImageMap());
 52  0
             if (getImageMap() != null) imageMap.render(context);
 53  0
             String imageMap = getImageMap() == null ? "" : " usemap=\"#" + getImageMap().uniqueId(context) + "\"";
 54  0
             String alt = getAlt() == null ? "" : " alt=\"" + getAlt() + "\"";
 55  0
             String idAttr = " id=\"" + uniqueId(context) + "\"";
 56  0
             context.emptyTag("IMG SRC=\"" + getSourceURL() + "\" border=\"0\"" + imageMap + alt + idAttr);
 57   
         }
 58   
     }
 59   
 
 60  0
     public void parse(RenderContext context)
 61   
     {
 62  0
         super.parse(context);
 63  0
         if (getImageMap() != null) imageMap.parse(context);
 64   
     }
 65   
 
 66  0
     public ImageMap getImageMap()
 67   
     {
 68  0
         return imageMap;
 69   
     }
 70   
 
 71  0
     public void setImageMap(ImageMap imageMap)
 72   
     {
 73  0
         if (this.imageMap != null) this.imageMap.setContainer(null);
 74  0
         this.imageMap = imageMap;
 75  0
         this.imageMap.setContainer(this);
 76   
     }
 77   
 }
 78