Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QTextTableFormat

    java.lang.Object
      com.trolltech.qt.internal.QSignalEmitterInternal
          com.trolltech.qt.QSignalEmitter
              com.trolltech.qt.QtJambiObject
                  com.trolltech.qt.gui.QTextFormat
                      com.trolltech.qt.gui.QTextFrameFormat
                          com.trolltech.qt.gui.QTextTableFormat

All Implemented Interfaces:
  QtJambiInterface, java.lang.Cloneable

    public class QTextTableFormat

extends QTextFrameFormat
implements java.lang.Cloneable

The `QTextTableFormat` class provides formatting information for tables in a `QTextDocument`. A table is a group of cells ordered into rows and columns. Each table contains at least one row and one column. Each cell contains a block. Tables in rich text documents are formatted using the properties defined in this class.

Tables are horizontally justified within their parent frame according to the table's alignment. This can be read with the `alignment()` function and set with `setAlignment()`.

Cells within the table are separated by cell spacing. The number of pixels between cells is set with `setCellSpacing()` and read with `cellSpacing()`. The contents of each cell is surrounded by cell padding. The number of pixels between each cell edge and its contents is set with `setCellPadding()` and read with `cellPadding()`.

The table's background color can be read with the `background()` function, and can be specified with `setBackground()`. The background color of each cell can be set independently, and will control the color of the cell within the padded area.

The table format also provides a way to constrain the widths of the columns in the table. Columns can be assigned a fixed width, a variable width, or a percentage of the available width (see `QTextLength`). The `columns()` function returns the number of columns with constraints, and the `columnWidthConstraints()` function returns the constraints defined for the table. These quantities can also be set by calling `setColumnWidthConstraints()` with a vector containing new constraints. If no constraints are required, `clearColumnWidthConstraints()` can be used to remove them.

See also:
  `QTextTable`, `QTextTableCell`, and `QTextLength`.

Nested Class Summary

Nested classes/interfaces inherited from class com.trolltech.qt.gui.QTextFrameFormat
`QTextFrameFormat.BorderStyle, 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, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal`

Field Summary

Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`currentSender`

Constructor Summary
`QTextTableFormat()` Constructs a new table format object.

Method Summary
`Qt.Alignment` | `alignment()` Returns the table's alignment.
`double` | `cellPadding()` Returns the table's cell padding.
`double` | `cellSpacing()` Returns the table's cell spacing.
`void` | `clearColumnWidthConstraints()` Clears the column width constraints for the table.
`QTextTableFormat` | `clone()` This method is reimplemented for internal reasons
`int` | `columns()` Returns the number of columns specified by the table format.
`java.util.List` | `columnWidthConstraints()` Returns a list of constraints used by this table format to control the appearance of columns in a table.
`int` | `headerRowCount()` Returns the number of rows in the table that define the header.
`void` | `setAlignment(Qt.Alignment alignment)` Sets the table's `alignment`.
`void` | `setAlignment(Qt.AlignmentFlag[] alignment)` Sets the table's `alignment`.
`void` | `setCellPadding(double padding)` Sets the cell `padding` for the table.
`void` | `setCellSpacing(double spacing)` Sets the cell `spacing` for the table.
`void` | `setColumnWidthConstraints(java.util.List constraints)` Sets the column width `constraints` for the table.
`void` | `setHeaderRowCount(int count)` Declares the first `count` rows of the table as table header.

Methods inherited from class com.trolltech.qt.gui.QTextFrameFormat
`border, borderBrush, borderStyle, bottomMargin, height, leftMargin, margin, padding, pageBreakPolicy, position, rightMargin, setBorder, setBorderBrush, setBorderStyle, setBottomMargin, setHeight, setHeight, setLeftMargin, setMargin, setPadding, setPageBreakPolicy, setPageBreakPolicy, setPosition, setRightMargin, setTopMargin, setWidth, setWidth, topMargin, width`

Methods inherited from class com.trolltech.qt.gui.QTextFormat
`background, boolProperty, brushProperty, clearBackground, clearForeground, clearProperty, colorProperty, doubleProperty, foreground, hasProperty, intProperty, isBlockFormat, isCharFormat, isFrameFormat, isImageFormat, isListFormat, isTableCellFormat, isTableFormat, isValid, layoutDirection, lengthProperty, lengthVectorProperty, merge, objectIndex, objectType, penProperty, properties, property, propertyCount, readFrom, setBackground, setForeground, setLayoutDirection, setObjectIndex, setObjectType, setProperty, setProperty, stringProperty, toBlockFormat, toCharFormat, toFrameFormat, toImageFormat, toListFormat, toTableCellFormat, toTableFormat, type, writeTo`

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`__qt_signalInitialization`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Constructor Detail

### QTextTableFormat

    public QTextTableFormat()

  Constructs a new table format object.

Method Detail

### alignment

    public final Qt.Alignment alignment()

  Returns the table's alignment.

See also:
  `setAlignment()`.

### cellPadding

    public final double cellPadding()

  Returns the table's cell padding. This describes the distance between the border of a cell and its contents.

See also:
  `setCellPadding()`.

### cellSpacing

    public final double cellSpacing()

  Returns the table's cell spacing. This describes the distance between adjacent cells.

See also:
  `setCellSpacing()`.

### clearColumnWidthConstraints

    public final void clearColumnWidthConstraints()

  Clears the column width constraints for the table.

See also:
  `columnWidthConstraints()`, and `setColumnWidthConstraints()`.

### columnWidthConstraints

    public final java.util.List columnWidthConstraints()

  Returns a list of constraints used by this table format to control the appearance of columns in a table.

See also:
  `setColumnWidthConstraints()`.

### columns

    public final int columns()

  Returns the number of columns specified by the table format.

### headerRowCount

    public final int headerRowCount()

  Returns the number of rows in the table that define the header.

See also:
  `setHeaderRowCount()`.

### setAlignment

    public final void setAlignment(Qt.AlignmentFlag[] alignment)

  Sets the table's `alignment`.

See also:
  `alignment()`.

### setAlignment

    public final void setAlignment(Qt.Alignment alignment)

  Sets the table's `alignment`.

See also:
  `alignment()`.

### setCellPadding

    public final void setCellPadding(double padding)

  Sets the cell `padding` for the table. This determines the distance between the border of a cell and its contents.

See also:
  `cellPadding()`.

### setCellSpacing

    public final void setCellSpacing(double spacing)

  Sets the cell `spacing` for the table. This determines the distance between adjacent cells.

See also:
  `cellSpacing()`.

### setColumnWidthConstraints

    public final void setColumnWidthConstraints(java.util.List constraints)

  Sets the column width `constraints` for the table.

See also:
  `columnWidthConstraints()`, and `clearColumnWidthConstraints()`.

### setHeaderRowCount

    public final void setHeaderRowCount(int count)

  Declares the first `count` rows of the table as table header. The table header rows get repeated when a table is broken across a page boundary.

See also:
  `headerRowCount()`.

### clone

    public QTextTableFormat clone()

  This method is reimplemented for internal reasons

  Overrides:
    `clone` in class `QTextFrameFormat`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD