org.barracudamvc.core.comp
Class BImage

java.lang.Object
  extended by org.barracudamvc.core.comp.AbstractBComponent
      extended by org.barracudamvc.core.comp.BComponent
          extended by org.barracudamvc.core.comp.BImage
All Implemented Interfaces:
Attrs, BContainer, StateMap

public class BImage
extends BComponent


Field Summary
protected  String alt
           
protected  String height
           
protected static org.apache.log4j.Logger log
           
protected  String src
           
protected  String title
           
protected  String width
           
 
Fields inherited from class org.barracudamvc.core.comp.BComponent
DEFAULT_ENCODING, enabled, enc, logger, name, rs, VISIBILITY_MARKER, visible
 
Fields inherited from class org.barracudamvc.core.comp.AbstractBComponent
attrs, children, dvc, isStepChild, parent, statemap, stepChildren, tempViews, validated, views
 
Constructor Summary
BImage()
          Public noargs constructor
BImage(String ialt, String isrc)
          Public constructor which creates the component and sets it's alt text and image file source (src).
BImage(String ialt, String ititle, String isrc)
          Public constructor which creates the component and sets it's alt text, the title and image file source (src).
BImage(String ialt, String isrc, String iheight, String iwidth)
          Public constructor which creates the component and sets it's alt text and image file source (src), along with the desired width and height of the image.
BImage(String ialt, String ititle, String iurl, String iheight, String iwidth)
          Public constructor which creates the component and sets it's alt text, title and image file source (src), along with the desired width and height of the image.
 
Method Summary
 String getAlt()
          Get the alt text for this particular component
 String getHeight()
          Get the height for this particular component
 String getSrc()
          Get the source for this particular component
 String getTitle()
          Get the title for this particular component
 String getWidth()
          Get the width for this particular component
 BImage setAlt(String ialt)
          Set the alt text for this particular component
 BImage setHeight(String iheight)
          Set the height for this particular component
 BImage setSrc(String isrc)
          Set the source for this particular component
 BImage setTitle(String ititle)
          Set the title for this particular component
 BImage setWidth(String iwidth)
          Set the width for this particular component
 String toString(ViewContext vc)
          if has vc, but no views: render as an <a> link, otherwise use super.toString(ViewContext)
 
Methods inherited from class org.barracudamvc.core.comp.BComponent
addView, decodeStr, encodeStr, getEncoding, getFirstView, getName, getRenderStrategy, getViews, isEnabled, isVisible, postRender, preRender, removeAllViews, removeView, render, render, renderView, renderView, setEnabled, setEnabled, setEncoding, setName, setRenderStrategy, setView, setVisible, setVisible, supports
 
Methods inherited from class org.barracudamvc.core.comp.AbstractBComponent
addChild, addStepChild, addStepChild, addTempView, clearState, destroyCycle, findComponentMap, findRendererFactory, getAttr, getAttrMap, getChild, getChildren, getDefaultViewContext, getParent, getRenderer, getRenderer, getRendererFactory, getRootComponent, getState, getStateKeys, getStateStore, hasChildren, hasViews, initCycle, installRendererFactory, invalidate, isStepChild, printStackTrace, printStackTrace, printStackTrace, putState, removeAll, removeAllStepChildren, removeChild, removeChild, removeState, setAttr, setDefaultViewContext, setParent, toRef, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log

alt

protected String alt

title

protected String title

src

protected String src

width

protected String width

height

protected String height
Constructor Detail

BImage

public BImage()
Public noargs constructor


BImage

public BImage(String ialt,
              String isrc)
Public constructor which creates the component and sets it's alt text and image file source (src). Note that the title will also be set to ialt, to allow strictly spec compliant engines like Gecko display the alt text on mouse over (I assume this is what most people expect...)

Parameters:
ialt - the alt text string of this image
isrc - the src string of this image

BImage

public BImage(String ialt,
              String ititle,
              String isrc)
Public constructor which creates the component and sets it's alt text, the title and image file source (src). Note that the title will be displayed on mouse over by strictly spec compliant engines like Gecko, while the alt text will be displayed by IE.

Parameters:
ialt - the alt text string of this image
ititle - the title text string of this image
isrc - the src string of this image

BImage

public BImage(String ialt,
              String isrc,
              String iheight,
              String iwidth)
Public constructor which creates the component and sets it's alt text and image file source (src), along with the desired width and height of the image. Note that the title will also be set to ialt, to allow strictly spec compliant engines like Gecko display the alt text on mouse over (I assume this is what most people expect...)

Parameters:
ialt - the alt text string of this image
isrc - the src string of this image
iheight - the height string of the image (might contain %)
iwidth - the width string of the image (might contain %)

BImage

public BImage(String ialt,
              String ititle,
              String iurl,
              String iheight,
              String iwidth)
Public constructor which creates the component and sets it's alt text, title and image file source (src), along with the desired width and height of the image. Note that the title will be displayed on mouse over by strictly spec compliant engines like Gecko, while the alt text will be displayed by IE.

Parameters:
ialt - the alt text string of this image
ititle - the title text string of this image
isrc - the src string of this image
iheight - the height string of the image (might contain %)
iwidth - the width string of the image (might contain %)
Method Detail

setAlt

public BImage setAlt(String ialt)
Set the alt text for this particular component

Parameters:
ialt - the alt text of this image

getAlt

public String getAlt()
Get the alt text for this particular component

Returns:
the alt text for this particular component

setTitle

public BImage setTitle(String ititle)
Set the title for this particular component

Parameters:
ititle - the title of this component

getTitle

public String getTitle()
Get the title for this particular component

Returns:
the title for this particular component

setSrc

public BImage setSrc(String isrc)
Set the source for this particular component

Parameters:
isrc - the src file string

getSrc

public String getSrc()
Get the source for this particular component

Returns:
the src attribute for this particular component

setHeight

public BImage setHeight(String iheight)
Set the height for this particular component

Parameters:
iheight - the height og the image

getHeight

public String getHeight()
Get the height for this particular component

Returns:
the height for this image

setWidth

public BImage setWidth(String iwidth)
Set the width for this particular component

Parameters:
iwidth - the width of the image

getWidth

public String getWidth()
Get the width for this particular component

Returns:
the width for this image

toString

public String toString(ViewContext vc)
if has vc, but no views: render as an <a> link, otherwise use super.toString(ViewContext)

Overrides:
toString in class AbstractBComponent
Returns:
a String representation of the component
See Also:
super#toString(ViewContext)


Copyright © 2006 BarracudaMVC.org All Rights Reserved.