com.primix.tapestry.html
Class Image

java.lang.Object
  |
  +--com.primix.tapestry.AbstractComponent
        |
        +--com.primix.tapestry.html.Image
All Implemented Interfaces:
IComponent, IRender

public class Image
extends AbstractComponent

Used to insert an image. To create a rollover image, use the Rollover class, which integrates a link with the image assets used with the button.
Parameter Type Read / Write Required Default Description
image IAsset R yes   The image to show.
border int R no 0 Corresponds to the HTML border attribute.

Informal parameters are allowed. A body is not allowed.

Version:
$Id: Image.java,v 1.7 2001/08/24 21:38:47 hship Exp $
Author:
Howard Ship

Fields inherited from class com.primix.tapestry.AbstractComponent
id, page, specification, wrapped, wrappedCount
 
Constructor Summary
Image()
           
 
Method Summary
protected  java.lang.String getAssetURL(java.lang.String name, IBinding binding, IRequestCycle cycle)
          Converts an IAsset binding into a usable URL.
 IBinding getBorderBinding()
           
 IBinding getImageBinding()
           
 void render(IResponseWriter writer, IRequestCycle cycle)
          Renders the <img> element.
 void setBorderBinding(IBinding value)
           
 void setImageBinding(IBinding value)
           
 
Methods inherited from class com.primix.tapestry.AbstractComponent
addAsset, addComponent, addWrapped, cleanupAfterRender, cleanupComponent, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getPage, getSpecification, prepareForRender, renderWrapped, reset, setBinding, setContainer, setId, setPage, setSpecification, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Image

public Image()
Method Detail

getAssetURL

protected java.lang.String getAssetURL(java.lang.String name,
                                       IBinding binding,
                                       IRequestCycle cycle)
                                throws RequestCycleException
Converts an IAsset binding into a usable URL. Returns null if the binding does not exist or the binding's value is null.

getBorderBinding

public IBinding getBorderBinding()

getImageBinding

public IBinding getImageBinding()

render

public void render(IResponseWriter writer,
                   IRequestCycle cycle)
            throws RequestCycleException
Renders the <img> element. property, or 0 if not specified
attribute value
src from image property
border from border

setBorderBinding

public void setBorderBinding(IBinding value)

setImageBinding

public void setImageBinding(IBinding value)