org.apache.beehive.netui.tags.databinding.datagrid
Class ImageCell

Object
  extended by SimpleTagSupport
      extended by AbstractSimpleTag
          extended by AbstractDataGridHtmlTag
              extended by AbstractCell
                  extended by AbstractHtmlTableCell
                      extended by ImageCell
All Implemented Interfaces:
JspTag, SimpleTag, IAttributeConsumer, IBehaviorConsumer, IHtmlCore, IHtmlEvents, IHtmlI18n, INetuiTag

public class ImageCell
extends AbstractHtmlTableCell
implements IHtmlCore, IHtmlEvents, IHtmlI18n

Data grid cell that renders an HTML <image> tag containing the tag's source attribute. The span cell is rendered inside of an HTML table <td>. The image cell supports various nested tags including those that augment the available attribute set via the NetUI IAttributeConsumer interface.

The set of JSP implicit objects available to the body include:


Constructor Summary
ImageCell()
           
 
Method Summary
 String getTagName()
          The name of this tag; this value is used for error reporting.
protected  CellModel internalGetCellModel()
          Implementation of AbstractCell.internalGetCellModel() that exposes the ImageCellModel which is storing state for this tag.
protected  void renderDataCellContents(AbstractRenderAppender appender, String jspFragmentOutput)
          Render the cell's contents.
 void setAlign(String align)
          Sets the property to specify where to align the image.
 void setAlt(String alt)
          Sets the property to specify the alt text of the image tag.
 void setAttribute(String name, String value, String facet)
           Implementation of IAttributeConsumer interface.
 void setBorder(String border)
          Set the border attribute for the image.
 void setDir(String dir)
          Sets the dir attribute for the HTML image tag.
 void setHeight(String height)
          Set the height of the image to display.
 void setHspace(String hspace)
          Sets the the horizontal spacing around the image.
 void setLang(String lang)
          Sets the lang attribute for the HTML element.
 void setLongdesc(String longdesc)
          Sets the property to specify the longdesc of the image tag.
 void setOnClick(String onClick)
          Sets the onClick JavaScript event on the image tag.
 void setOnDblClick(String onDblClick)
          Sets the onDblClick JavaScript event on the image tag.
 void setOnKeyDown(String onKeyDown)
          Sets the onKeyDown JavaScript event on the image tag.
 void setOnKeyPress(String onKeyPress)
          Sets the onKeyPress JavaScript event on the image tag.
 void setOnKeyUp(String onKeyUp)
          Sets the onKeyUp JavaScript event on the image tag.
 void setOnMouseDown(String onMouseDown)
          Sets the onMouseDown JavaScript event on the image tag.
 void setOnMouseMove(String onMouseMove)
          Sets the onMouseMove JavaScript event on the image tag.
 void setOnMouseOut(String onMouseOut)
          Sets the onMouseOut JavaScript event on the image tag.
 void setOnMouseOver(String onMouseOver)
          Sets the onMouseOver JavaScript event on the image tag.
 void setOnMouseUp(String onMouseUp)
          Sets the onMouseUp JavaScript event on the image tag.
 void setSrc(String src)
          Set the image source to render on the HTML image tag.
 void setStyle(String style)
          Sets the style of the rendered html tag.
 void setStyleClass(String styleClass)
          Sets the style class of the rendered html tag.
 void setTagId(String tagId)
          Set the name of the tagId for the image tag.
 void setTitle(String title)
          Sets the value of the title attribute.
 void setVspace(String vspace)
          Set the vertical spacing around the image.
 void setWidth(String width)
          Set the width of the image to display.
 
Methods inherited from class AbstractHtmlTableCell
renderCell, setBehavior, setCellAbbr, setCellAlign, setCellAxis, setCellChar, setCellCharoff, setCellColspan, setCellDir, setCellHeaders, setCellLang, setCellOnClick, setCellOnDblClick, setCellOnKeyDown, setCellOnKeyPress, setCellOnKeyUp, setCellOnMouseDown, setCellOnMouseMove, setCellOnMouseOut, setCellOnMouseOver, setCellOnMouseUp, setCellRowspan, setCellScope, setCellStyle, setCellStyleClass, setCellTagId, setCellTitle, setCellValign, setFilterExpression, setSortExpression
 
Methods inherited from class AbstractCell
addFormatter, addStateAttribute, applyAttributes, doTag, formatterHasError, renderEmptyCell
 
Methods inherited from class AbstractDataGridHtmlTag
applyIndexedTagId, applyTagId, lookupDataGridTagModel, renderDefaultNameAndId, renderNameAndId
 
Methods inherited from class AbstractSimpleTag
getBufferBody, getHtmlTag, getIdForTagId, getInlineError, getPageContext, getScriptReporter, getUserLocale, hasErrors, registerTagError, registerTagError, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageCell

public ImageCell()
Method Detail

getTagName

public String getTagName()
The name of this tag; this value is used for error reporting.

Specified by:
getTagName in interface INetuiTag
Specified by:
getTagName in class AbstractSimpleTag
Returns:
the String name of this tag

setOnClick

public void setOnClick(String onClick)
Sets the onClick JavaScript event on the image tag.

Specified by:
setOnClick in interface IHtmlEvents
Parameters:
onClick - the onClick event.

setOnDblClick

public void setOnDblClick(String onDblClick)
Sets the onDblClick JavaScript event on the image tag.

Specified by:
setOnDblClick in interface IHtmlEvents
Parameters:
onDblClick - the onDblClick event.

