to.etc.domui.component.dynaima
Class DynaIma

java.lang.Object
  extended by to.etc.domui.dom.css.CssBase
      extended by to.etc.domui.dom.html.NodeBase
          extended by to.etc.domui.dom.html.Img
              extended by to.etc.domui.component.dynaima.DynaIma
All Implemented Interfaces:
IModelBinding, INodeErrorDelegate

public class DynaIma
extends Img

UNSTABLE INTERFACE Dynamic image component. This is an img tag containing server-generated content.

Internals

This component uses the concept of an "image source" as the mechanism to send server-side generated bitmap images to the client. We accept multiple source types as the source for an image. The most basic kind is the IStreamingImageSource which represents a thing which can create the image when needed. To prevent excessive (re) generation of the image we cache the resulting stream locally, in this component.

Change management

This component does not use a model and as such it is unable to determine that the image has changed. To force an update on the image as shown in the browser you MUST call one of the source setters AGAIN with the source to use. This may be the same source as last time; the calling again will cause the image to be reloaded and regenerated from the server.

Author:
Frits Jalvingh Created on Oct 2, 2008

Constructor Summary
DynaIma()
           
 
Method Summary
 IBufferedImageSource getBufferedSource()
           
 IStreamingImageSource getStreamingSource()
           
 void setBufferedImage(java.awt.image.BufferedImage bufferedImage, java.lang.String outputMime)
           
 void setBufferedSource(IBufferedImageSource bufferedSource)
           
 void setStreamingSource(IStreamingImageSource streamingSource)
           
 
Methods inherited from class to.etc.domui.dom.html.Img
getAlign, getAlt, getImgBorder, getImgHeight, getImgWidth, getSrc, setAlign, setAlt, setImgBorder, setImgHeight, setImgWidth, setSrc, setSrc, visit
 
Methods inherited from class to.etc.domui.dom.html.NodeBase
$, acceptRequestParameter, addCssClass, addGlobalMessage, afterCreateContent, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, build, changed, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, componentHandleWebAction, createContent, findComponentBundle, forceRebuild, getActualID, getClicked, getComponentBundle, getCreateJS, getCssClass, getErrorDelegate, getErrorLocation, getMessage, getOnClickJS, getOnMouseDownJS, getPage, getParent, getParent, getParent, getSharedContext, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTitle, getUserObject, handleDrop, hasCssClass, hasError, internalClearDelta, internalClearDeltaFully, internalGetOldParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetTag, internalShelve, internalUnshelve, isBuilt, isFocusRequested, moveControlToModel, moveModelToControl, onAddedToPage, onBeforeFullRender, onForceRebuild, onHeaderContributors, onRefresh, onRemoveFromPage, onShelve, onUnshelve, refresh, remove, removeCssClass, renderJavascriptState, replaceWith, setClicked, setComponentBundle, setControlsEnabled, setCssClass, setErrorDelegate, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setSpecialAttribute, setTestID, setTitle, setUserObject, stretchHeight, toString
 
Methods inherited from class to.etc.domui.dom.css.CssBase
getBackgroundAttachment, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorderBottomColor, getBorderBottomStyle, getBorderBottomWidth, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderTopColor, getBorderTopStyle, getBorderTopWidth, getBottom, getCachedStyle, getClear, getColor, getDisplay, getFloat, getFontFamily, getFontSize, getFontSizeAdjust, getFontStyle, getFontVariant, getFontWeight, getHeight, getLeft, getLineHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverflow, getPosition, getRight, getTextAlign, getTop, getTransform, getVerticalAlign, getVisibility, getWidth, getZIndex, internalSetDisplay, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorder, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBottom, setCachedStyle, setClear, setColor, setDisplay, setFloat, setFontFamily, setFontSize, setFontSizeAdjust, setFontStyle, setFontVariant, setFontWeight, setHeight, setLeft, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynaIma

public DynaIma()
Method Detail

getStreamingSource

public IStreamingImageSource getStreamingSource()

setStreamingSource

public void setStreamingSource(IStreamingImageSource streamingSource)

getBufferedSource

public IBufferedImageSource getBufferedSource()

setBufferedSource

public void setBufferedSource(IBufferedImageSource bufferedSource)

setBufferedImage

public void setBufferedImage(java.awt.image.BufferedImage bufferedImage,
                             java.lang.String outputMime)