com.lowagie.text.rtf.graphic

Class RtfShapePosition

public class RtfShapePosition extends RtfAddableElement

The RtfShapePosition stores position and ordering information for one RtfShape.

Version: $Id: RtfShapePosition.java 3361 2008-05-11 12:28:57Z hallm $

Author: Mark Hall (Mark.Hall@mail.room3b.eu) Thomas Bickel (tmb99@inode.at)

Field Summary
intbottom
The bottom coordinate of this RtfShapePosition.
booleanignoreXRelative
Whether to ignore the horizontal relative position.
booleanignoreYRelative
Whether to ignore the vertical relative position.
intleft
The left coordinate of this RtfShapePosition.
static intPOSITION_X_RELATIVE_COLUMN
Constant for horizontal positioning relative to the column.
static intPOSITION_X_RELATIVE_MARGIN
Constant for horizontal positioning relative to the margin.
static intPOSITION_X_RELATIVE_PAGE
Constant for horizontal positioning relative to the page.
static intPOSITION_Y_RELATIVE_MARGIN
Constant for vertical positioning relative to the margin.
static intPOSITION_Y_RELATIVE_PAGE
Constant for vertical positioning relative to the page.
static intPOSITION_Y_RELATIVE_PARAGRAPH
Constant for vertical positioning relative to the paragraph.
intright
The right coordinate of this RtfShapePosition.
booleanshapeBelowText
Whether the shape is below the text.
inttop
The top coordinate of this RtfShapePosition.
intxRelativePos
The horizontal relative position.
intyRelativePos
The vertical relative position.
intzOrder
The z order of this RtfShapePosition.
Constructor Summary
RtfShapePosition(int top, int left, int right, int bottom)
Constructs a new RtfShapePosition with the four bounding coordinates.
Method Summary
booleanisShapeBelowText()
Gets 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.

Field Detail

bottom

private int bottom
The bottom coordinate of this RtfShapePosition.

ignoreXRelative

private boolean ignoreXRelative
Whether to ignore the horizontal relative position.

ignoreYRelative

private boolean ignoreYRelative
Whether to ignore the vertical relative position.

left

private int left
The left coordinate of this RtfShapePosition.

POSITION_X_RELATIVE_COLUMN

public static final int POSITION_X_RELATIVE_COLUMN
Constant for horizontal positioning relative to the column.

POSITION_X_RELATIVE_MARGIN

public static final int POSITION_X_RELATIVE_MARGIN
Constant for horizontal positioning relative to the margin.

POSITION_X_RELATIVE_PAGE

public static final int POSITION_X_RELATIVE_PAGE
Constant for horizontal positioning relative to the page.

POSITION_Y_RELATIVE_MARGIN

public static final int POSITION_Y_RELATIVE_MARGIN
Constant for vertical positioning relative to the margin.

POSITION_Y_RELATIVE_PAGE

public static final int POSITION_Y_RELATIVE_PAGE
Constant for vertical positioning relative to the page.

POSITION_Y_RELATIVE_PARAGRAPH

public static final int POSITION_Y_RELATIVE_PARAGRAPH
Constant for vertical positioning relative to the paragraph.

right

private int right
The right coordinate of this RtfShapePosition.

shapeBelowText

private boolean shapeBelowText
Whether the shape is below the text.

top

private int top
The top coordinate of this RtfShapePosition.

xRelativePos

private int xRelativePos
The horizontal relative position.

yRelativePos

private int yRelativePos
The vertical relative position.

zOrder

private int zOrder
The z order of this RtfShapePosition.

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.

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.

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.

writeContent

public void writeContent(OutputStream result)
Write this RtfShapePosition.