Qt Jambi Home

com.trolltech.qt.gui
Class QTextFrameFormat

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.gui.QTextFormat
              extended by com.trolltech.qt.gui.QTextFrameFormat
All Implemented Interfaces:
QtJambiInterface
Direct Known Subclasses:
QTextTableFormat

public class QTextFrameFormat
extends QTextFormat

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.

See Also:
QTextFrame, QTextBlockFormat

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.AbstractSignal, 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.gui.QTextFormat
background, boolProperty, brushProperty, clearBackground, clearForeground, clearProperty, colorProperty, doubleProperty, equals, foreground, hasProperty, intProperty, isBlockFormat, isCharFormat, isFrameFormat, isImageFormat, isListFormat, isTableFormat, layoutDirection, lengthProperty, lengthVectorProperty, merge, nativePointerArray, objectIndex, objectType, penProperty, properties, property, propertyCount, readFrom, setBackground, setForeground, setLayoutDirection, setObjectIndex, setObjectType, setProperty, setProperty, stringProperty, toBlockFormat, toCharFormat, toFrameFormat, toImageFormat, toListFormat, toTableFormat, type, writeTo
 
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

QTextFrameFormat

public QTextFrameFormat()

Constructs a text frame format object with the default properties.

Method Detail

border

public final double border()

Returns the width of the border in pixels.

See Also:
setBorder

borderBrush

public final QBrush borderBrush()

Returns the brush used for the frame's border.

See Also:
setBorderBrush

borderStyle

public final QTextFrameFormat.BorderStyle borderStyle()

Returns the style of the frame's border.

See Also:
setBorderStyle

bottomMargin

public final double bottomMargin()

Returns the width of the frame's bottom margin in pixels.

See Also:
setBottomMargin

height

public final QTextLength height()

Returns the height of the frame's border rectangle.

See Also:
setHeight

isValid

public boolean isValid()

Returns true if the format description is valid; otherwise returns false.

Overrides:
isValid in class QTextFormat

leftMargin

public final double leftMargin()

Returns the width of the frame's left margin in pixels.

See Also:
setLeftMargin

margin

public final double margin()

Returns the width of the frame's external margin in pixels.

See Also:
setMargin

padding

public final double padding()

Returns the width of the frame's internal padding in pixels.

See Also:
setPadding

pageBreakPolicy

public final QTextFormat.PageBreakFlags pageBreakPolicy()

Returns the currently set page break policy for the frame/table. The default is QTextFormat::PageBreak_Auto.

See Also:
setPageBreakPolicy

position

public final QTextFrameFormat.Position position()

Returns the positioning policy for frames with this frame format.

See Also:
setPosition

rightMargin

public final double rightMargin()

Returns the width of the frame's right margin in pixels.

See Also:
setRightMargin

setBorder

public final void setBorder(double border)

Sets the border (in pixels) of the frame's border.

See Also:
border

setBorderBrush

public final void setBorderBrush(QBrush brush)

Sets the brush used for the frame's border.

See Also:
borderBrush

setBorderStyle

public final void setBorderStyle(QTextFrameFormat.BorderStyle style)

Sets the style of the frame's border.

See Also:
borderStyle

setBottomMargin

public final void setBottomMargin(double margin)

Sets the frame's bottom margin in pixels.

See Also:
bottomMargin

setHeight

public final void setHeight(double height)

Sets the frame's height.


setHeight

public final void setHeight(QTextLength height)

Sets the frame's height.

See Also:
height

setLeftMargin

public final void setLeftMargin(double margin)

Sets the frame's left margin in pixels.

See Also:
leftMargin

setMargin

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.

See Also:
margin

setPadding

public final void setPadding(double padding)

Sets the padding of the frame's internal padding in pixels.

See Also:
padding

setPageBreakPolicy

public final void setPageBreakPolicy(QTextFormat.PageBreakFlag... flags)

Sets the page break policy for the frame/table to flags.

See Also:
pageBreakPolicy

setPageBreakPolicy

public final void setPageBreakPolicy(QTextFormat.PageBreakFlags flags)

Sets the page break policy for the frame/table to flags.

See Also:
pageBreakPolicy

setPosition

public final void setPosition(QTextFrameFormat.Position f)

Sets the f for positioning frames with this frame format.

See Also:
position

setRightMargin

public final void setRightMargin(double margin)

Sets the frame's right margin in pixels.

See Also:
rightMargin

setTopMargin

public final void setTopMargin(double margin)

Sets the frame's top margin in pixels.

See Also:
topMargin

setWidth

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.


setWidth

public final void setWidth(QTextLength length)

Sets the frame's border rectangle's length.

See Also:
width, QTextLength

topMargin

public final double topMargin()

Returns the width of the frame's top margin in pixels.

See Also:
setTopMargin

width

public final QTextLength width()

Returns the width of the frame's border rectangle.

See Also:
setWidth, QTextLength

fromNativePointer

public static QTextFrameFormat fromNativePointer(QNativePointer nativePointer)
This function returns the QTextFrameFormat instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.

nativePointerArray

public static QNativePointer nativePointerArray(QTextFrameFormat[] array)
This function returns a QNativePointer that is pointing to the specified QTextFrameFormat array.

Parameters:
array - the array that the returned pointer will point to.
Returns:
a QNativePointer that is pointing to the specified array.

Qt Jambi Home