setOnKeyDown

public void setOnKeyDown(String onKeyDown)
Sets the onKeyDown JavaScript event on the image tag.

Specified by:
setOnKeyDown in interface IHtmlEvents
Parameters:
onKeyDown - the onKeyDown event.

setOnKeyUp

public void setOnKeyUp(String onKeyUp)
Sets the onKeyUp JavaScript event on the image tag.

Specified by:
setOnKeyUp in interface IHtmlEvents
Parameters:
onKeyUp - the onKeyUp event.

setOnKeyPress

public void setOnKeyPress(String onKeyPress)
Sets the onKeyPress JavaScript event on the image tag.

Specified by:
setOnKeyPress in interface IHtmlEvents
Parameters:
onKeyPress - the onKeyPress event.

setOnMouseDown

public void setOnMouseDown(String onMouseDown)
Sets the onMouseDown JavaScript event on the image tag.

Specified by:
setOnMouseDown in interface IHtmlEvents
Parameters:
onMouseDown - the onMouseDown event.

setOnMouseUp

public void setOnMouseUp(String onMouseUp)
Sets the onMouseUp JavaScript event on the image tag.

Specified by:
setOnMouseUp in interface IHtmlEvents
Parameters:
onMouseUp - the onMouseUp event.

setOnMouseMove

public void setOnMouseMove(String onMouseMove)
Sets the onMouseMove JavaScript event on the image tag.

Specified by:
setOnMouseMove in interface IHtmlEvents
Parameters:
onMouseMove - the onMouseMove event.

setOnMouseOut

public void setOnMouseOut(String onMouseOut)
Sets the onMouseOut JavaScript event on the image tag.

Specified by:
setOnMouseOut in interface IHtmlEvents
Parameters:
onMouseOut - the onMouseOut event.

setOnMouseOver

public void setOnMouseOver(String onMouseOver)
Sets the onMouseOver JavaScript event on the image tag.

Specified by:
setOnMouseOver in interface IHtmlEvents
Parameters:
onMouseOver - the onMouseOver event.

setStyle

public void setStyle(String style)
Sets the style of the rendered html tag.

Specified by:
setStyle in interface IHtmlCore
Parameters:
style - the html style.

setStyleClass

public void setStyleClass(String styleClass)
Sets the style class of the rendered html tag.

Specified by:
setStyleClass in interface IHtmlCore
Parameters:
styleClass - the html style class.

setTitle

public void setTitle(String title)
Sets the value of the title attribute.

Specified by:
setTitle in interface IHtmlCore
Parameters:
title -

setLang

public void setLang(String lang)
Sets the lang attribute for the HTML element.

Specified by:
setLang in interface IHtmlI18n
Parameters:
lang -

setDir

public void setDir(String dir)
Sets the dir attribute for the HTML image tag.

Specified by:
setDir in interface IHtmlI18n
Parameters:
dir -

setSrc

public void setSrc(String src)
Set the image source to render on the HTML image tag.


setAlign

public void setAlign(String align)
Sets the property to specify where to align the image.

Parameters:
align - the image alignment.

setHspace

public void setHspace(String hspace)
Sets the the horizontal spacing around the image.

Parameters:
hspace - the horizontal spacing.

setVspace

public void setVspace(String vspace)
Set the vertical spacing around the image.


setBorder

public void setBorder(String border)
Set the border attribute for the image.


setHeight

public void setHeight(String height)
Set the height of the image to display.


setWidth

public void setWidth(String width)
Set the width of the image to display.


setLongdesc

public void setLongdesc(String longdesc)
Sets the property to specify the longdesc of the image tag.

Parameters:
longdesc - the longdesc attribute

setAlt

public void setAlt(String alt)
Sets the property to specify the alt text of the image tag.

Parameters:
alt - the image alignment.

setTagId

public void setTagId(String tagId)
              throws JspException
Set the name of the tagId for the image tag.

Specified by:
setTagId in interface IHtmlCore
Parameters:
tagId - the the name of the tagId for the image tag.
Throws:
JspException

setAttribute

public void setAttribute(String name,
                         String value,
                         String facet)
                  throws JspException

Implementation of IAttributeConsumer interface. This allows a page author to add additional attributes to the HTML rendered by this tag. The attribute facets which can be consumed include:

This tag also accepts facets supported by AbstractHtmlTableCell.setAttribute(String, String, String)

Specified by:
setAttribute in interface IAttributeConsumer
Overrides:
setAttribute in class AbstractHtmlTableCell
Parameters:
name - the name of the attribute
value - the value of the attribute
facet - the facet for the attribute; this value must be match one of the facets supported by the JSP tags
Throws:
JspException - thrown when the given facet String is not recognized as a valid facet name

renderDataCellContents

protected void renderDataCellContents(AbstractRenderAppender appender,
                                      String jspFragmentOutput)
Render the cell's contents. This method implements support for executing the image cell's decorator.

Specified by:
renderDataCellContents in class AbstractHtmlTableCell
Parameters:
appender - the AbstractRenderAppender used to collect the rendered output
jspFragmentOutput - the String result of having evaluated the image cell's JspFragment

internalGetCellModel

protected CellModel internalGetCellModel()
Implementation of AbstractCell.internalGetCellModel() that exposes the ImageCellModel which is storing state for this tag.

Specified by:
internalGetCellModel in class AbstractCell
Returns:
this tag's image cell model