com.cc.framework.taglib.util
Class ImageMapTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bycom.cc.framework.taglib.util.ImageMapTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag, WebResourceTag

public class ImageMapTag
extends javax.servlet.jsp.tagext.TagSupport
implements WebResourceTag

Tag-Handler for the ImageMap Tag.

Since:
1.0
Version:
$Revision: 1.22 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  java.lang.String base
          The base directory for all the images
private  AbstractImageMap map
          Instance of the ImageMap
private  java.lang.String name
          Name to store the ImageMap in the Page-Kontext
private  RunAt runat
          Specifies if the image map should be exposed as a java script object to the client browser (RunAt.CLIENT)
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ImageMapTag()
          Constructor
 
Method Summary
 void addImage(java.lang.String key, ImageModel image)
          Adds an image to the ImageMap
protected  void doCreateClientScript()
          Creates the client side javascript object for the image map which is used for the clientside tree.
 int doEndTag()
           
 int doStartTag()
           
 java.lang.String getBase()
           
 RunAt getRunAt()
          This property specifies whether, for the imagemap should be exposed as a java scripting object
 void release()
           
 void setBase(java.lang.String base)
          Sets the resource base directory
 void setName(java.lang.String name)
          Sets the name
 void setPageContext(javax.servlet.jsp.PageContext pc)
           
 void setRunat(java.lang.String runat)
          This attribute specifies whether, for the imagemap should be exposed as a java scripting object
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

map

private AbstractImageMap map
Instance of the ImageMap


name

private java.lang.String name
Name to store the ImageMap in the Page-Kontext


base

private java.lang.String base
The base directory for all the images


runat

private RunAt runat
Specifies if the image map should be exposed as a java script object to the client browser (RunAt.CLIENT)

Constructor Detail

ImageMapTag

public ImageMapTag()
Constructor

Method Detail

setPageContext

public void setPageContext(javax.servlet.jsp.PageContext pc)
Specified by:
setPageContext in interface javax.servlet.jsp.tagext.Tag
See Also:
Tag.setPageContext(PageContext pc)

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
See Also:
Tag.release()

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspException
See Also:
Tag.doStartTag()

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspException
See Also:
Tag.doEndTag()

doCreateClientScript

protected void doCreateClientScript()
                             throws javax.servlet.jsp.JspException
Creates the client side javascript object for the image map which is used for the clientside tree.

Throws:
javax.servlet.jsp.JspException - A generic exception known by the JSP engine

addImage

public void addImage(java.lang.String key,
                     ImageModel image)
Adds an image to the ImageMap

Parameters:
key - Key
image - The image to add

setName

public void setName(java.lang.String name)
Sets the name

Parameters:
name - The name

setBase

public void setBase(java.lang.String base)
Description copied from interface: WebResourceTag
Sets the resource base directory

Specified by:
setBase in interface WebResourceTag
Parameters:
base - Base Directory
See Also:
WebResourceTag.setBase(java.lang.String)

getBase

public java.lang.String getBase()
Returns:
Base Directory

setRunat

public void setRunat(java.lang.String runat)
              throws javax.servlet.jsp.JspException
This attribute specifies whether, for the imagemap should be exposed as a java scripting object

Parameters:
runat - Specifies whether the imagemap should be exposed as a javascript object
Throws:
javax.servlet.jsp.JspException - If the argument can't be converted to an object of type com.cc.framework.ui.RunAt
See Also:
RunAt

getRunAt

public RunAt getRunAt()
This property specifies whether, for the imagemap should be exposed as a java scripting object

Returns:
RunAt.CLIENT if a java script object should be created


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.