Class RtfShapePosition
java.lang.Object
com.lowagie.text.Chunk
com.lowagie.text.rtf.RtfAddableElement
com.lowagie.text.rtf.graphic.RtfShapePosition
- All Implemented Interfaces:
com.lowagie.text.Element, RtfBasicElement
The RtfShapePosition stores position and ordering
information for one RtfShape.
- Version:
- $Id: RtfShapePosition.java 3580 2008-08-06 15:52:00Z howard_s $
- Author:
- Mark Hall (Mark.Hall@mail.room3b.eu), Thomas Bickel (tmb99@inode.at)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant for horizontal positioning relative to the column.static final intConstant for horizontal positioning relative to the margin.static final intConstant for horizontal positioning relative to the page.static final intConstant for vertical positioning relative to the margin.static final intConstant for vertical positioning relative to the page.static final intConstant for vertical positioning relative to the paragraph.Fields inherited from class RtfAddableElement
doc, inHeader, inTableFields inherited from class com.lowagie.text.Chunk
ACTION, attributes, BACKGROUND, CHAR_SPACING, COLOR, content, ENCODING, font, GENERICTAG, HSCALE, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SEPARATOR, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TAB, TEXTRENDERMODE, UNDERLINEFields inherited from interface com.lowagie.text.Element
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, FOOTNOTE, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MODIFICATIONDATE, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARKFields inherited from interface RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsConstructorDescriptionRtfShapePosition(int top, int left, int right, int bottom) Constructs a new RtfShapePosition with the four bounding coordinates. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets whether the shape is below the text.protected voidsetIgnoreXRelative(boolean ignoreXRelative) Set whether to ignore the horizontal relative position.protected voidsetIgnoreYRelative(boolean ignoreYRelative) Set whether to ignore the vertical relative position.voidsetShapeBelowText(boolean shapeBelowText) Sets whether the shape is below the text.voidsetXRelativePos(int relativePos) Sets the relative horizontal position.voidsetYRelativePos(int relativePos) Sets the relative vertical position.voidsetZOrder(int order) Sets the z order to use.voidwriteContent(OutputStream result) Write this RtfShapePosition.Methods inherited from class RtfAddableElement
intToByteArray, isEmpty, setInHeader, setInTable, setRtfDocumentMethods inherited from class com.lowagie.text.Chunk
append, getCharacterSpacing, getChunkAttributes, getChunks, getContent, getFont, getHorizontalScaling, getHyphenation, getImage, getTextRise, getWidthPoint, hasAttributes, isContent, isNestable, process, setAction, setAnchor, setAnchor, setAnnotation, setBackground, setBackground, setCharacterSpacing, setChunkAttributes, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type
-
Field Details
-
POSITION_X_RELATIVE_PAGE
public static final int POSITION_X_RELATIVE_PAGEConstant for horizontal positioning relative to the page.- See Also:
-
POSITION_X_RELATIVE_MARGIN
public static final int POSITION_X_RELATIVE_MARGINConstant for horizontal positioning relative to the margin.- See Also:
-
POSITION_X_RELATIVE_COLUMN
public static final int POSITION_X_RELATIVE_COLUMNConstant for horizontal positioning relative to the column.- See Also:
-
POSITION_Y_RELATIVE_PAGE
public static final int POSITION_Y_RELATIVE_PAGEConstant for vertical positioning relative to the page.- See Also:
-
POSITION_Y_RELATIVE_MARGIN
public static final int POSITION_Y_RELATIVE_MARGINConstant for vertical positioning relative to the margin.- See Also:
-
POSITION_Y_RELATIVE_PARAGRAPH
public static final int POSITION_Y_RELATIVE_PARAGRAPHConstant for vertical positioning relative to the paragraph.- See Also:
-
-
Constructor Details
-
RtfShapePosition
public RtfShapePosition(int top, int left, int right, int bottom) Constructs a new RtfShapePosition with the four bounding coordinates.- Parameters:
top- The top coordinate.left- The left coordinate.right- The right coordinate.bottom- The bottom coordinate.
-
-
Method Details
-
isShapeBelowText
public boolean isShapeBelowText()Gets whether the shape is below the text.- Returns:
Trueif the shape is below,falseif the text is below.
-
setShapeBelowText
public void setShapeBelowText(boolean shapeBelowText) Sets whether the shape is below the text.- Parameters:
shapeBelowText-Trueif the shape is below,falseif the text is below.
-
setXRelativePos
public void setXRelativePos(int relativePos) Sets the relative horizontal position. Use one of the constants provided in this class.- Parameters:
relativePos- The relative horizontal position to use.
-
setYRelativePos
public void setYRelativePos(int relativePos) Sets the relative vertical position. Use one of the constants provides in this class.- Parameters:
relativePos- The relative vertical position to use.
-
setZOrder
public void setZOrder(int order) Sets the z order to use.- Parameters:
order- The z order to use.
-
setIgnoreXRelative
protected void setIgnoreXRelative(boolean ignoreXRelative) Set whether to ignore the horizontal relative position.- Parameters:
ignoreXRelative-Trueto ignore the horizontal relative position,falseotherwise.
-
setIgnoreYRelative
protected void setIgnoreYRelative(boolean ignoreYRelative) Set whether to ignore the vertical relative position.- Parameters:
ignoreYRelative-Trueto ignore the vertical relative position,falseotherwise.
-
writeContent
Write this RtfShapePosition.- Specified by:
writeContentin interfaceRtfBasicElement- Specified by:
writeContentin classRtfAddableElement- Parameters:
result- TheOutputStreamto write the content to- Throws:
IOException
-