info.informatica.doc.pdf.itext
Class PDFImgReplacedBox

java.lang.Object
  extended by info.informatica.doc.style.css.visual.box.AbstractCSSBox
      extended by info.informatica.doc.style.css.visual.box.AbstractReplacedBox<com.itextpdf.text.Image>
          extended by info.informatica.doc.pdf.itext.PDFImgReplacedBox
All Implemented Interfaces:
DownloadListener<com.itextpdf.text.Image>, CSSBox, ReplacedElementBox<com.itextpdf.text.Image>

public class PDFImgReplacedBox
extends AbstractReplacedBox<com.itextpdf.text.Image>
implements DownloadListener<com.itextpdf.text.Image>

PDF Image replaced element box.

Author:
Carlos Amengual (amengual at informatica.info)

Constructor Summary
PDFImgReplacedBox(CSSStylableElement elem)
           
 
Method Summary
 void doContentDownloaded(com.itextpdf.text.Image img)
          Notifies the download of content.
 void doFailedDownload()
          Notifies a failed download.
 float getIntrinsicHeight()
          Gets the intrinsic height of this box, as obtained from the replaced element.
 float getIntrinsicWidth()
          Gets the intrinsic width of this box, as obtained from the replaced element.
 com.itextpdf.text.Image getNativeContent()
          Gets the content, put into a native object.
 void init(UserAgent<com.itextpdf.text.Image> agent)
          Initializes the replaced element.
 
Methods inherited from class info.informatica.doc.style.css.visual.box.AbstractReplacedBox
getHeight, getReplacedElement, getWidth
 
Methods inherited from class info.informatica.doc.style.css.visual.box.AbstractCSSBox
computeNumberOrZero, computeNumberOrZero, getBackgroundPosition, getBorderBottomColor, getBorderBottomWidth, getBorderLeftColor, getBorderLeftWidth, getBorderRightColor, getBorderRightWidth, getBorderTopColor, getBorderTopWidth, getComputedStyle, getContainerWidth, getContainingBlock, getCSSValue, getErrorHandler, getFontFamily, getFontSize, getFontWeight, getGeneratedSibling, getLeading, getLeading, getLeft, getLineHeight, getLineHeight, getLineHeightCSSValue, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingSubproperty, getPaddingTop, getRight, isContainerHeightAuto, isHeightAuto, isWidthAuto, overflowsWithScroll, setContainingBlock, setErrorHandler, shrinkToFit, textLengthToNaturalUnit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.informatica.doc.style.css.visual.CSSBox
getBackgroundPosition, getBorderBottomColor, getBorderBottomWidth, getBorderLeftColor, getBorderLeftWidth, getBorderRightColor, getBorderRightWidth, getBorderTopColor, getBorderTopWidth, getComputedStyle, getContainingBlock, getGeneratedSibling, getLeft, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getRight, setErrorHandler
 

Constructor Detail

PDFImgReplacedBox

public PDFImgReplacedBox(CSSStylableElement elem)
Method Detail

init

public void init(UserAgent<com.itextpdf.text.Image> agent)
          throws CSSReplacementException
Description copied from interface: ReplacedElementBox
Initializes the replaced element.

Must be called before using any of the other methods.

Specified by:
init in interface ReplacedElementBox<com.itextpdf.text.Image>
Parameters:
agent - the user agent.
Throws:
CSSReplacementException - if an error occurred when initializing the replaced element box.

doContentDownloaded

public void doContentDownloaded(com.itextpdf.text.Image img)
Description copied from interface: DownloadListener
Notifies the download of content.

Specified by:
doContentDownloaded in interface DownloadListener<com.itextpdf.text.Image>
Parameters:
img - the content, in a native object.

doFailedDownload

public void doFailedDownload()
Description copied from interface: DownloadListener
Notifies a failed download.

Specified by:
doFailedDownload in interface DownloadListener<com.itextpdf.text.Image>

getNativeContent

public com.itextpdf.text.Image getNativeContent()
Description copied from interface: DownloadListener
Gets the content, put into a native object.

Specified by:
getNativeContent in interface DownloadListener<com.itextpdf.text.Image>
Returns:
the downloaded content.

getIntrinsicHeight

public float getIntrinsicHeight()
Description copied from interface: ReplacedElementBox
Gets the intrinsic height of this box, as obtained from the replaced element.

Specified by:
getIntrinsicHeight in interface ReplacedElementBox<com.itextpdf.text.Image>
Returns:
the intrinsic height.

getIntrinsicWidth

public float getIntrinsicWidth()
Description copied from interface: ReplacedElementBox
Gets the intrinsic width of this box, as obtained from the replaced element.

Specified by:
getIntrinsicWidth in interface ReplacedElementBox<com.itextpdf.text.Image>
Returns:
the width.


Copyright © 2011 informatica.info. All Rights Reserved.