## com.lowagie.text.rtf.graphic
Class RtfShapePosition

    java.lang.Object
      com.lowagie.text.Chunk
          com.lowagie.text.rtf.RtfAddableElement
              com.lowagie.text.rtf.graphic.RtfShapePosition

All Implemented Interfaces:
  Element, MarkupAttributes, RtfBasicElement

    public class RtfShapePosition

extends RtfAddableElement

The RtfShapePosition stores position and ordering information for one RtfShape.

Version:
  $Revision: 1.2 $
Author:
  Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
`private int` `bottom` The bottom coordinate of this RtfShapePosition.
`private boolean` `ignoreXRelative` Whether to ignore the horizontal relative position.
`private boolean` `ignoreYRelative` Whether to ignore the vertical relative position.
`private int` `left` The left coordinate of this RtfShapePosition.
`static int` `POSITION_X_RELATIVE_COLUMN` Constant for horizontal positioning relative to the column.
`static int` `POSITION_X_RELATIVE_MARGIN` Constant for horizontal positioning relative to the margin.
`static int` `POSITION_X_RELATIVE_PAGE` Constant for horizontal positioning relative to the page.
`static int` `POSITION_Y_RELATIVE_MARGIN` Constant for vertical positioning relative to the margin.
`static int` `POSITION_Y_RELATIVE_PAGE` Constant for vertical positioning relative to the page.
`static int` `POSITION_Y_RELATIVE_PARAGRAPH` Constant for vertical positioning relative to the paragraph.
`private int` `right` The right coordinate of this RtfShapePosition.
`private boolean` `shapeBelowText` Whether the shape is below the text.
`private int` `top` The top coordinate of this RtfShapePosition.
`private int` `xRelativePos` The horizontal relative position.
`private int` `yRelativePos` The vertical relative position.
`private int` `zOrder` The z order of this RtfShapePosition.

Fields inherited from class com.lowagie.text.rtf.RtfAddableElement
`doc, inHeader, inTable`

Fields inherited from class com.lowagie.text.Chunk
`ACTION, attributes, BACKGROUND, COLOR, content, ENCODING, font, GENERICTAG, HSCALE, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, markupAttributes, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TEXTRENDERMODE, UNDERLINE`

Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
`CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR`

Constructor Summary
`RtfShapePosition(int top, int left, int right, int bottom)` Constructs a new RtfShapePosition with the four bounding coordinates.

Method Summary
`boolean` `isShapeBelowText()` Gets whether the shape is below the text.
`protected void` `setIgnoreXRelative(boolean ignoreXRelative)` Set whether to ignore the horizontal relative position.
`protected void` `setIgnoreYRelative(boolean ignoreYRelative)` Set whether to ignore the vertical relative position.
`void` `setShapeBelowText(boolean shapeBelowText)` Sets whether the shape is below the text.
`void` `setXRelativePos(int relativePos)` Sets the relative horizontal position.
`void` `setYRelativePos(int relativePos)` Sets the relative vertical position.
`void` `setZOrder(int order)` Sets the z order to use.
`byte[]` `write()` Write this RtfShapePosition.

Methods inherited from class com.lowagie.text.rtf.RtfAddableElement
`intToByteArray, setInHeader, setInTable, setRtfDocument`

Methods inherited from class com.lowagie.text.Chunk

`addToArray, append, content, font, getAttributes, getChunks, getHorizontalScaling, getImage, getKeySet, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, getTextRise, getWidthPoint, hasAttributes, isEmpty, isTag, process, setAction, setAnchor, setAnchor, setAnnotation, setBackground, setBackground, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, setMarkupAttribute, setMarkupAttributes, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### POSITION_X_RELATIVE_PAGE

    public static final int POSITION_X_RELATIVE_PAGE

  Constant for horizontal positioning relative to the page.

  See Also:
    Constant Field Values

### POSITION_X_RELATIVE_MARGIN

    public static final int POSITION_X_RELATIVE_MARGIN

  Constant for horizontal positioning relative to the margin.

  See Also:
    Constant Field Values

### POSITION_X_RELATIVE_COLUMN

    public static final int POSITION_X_RELATIVE_COLUMN

  Constant for horizontal positioning relative to the column.

  See Also:
    Constant Field Values

### POSITION_Y_RELATIVE_PAGE

    public static final int POSITION_Y_RELATIVE_PAGE

  Constant for vertical positioning relative to the page.

  See Also:
    Constant Field Values

### POSITION_Y_RELATIVE_MARGIN

    public static final int POSITION_Y_RELATIVE_MARGIN

  Constant for vertical positioning relative to the margin.

  See Also:
    Constant Field Values

### POSITION_Y_RELATIVE_PARAGRAPH

    public static final int POSITION_Y_RELATIVE_PARAGRAPH

  Constant for vertical positioning relative to the paragraph.

  See Also:
    Constant Field Values

### top

    private int top

  The top coordinate of this RtfShapePosition.

### left

    private int left

  The left coordinate of this RtfShapePosition.

### right

    private int right

  The right coordinate of this RtfShapePosition.

### bottom

    private int bottom

  The bottom coordinate of this RtfShapePosition.

### zOrder

    private int zOrder

  The z order of this RtfShapePosition.

### xRelativePos

    private int xRelativePos

  The horizontal relative position.

### yRelativePos

    private int yRelativePos

  The vertical relative position.

### ignoreXRelative

    private boolean ignoreXRelative

  Whether to ignore the horizontal relative position.

### ignoreYRelative

    private boolean ignoreYRelative

  Whether to ignore the vertical relative position.

### shapeBelowText

    private boolean shapeBelowText

  Whether the shape is below the text.

Constructor Detail

### 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 Detail

### isShapeBelowText

    public boolean isShapeBelowText()

  Gets whether the shape is below the text.

  Returns:
    `True` if the shape is below, `false` if the text is below.

### setShapeBelowText

    public void setShapeBelowText(boolean shapeBelowText)

  Sets whether the shape is below the text.

  Parameters:
    `shapeBelowText` - `True` if the shape is below, `false` if 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` - `True` to ignore the horizontal relative position, `false` otherwise.

### setIgnoreYRelative

    protected void setIgnoreYRelative(boolean ignoreYRelative)

  Set whether to ignore the vertical relative position.

  Parameters:
    `ignoreYRelative` - `True` to ignore the vertical relative position, `false` otherwise.

### write

    public byte[] write()

  Write this RtfShapePosition.

  Specified by:
    `write` in interface `RtfBasicElement`
  Specified by:
    `write` in class `RtfAddableElement`
  Returns:
    The byte array containing the data