com.lowagie.text.rtf.graphic
Class RtfImage
java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.graphic.RtfImage
- All Implemented Interfaces:
- RtfBasicElement
public class RtfImage
- extends RtfElement
The RtfImage contains one image. Supported image types are jpeg, png, wmf, bmp.
- Version:
- $Revision: 1.23 $
- Author:
- Mark Hall (mhall@edu.uni-klu.ac.at), Paulo Soares
Method Summary |
void |
setAlignment(int alignment)
Sets the alignment of this RtfImage. |
void |
setTopLevelElement(boolean topLevelElement)
Set whether this RtfImage should behave like a top level element
and enclose itself in a paragraph. |
byte[] |
write()
Writes the RtfImage content |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RtfImage
public RtfImage(RtfDocument doc,
Image image)
throws DocumentException
- Constructs a RtfImage for an Image.
- Parameters:
doc
- The RtfDocument this RtfImage belongs toimage
- The Image that this RtfImage wraps
- Throws:
DocumentException
- If an error occured accessing the image content
write
public byte[] write()
- Writes the RtfImage content
- Specified by:
write
in interface RtfBasicElement
- Overrides:
write
in class RtfElement
- Returns:
- the RtfImage content
setAlignment
public void setAlignment(int alignment)
- Sets the alignment of this RtfImage. Uses the alignments from com.lowagie.text.Element.
- Parameters:
alignment
- The alignment to use.
setTopLevelElement
public void setTopLevelElement(boolean topLevelElement)
- Set whether this RtfImage should behave like a top level element
and enclose itself in a paragraph.
- Parameters:
topLevelElement
- Whether to behave like a top level element.
Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.