|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QTextFormat
com.trolltech.qt.gui.QTextFrameFormat
public class QTextFrameFormat
The QTextFrameFormat class provides formatting information for frames in a QTextDocument.
A text frame groups together one or more blocks of text, providing a layer of structure larger than the paragraph. The format of a frame specifies how it is rendered and positioned on the screen. It does not directly specify the behavior of the text formatting within, but provides constraints on the layout of its children.
The frame format defines the width and height of the frame on the screen. Each frame can have a border that surrounds its contents with a rectangular box. The border is surrounded by a margin around the frame, and the contents of the frame are kept separate from the border by the frame's padding. This scheme is similar to the box model used by Cascading Style Sheets for HTML pages.
The position of a frame is set using setPosition and determines how it is located relative to the surrounding text.
The validity of a QTextFrameFormat object can be determined with the isValid function.
Nested Class Summary | |
---|---|
static class |
QTextFrameFormat.BorderStyle
Press link for info on QTextFrameFormat.BorderStyle |
static class |
QTextFrameFormat.Position
Press link for info on QTextFrameFormat.Position |
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QTextFormat |
---|
QTextFormat.FormatType, QTextFormat.ObjectTypes, QTextFormat.PageBreakFlag, QTextFormat.PageBreakFlags, QTextFormat.Property |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Constructor Summary | |
---|---|
QTextFrameFormat()
Constructs a text frame format object with the default properties. |
Method Summary | |
---|---|
double |
border()
Returns the width of the border in pixels. |
QBrush |
borderBrush()
Returns the brush used for the frame's border. |
QTextFrameFormat.BorderStyle |
borderStyle()
Returns the style of the frame's border. |
double |
bottomMargin()
Returns the width of the frame's bottom margin in pixels. |
static QTextFrameFormat |
fromNativePointer(QNativePointer nativePointer)
This function returns the QTextFrameFormat instance pointed to by nativePointer |
QTextLength |
height()
Returns the height of the frame's border rectangle. |
boolean |
isValid()
Returns true if the format description is valid; otherwise returns false. |
double |
leftMargin()
Returns the width of the frame's left margin in pixels. |
double |
margin()
Returns the width of the frame's external margin in pixels. |
static QNativePointer |
nativePointerArray(QTextFrameFormat[] array)
This function returns a QNativePointer that is pointing to the specified QTextFrameFormat array. |
double |
padding()
Returns the width of the frame's internal padding in pixels. |
QTextFormat.PageBreakFlags |
pageBreakPolicy()
Returns the currently set page break policy for the frame/table. |
QTextFrameFormat.Position |
position()
Returns the positioning policy for frames with this frame format. |
double |
rightMargin()
Returns the width of the frame's right margin in pixels. |
void |
setBorder(double border)
Sets the border (in pixels) of the frame's border. |
void |
setBorderBrush(QBrush brush)
Sets the brush used for the frame's border. |
void |
setBorderStyle(QTextFrameFormat.BorderStyle style)
Sets the style of the frame's border. |
void |
setBottomMargin(double margin)
Sets the frame's bottom margin in pixels. |
void |
setHeight(double height)
Sets the frame's height. |
void |
setHeight(QTextLength height)
Sets the frame's height. |
void |
setLeftMargin(double margin)
Sets the frame's left margin in pixels. |
void |
setMargin(double margin)
Sets the frame's margin in pixels. |
void |
setPadding(double padding)
Sets the padding of the frame's internal padding in pixels. |
void |
setPageBreakPolicy(QTextFormat.PageBreakFlag... flags)
Sets the page break policy for the frame/table to flags. |
void |
setPageBreakPolicy(QTextFormat.PageBreakFlags flags)
Sets the page break policy for the frame/table to flags. |
void |
setPosition(QTextFrameFormat.Position f)
Sets the f for positioning frames with this frame format. |
void |
setRightMargin(double margin)
Sets the frame's right margin in pixels. |
void |
setTopMargin(double margin)
Sets the frame's top margin in pixels. |
void |
setWidth(double width)
Convenience method that sets the width of the frame's border rectangle's width to the specified fixed width. |
void |
setWidth(QTextLength length)
Sets the frame's border rectangle's length. |
double |
topMargin()
Returns the width of the frame's top margin in pixels. |
QTextLength |
width()
Returns the width of the frame's border rectangle. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QTextFrameFormat()
Constructs a text frame format object with the default properties.
Method Detail |
---|
public final double border()
Returns the width of the border in pixels.
public final QBrush borderBrush()
Returns the brush used for the frame's border.
public final QTextFrameFormat.BorderStyle borderStyle()
Returns the style of the frame's border.
public final double bottomMargin()
Returns the width of the frame's bottom margin in pixels.
public final QTextLength height()
Returns the height of the frame's border rectangle.
public boolean isValid()
Returns true if the format description is valid; otherwise returns false.
isValid
in class QTextFormat
public final double leftMargin()
Returns the width of the frame's left margin in pixels.
public final double margin()
Returns the width of the frame's external margin in pixels.
public final double padding()
Returns the width of the frame's internal padding in pixels.
public final QTextFormat.PageBreakFlags pageBreakPolicy()
Returns the currently set page break policy for the frame/table. The default is QTextFormat::PageBreak_Auto.
public final QTextFrameFormat.Position position()
Returns the positioning policy for frames with this frame format.
public final double rightMargin()
Returns the width of the frame's right margin in pixels.
public final void setBorder(double border)
Sets the border (in pixels) of the frame's border.
public final void setBorderBrush(QBrush brush)
Sets the brush used for the frame's border.
public final void setBorderStyle(QTextFrameFormat.BorderStyle style)
Sets the style of the frame's border.
public final void setBottomMargin(double margin)
Sets the frame's bottom margin in pixels.
public final void setHeight(QTextLength height)
Sets the frame's height.
public final void setHeight(double height)
Sets the frame's height.
public final void setLeftMargin(double margin)
Sets the frame's left margin in pixels.
public final void setMargin(double margin)
Sets the frame's margin in pixels. This method also sets the left, right, top and bottom margins of the frame to the same value. The individual margins override the general margin.
public final void setPadding(double padding)
Sets the padding of the frame's internal padding in pixels.
public final void setPageBreakPolicy(QTextFormat.PageBreakFlag... flags)
Sets the page break policy for the frame/table to flags.
public final void setPageBreakPolicy(QTextFormat.PageBreakFlags flags)
Sets the page break policy for the frame/table to flags.
public final void setPosition(QTextFrameFormat.Position f)
Sets the f for positioning frames with this frame format.
public final void setRightMargin(double margin)
Sets the frame's right margin in pixels.
public final void setTopMargin(double margin)
Sets the frame's top margin in pixels.
public final void setWidth(QTextLength length)
Sets the frame's border rectangle's length.
public final void setWidth(double width)
Convenience method that sets the width of the frame's border rectangle's width to the specified fixed width.
public final double topMargin()
Returns the width of the frame's top margin in pixels.
public final QTextLength width()
Returns the width of the frame's border rectangle.
public static QTextFrameFormat fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QTextFrameFormat[] array)
array
- the array that the returned pointer will point to.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |