|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--ru.novosoft.dc.rtf.dom.objects.Position
Specification of absolutely positioned paragraphs (frames or objects).
| Field Summary | |
static byte |
ALLOW_WRAP
Allow text wrapping (gaps around the frame are specified in this case). |
static byte |
BOTTOM
Position vertically at the bottom of the reference frame. |
static byte |
CAP_INTEXT
In-text drop cap. |
static byte |
CAP_MARGIN
Margin drop cap. |
static byte |
CAP_NONE
No drop cap (default). |
static byte |
CENTER
Center horizontally or vertically within the reference frame. |
static byte |
FRAME_DISTANCE
Index of the frame distance parameter. |
static byte |
FRAME_POSITION
Index of the frame position parameter. |
static byte |
FRAME_REFERENCE
Index of the frame reference parameter. |
static byte |
FRAME_SIZE
Index of the frame size parameter. |
static byte |
INLINE
Position vertically in-line. |
static byte |
INSIDE
Position horizontally or vertically inside the reference frame. |
static byte |
LEFT
Position horizontally to the left within the reference frame. |
static byte |
NO_WRAP
No text wrapping around the frame. |
static byte |
OUTSIDE
Position horizontally or vertically outside the reference frame. |
static byte |
OVERLAY
Text flows underneath frame. |
static byte |
REF_COLUMN
Horizontal reference frame is the column (the default). |
static byte |
REF_MARGIN
Horizontal or vertical reference frame is the margin. |
static byte |
REF_PAGE
Horizontal or vertical reference frame is the page. |
static byte |
REF_PAR
Vertical reference frame is the next unframed paragraph. |
static byte |
RIGHT
Position horizontally to the right within the reference frame. |
static byte |
TOP
Position vertically at the top of the reference frame. |
static byte |
WRAP_BOTTOM
Index of the bottom wrap distance parameter. |
static byte |
WRAP_LEFT
Index of the left wrap distance parameter. |
static byte |
WRAP_RIGHT
Index of the right wrap distance parameter. |
static byte |
WRAP_TOP
Index of the top wrap distance parameter. |
static byte |
WRAP_TYPE
Index of the wrap type parameter. |
| Constructor Summary | |
Position()
|
|
| Method Summary | |
boolean |
allowsOverlap()
Return true if overlapping is allowed. |
java.lang.Object |
clone()
Creates a deep copy of this object. |
boolean |
equals(java.lang.Object obj)
Compare this frame with another frame and return true if frames coinside. |
void |
exportTo(org.w3c.dom.Element elem,
java.lang.String tagName)
Export the contents of this object to the specified DOM element. |
int |
getDropCapLines()
Return the number of lines drop cap is to occupy. |
int |
getDropCapType()
Return the drop cap type. |
int |
getHorizontalPosition(int index)
Return the value of the horizontal position parameter of the specified index. |
int |
getVerticalPosition(int index)
Return the value of the vertical position parameter of the specified index. |
int |
getWrapping(int index)
Return the value of the text wrapping parameter of the specified index. |
boolean |
hasLockAnchor()
Return true if the frame has the lock anchor. |
void |
setDropCapLines(int value)
Set a number of lines drop cap is to occupy. |
void |
setDropCapType(int value)
Set a type of the drop cap. |
void |
setHorizontalPosition(int index,
int value)
Set a value for the horizontal position parameter of the specified index. |
void |
setLockAnchor(boolean value)
Set a value of the lock anchor. |
void |
setOverlap(boolean value)
Set a value for the overlap flag. |
void |
setVerticalPosition(int index,
int value)
Set a value for the vertical position parameter of the specified index. |
void |
setWrapping(int index,
int value)
Set a value for the text wrapping parameter of the specified index. |
| Methods inherited from class java.lang.Object |
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final byte FRAME_SIZE
public static final byte FRAME_REFERENCE
public static final byte FRAME_POSITION
public static final byte FRAME_DISTANCE
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 LEFT
public static final byte TOP
public static final byte RIGHT
public static final byte BOTTOM
public static final byte CENTER
public static final byte INSIDE
public static final byte OUTSIDE
public static final byte INLINE
public static final byte WRAP_TYPE
public static final byte WRAP_LEFT
public static final byte WRAP_RIGHT
public static final byte WRAP_TOP
public static final byte WRAP_BOTTOM
public static final byte NO_WRAP
public static final byte ALLOW_WRAP
public static final byte OVERLAY
public static final byte CAP_NONE
public static final byte CAP_INTEXT
public static final byte CAP_MARGIN
| Constructor Detail |
public Position()
| Method Detail |
public final void setHorizontalPosition(int index,
int value)
index - an index of the parameter to be set
(FRAME_SIZE, FRAME_REFERENCE, FRAME_POSITION, or FRAME_DISTANCE)value - a value to set. For FRAME_SIZE,
it is a frame width in twips. For FRAME_REFERENCE, the value
REF_COLUMN, REF_PAGE, or REF_MARGIN is allowed. For FRAME_POSITION,
the value LEFT, RIGHT, CENTER, INSIDE, or OUTSIDE is allowed.
The FRAME_DISTANCE parameter makes sence for the LEFT positioning
only. It is a distance in twips from the left edge of the
reference frame.public final int getHorizontalPosition(int index)
public final void setVerticalPosition(int index,
int value)
index - an index of the parameter to be set
(FRAME_SIZE, FRAME_REFERENCE, FRAME_POSITION, or FRAME_DISTANCE)value - a value to set. For FRAME_SIZE,
it is a frame height in twips. A positive value indicates the
minimum height of the frame and a negative number indicates the
exact height of the frame. For FRAME_REFERENCE, the value
REF_PAR, REF_PAGE, or REF_MARGIN is allowed. For FRAME_POSITION,
the value TOP, BOTTOM, CENTER, INSIDE, OUTSIDE, or INLINE is allowed.
The FRAME_DISTANCE parameter makes sence for the TOP positioning
only. It is a distance in twips from the top edge of the
reference frame.public final int getVerticalPosition(int index)
public final void setWrapping(int index,
int value)
index - an index of the parameter to be set
(WRAP_TYPE, WRAP_LEFT, WRAP_RIGHT, WRAP_TOP, or WRAP_BOTTOM)value - a value to set. For WRAP_TYPE, the value NO_WRAP, ALLOW_WRAP,
or OVERLAY is allowed. Setting of other wrap parameters
automatically selects the ALLOW_WRAP type. They specify the distance
of the wrapped text from the corresponding side of the frame.public final int getWrapping(int index)
public final void setDropCapType(int value)
public final int getDropCapType()
public final void setDropCapLines(int value)
public final int getDropCapLines()
public final void setLockAnchor(boolean value)
public final boolean hasLockAnchor()
public final void setOverlap(boolean value)
public final boolean allowsOverlap()
public java.lang.Object clone()
public boolean equals(java.lang.Object obj)
public void exportTo(org.w3c.dom.Element elem,
java.lang.String tagName)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||