org.displaytag.tags
Class CaptionTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.displaytag.tags.CaptionTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, MediaUtil.SupportsMedia
Direct Known Subclasses:
ELCaptionTag

public class CaptionTag
extends javax.servlet.jsp.tagext.BodyTagSupport
implements MediaUtil.SupportsMedia

Simple caption tag which mimics a standard html caption.

Version:
$Revision: 1081 $ ($Author: fgiust $)
Author:
Fabrizio Giustina
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
CaptionTag()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
           
 java.lang.String getCloseTag()
          create the closing tag.
 java.lang.String getOpenTag()
          create the open tag containing all the attributes.
 java.util.List getSupportedMedia()
          Obtain the list of media types this object supports.
 void release()
           
 void setClass(java.lang.String value)
          setter for the "class" html attribute.
 void setDir(java.lang.String value)
          setter for the "dir" html attribute.
 void setId(java.lang.String value)
          setter for the "id" html attribute.
 void setLang(java.lang.String value)
          setter for the "lang" html attribute.
 void setMedia(java.lang.String media)
          Tag setter.
 void setStyle(java.lang.String value)
          setter for the "style" html attribute.
 void setSupportedMedia(java.util.List media)
          Configure the list of media types this object will support.
 void setTitle(java.lang.String value)
          setter for the "title" html attribute.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Constructor Detail

CaptionTag

public CaptionTag()
Method Detail

setStyle

public void setStyle(java.lang.String value)
setter for the "style" html attribute.

Parameters:
value - attribute value

setClass

public void setClass(java.lang.String value)
setter for the "class" html attribute.

Parameters:
value - attribute value

setId

public void setId(java.lang.String value)
setter for the "id" html attribute.

Overrides:
setId in class javax.servlet.jsp.tagext.TagSupport
Parameters:
value - attribute value

setTitle

public void setTitle(java.lang.String value)
setter for the "title" html attribute.

Parameters:
value - attribute value

setLang

public void setLang(java.lang.String value)
setter for the "lang" html attribute.

Parameters:
value - attribute value

setDir

public void setDir(java.lang.String value)
setter for the "dir" html attribute.

Parameters:
value - attribute value

getOpenTag

public java.lang.String getOpenTag()
create the open tag containing all the attributes.

Returns:
open tag string

getCloseTag

public java.lang.String getCloseTag()
create the closing tag.

Returns:
</caption>

doStartTag

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

setSupportedMedia

public void setSupportedMedia(java.util.List media)
Description copied from interface: MediaUtil.SupportsMedia
Configure the list of media types this object will support.

Specified by:
setSupportedMedia in interface MediaUtil.SupportsMedia
Parameters:
media - The list of media types this object will support.
See Also:
MediaUtil.SupportsMedia.setSupportedMedia(java.util.List)

getSupportedMedia

public java.util.List getSupportedMedia()
Description copied from interface: MediaUtil.SupportsMedia
Obtain the list of media types this object supports.

Specified by:
getSupportedMedia in interface MediaUtil.SupportsMedia
Returns:
The list of media types this object supports.
See Also:
MediaUtil.SupportsMedia.getSupportedMedia()

setMedia

public void setMedia(java.lang.String media)
Tag setter.

Parameters:
media - the space delimited list of supported types

doEndTag

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

release

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


Copyright © 2002-2007 the Displaytag team. All Rights Reserved.