|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--ru.novosoft.dc.rtf.dom.RTFShape
Word 97-2000 Drawing Object (shape). The representation of shape in this class is the following:
Positioning parameters specify the layout of shape relative to
the shape anchor
(getPosition(index) and
setPosition(index,value) methods are used).
Boolean flags lock-anchor, in-header, and in-front-of-text specify the appearance and behaveour of shape.
The result contains the flow to be used in alternative if the shape is ignored.
An instance of ShapeEntry contains the specification of
shape drawing.
| Field Summary | |
static byte |
BOTTOM
Index of the bottom position parameter. |
static byte |
LEFT
Index of the left position parameter. |
static byte |
REF_COLUMN
The shape is positioned relative to the column in the horizontal direction. |
static byte |
REF_IGNORE
The shape position is specified in shape-entry parameters. |
static byte |
REF_MARGIN
The shape is positioned relative to the margin. |
static byte |
REF_PAGE
The shape is positioned relative to the page. |
static byte |
REF_PAR
The shape is positioned relative to the paragraph in the vertical direction. |
static byte |
RIGHT
Index of the right position parameter. |
static byte |
SIDES_BOTH
Wrap both sides of shape. |
static byte |
SIDES_LARGEST
Wrap only on largest side. |
static byte |
SIDES_LEFT
Wrap left side only. |
static byte |
SIDES_RIGHT
Wrap right side only. |
static byte |
TOP
Index of the top position parameter. |
static byte |
TYPE_OF_SIDES
Index of the sides-wrapping parameter. |
static byte |
TYPE_OF_WRAP
Index of the wrap-type parameter. |
static byte |
WRAP_AROUND
Wrap around shape. |
static byte |
WRAP_NONE
None (wrap as if shape isn't present). |
static byte |
WRAP_THROUGH
Wrap text through shape. |
static byte |
WRAP_TIGHT
Wrap tightly around shape. |
static byte |
WRAP_TOP_AND_BOTTOM
Wrap around top and bottom of shape (no text allowed beside shape). |
static byte |
X_REFERENCE
Index of the horizontal reference parameter. |
static byte |
Y_REFERENCE
Index of the vertical reference parameter. |
static byte |
Z_ORDER
Index of the z-order parameter. |
| Constructor Summary | |
RTFShape()
|
|
| Method Summary | |
void |
exportTo(org.w3c.dom.Element elem)
Export the contents of this object to the specified DOM element. |
ShapeEntry |
getEntry()
Return the shape entry. |
int |
getPosition(int index)
Return the value of the shape position parameter of the specified index. |
RTFFlow |
getResult()
Return the shape-result field or null if no result specified. |
boolean |
hasLockAnchor()
Return true if the shape has the lock anchor. |
boolean |
isInFrontOfText()
Return the value of the in-front-of-text flag. |
boolean |
isInHeader()
Return the value of the in-header flag. |
void |
setEntry(ShapeEntry value)
Set a shape entry. |
void |
setInFrontOfText(boolean value)
Set a value of the in-front-of-text flag. |
void |
setInHeader(boolean value)
Set a value of the in-header flag. |
void |
setLockAnchor(boolean value)
Set a value of the lock anchor. |
void |
setPosition(int index,
int value)
Set a value for the shape position parameter of the specified index. |
void |
setResult(RTFFlow value)
Set the shape-result field. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final byte TOP
public static final byte BOTTOM
public static final byte LEFT
public static final byte RIGHT
public static final byte Z_ORDER
public static final byte X_REFERENCE
public static final byte Y_REFERENCE
public static final byte TYPE_OF_WRAP
public static final byte TYPE_OF_SIDES
public static final byte REF_MARGIN
public static final byte REF_PAGE
public static final byte REF_COLUMN
public static final byte REF_PAR
public static final byte REF_IGNORE
public static final byte WRAP_TOP_AND_BOTTOM
public static final byte WRAP_AROUND
public static final byte WRAP_NONE
public static final byte WRAP_TIGHT
public static final byte WRAP_THROUGH
public static final byte SIDES_BOTH
public static final byte SIDES_LEFT
public static final byte SIDES_RIGHT
public static final byte SIDES_LARGEST
| Constructor Detail |
public RTFShape()
| Method Detail |
public final void setPosition(int index,
int value)
index - an index of the parameter to be set
(TOP, BOTTOM, LEFT,
RIGHT, Z_ORDER, X_REFERENCE,
Y_REFERENCE, TYPE_OF_WRAP,
or TYPE_OF_SIDES)value - a value to set. For TOP, BOTTOM,
LEFT and RIGHT,
it is a shape position from anchor in twips.
For Z_ORDER, it is z-ordering index starting from 0
for back-most shape.
For X_REFERENCE, the value of REF_IGNORE,
REF_COLUMN, REF_PAGE, or
REF_MARGIN is allowed.
For Y_REFERENCE, the value of REF_IGNORE,
REF_PAR, REF_PAGE, or
REF_MARGIN is allowed.
For TYPE_OF_WRAP, the value of
WRAP_TOP_AND_BOTTOM, WRAP_AROUND,
WRAP_NONE, WRAP_TIGHT, or
WRAP_THROUGH is allowed.
The TYPE_OF_SIDES parameter has sence if the
TYPE_OF_WRAP is equal to WRAP_AROUND
or WRAP_TIGHT. Allowed values are
SIDES_BOTH, SIDES_LEFT,
SIDES_RIGHT, and SIDES_LARGEST.public final int getPosition(int index)
public final void setLockAnchor(boolean value)
public final boolean hasLockAnchor()
public final void setInHeader(boolean value)
public final boolean isInHeader()
public final void setInFrontOfText(boolean value)
public final boolean isInFrontOfText()
public final void setResult(RTFFlow value)
public final RTFFlow getResult()
public final void setEntry(ShapeEntry value)
public final ShapeEntry getEntry()
public void exportTo(org.w3c.dom.Element elem)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||