de.vc.jfo.flow

## Class TableContent

- java.lang.Object
- - de.vc.xml.AbstractNode
  - - de.vc.xml.AbstractNodeWithAttributes
    - - de.vc.jfo.FormattingObject
      - - de.vc.jfo.flow.FlowObject
        - - de.vc.jfo.flow.FlowObjectWithElements
          - - de.vc.jfo.flow.TableContent

- All Implemented Interfaces:
    Node, NodeElement, java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    TableBody, TableFooter, TableHeader

      public abstract class TableContent
      extends FlowObjectWithElements

  A table-content is an object that holds some rows. Table-contents are table- body, table-header and table-footer.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class de.vc.jfo.FormattingObject

      `EMPTY_ARRAY`

    - ### Fields inherited from class de.vc.xml.AbstractNodeWithAttributes

      `MAP_TYPE_FLYWEIGHT, MAP_TYPE_HASH`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `TableContent(java.lang.String tag)`
    `protected` | `TableContent(java.lang.String tag, FormattingObject parent)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TableContent` | `add(int idx, TableRow row)` Adds a table row at given index (row) to content.
    `TableContent` | `add(java.lang.Object[][] cells)` Adds some rows to content.
    `TableContent` | `add(TableRow row)` Adds a table row to content.
    `TableContent` | `add(TableRow[] rows)` Adds some rows to content.
    `Accessibility` | `getAccessibility()` Gets the accessibilty of this fo.
    `Background` | `getBackground()` Gets the background of this fo.
    `Border` | `getBorder()` Gets the border of this fo.
    `TableCell` | `getCell(int row, int column)` Gets a cell.
    `Padding` | `getPadding()` Gets the padding of this fo.
    `RelativePosition` | `getRelativePosition()` Gets the relative position of this fo.
    `TableRow` | `getRow(int idx)` Gets the table-row at given index (row).
    `boolean` | `hasBorder()` Returns true if at least one border attribute is set.
    `void` | `setAccessibility(Accessibility access)` Sets the accessibility of this fo.
    `void` | `setBackground(Background bg)` Sets the background of this fo.
    `void` | `setBorder(Border border)` Sets the border of this fo.
    `void` | `setCellBorders(int width)` Sets borders of table cells.
    `void` | `setCellBorders(Measure width)` Sets borders of table cells.
    `void` | `setCellBorders(Measure width, Border.Style style)` Sets borders of table cells.
    `void` | `setCellBorders(Measure width, java.awt.Color color, Border.Style style)` Sets borders of table cells.
    `void` | `setHorizontalPadding(Measure size)` The the left and right padding of all contained table-cells.
    `void` | `setPadding(Padding padding)` Sets the padding of this fo.
    `void` | `setRelativePosition(RelativePosition pos)` Sets the relative position of this fo.
    `void` | `setSpaceAroundCells(Measure size)` Deprecated. Use setHorizontalPadding instead.
    `void` | `setVerticalPadding(Measure size)` The the top and bottom padding of all contained table-cells.

    - ### Methods inherited from class de.vc.jfo.flow.FlowObjectWithElements

      `add, add, add, add, addAllImpl, addAllUnsafe, addAllUnsafe, addElement, addElement, addElements, addElements, addUnsafe, addUnsafe, clone, firstElement, getElements, isEmpty, lastElement, remove, remove, removeAll, removeElement, removeElement, removeLast, replaceElement, setElement`

    - ### Methods inherited from class de.vc.jfo.FormattingObject

      `cloned, clonedList, createUniqueID, doGetAttribute, doSetAttribute, elementCount, get, getAbsolutePosition, getAttributeMap, getDefinedAttributes, getDocument, getFont, getID, getLanguage, getLogger, getMargin, getMeasureValue, getObjectValue, getObjectValue, getObjectValue, getObjectValue, getOrphans, getParentFO, getWidows, hasID, hasPadding, isHyphenation, setAbsolutePosition, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setFont, setHyphenation, setID, setLanguage, setLanguage, setMargin, setOrphans, setWidows`

    - ### Methods inherited from class de.vc.xml.AbstractNodeWithAttributes

      `getDefaultMapType, setDefaultMapType`

    - ### Methods inherited from class de.vc.xml.AbstractNode

      `addAttributeChangeListener, clearEqualAttributes, clearInheratedAttribute, clearInheratedAttributes, clearValue, contains, contains, copyAttributes, createID, findFirstNodeWithText, findNode, findNodesWithText, fire, fireSaxEvents, getAttrAsBoolean, getAttrAsInteger, getAttrAsString, getAttrAsString, getAttribute, getAttribute, getAttributeMap, getContentText, getContentText, getDefinedAttributes, getElements, getElements, getElements, getFirstElement, getIndex, getLocalName, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getParent, getParent, getParent, getParentOrThis, getQName, getRoot, hasEqualAttrs, indexOf, liftInheritedAttribute, removeAttributeChangeListener, setAttribute, setAttributes, setAttrIfNotNull, setEnableAttributeChangeEvent, setNamespace, setParent, setQName, setUndefinedAttributes, writeTo, writeTo, writeTo, writeTo`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TableContent

          public TableContent(java.lang.String tag)

    - #### TableContent

          protected TableContent(java.lang.String tag,
                      FormattingObject parent)

  - ### Method Detail

    - #### getPadding

          public Padding getPadding()

      Gets the padding of this fo. Is never null.
      Overrides:
        `getPadding` in class `FormattingObject`
      Returns:
        Padding.

    - #### setPadding

          public void setPadding(Padding padding)

      Sets the padding of this fo.
      Overrides:
        `setPadding` in class `FormattingObject`
      Parameters:
        `padding` - Padding.

    - #### hasBorder

          public boolean hasBorder()

      Returns true if at least one border attribute is set.
      Overrides:
        `hasBorder` in class `FormattingObject`
      Returns:
        True if at least one border attribute is set.

    - #### getBorder

          public Border getBorder()

      Gets the border of this fo. Is never null.
      Overrides:
        `getBorder` in class `FormattingObject`
      Returns:
        Border.

    - #### setBorder

          public void setBorder(Border border)

      Sets the border of this fo. If border is NULL, an empty border is created.
      Overrides:
        `setBorder` in class `FormattingObject`
      Parameters:
        `border` - Border.

    - #### getBackground

          public Background getBackground()

      Gets the background of this fo. Is never null.
      Overrides:
        `getBackground` in class `FormattingObject`
      Returns:
        Background.

    - #### setBackground

          public void setBackground(Background bg)

      Sets the background of this fo.
      Overrides:
        `setBackground` in class `FormattingObject`
      Parameters:
        `bg` - Background.

    - #### getAccessibility

          public Accessibility getAccessibility()

      Gets the accessibilty of this fo. Is never null.
      Overrides:
        `getAccessibility` in class `FormattingObject`
      Returns:
        Accessibility.

    - #### setAccessibility

          public void setAccessibility(Accessibility access)

      Sets the accessibility of this fo.
      Overrides:
        `setAccessibility` in class `FormattingObject`
      Parameters:
        `access` - Accessibility.

    - #### getRelativePosition

          public RelativePosition getRelativePosition()

      Gets the relative position of this fo. Is never null.
      Overrides:
        `getRelativePosition` in class `FormattingObject`
      Returns:
        RelativePosition.

    - #### setRelativePosition

          public void setRelativePosition(RelativePosition pos)

      Sets the relative position of this fo.
      Overrides:
        `setRelativePosition` in class `FormattingObject`
      Parameters:
        `pos` - RelativePosition.

    - #### getCell

          public TableCell getCell(int row,
                          int column)

      Gets a cell. Return null, if row or column is invalid.
      Parameters:
        `row` - Row.
        `column` - Column.
      Returns:
        TableCell.

    - #### add

          public TableContent add(TableRow row)

      Adds a table row to content.
      Parameters:
        `row` - TableRow.
      Returns:
        This object for chained calls.

    - #### add

          public TableContent add(int idx,
                         TableRow row)

      Adds a table row at given index (row) to content.
      Parameters:
        `idx` - Index (row).
        `row` - TableRow
      Returns:
        This object for chained calls.

    - #### add

          public TableContent add(TableRow[] rows)

      Adds some rows to content.
      Parameters:
        `rows` - Rows.
      Returns:
        This object for chained calls.

    - #### add

          public TableContent add(java.lang.Object[][] cells)

      Adds some rows to content.
      Parameters:
        `cells` - Cells as a matrix of objects. Allowed Objects are TableCells, Strings, BlockGroupMembers or InlineElements.
      Returns:
        This object for chained calls.
      Throws:
        `java.lang.IllegalArgumentException` - is thrown if you try to add an unsupported object.

    - #### getRow

          public TableRow getRow(int idx)

      Gets the table-row at given index (row).
      Parameters:
        `idx` - Index (row)
      Returns:
        TableRow or NULL, if index out of range.

    - #### setCellBorders

          public void setCellBorders(Measure width)

      Sets borders of table cells. Style is solid and color is black.
      Parameters:
        `width` - Width of border.

    - #### setCellBorders

          public void setCellBorders(int width)

      Sets borders of table cells. Style is solid and color is black.
      Parameters:
        `width` - Width of border in points.

    - #### setCellBorders

          public void setCellBorders(Measure width,
                            Border.Style style)

      Sets borders of table cells. Color is black.
      Parameters:
        `width` - Width of border.
        `style` - Style of border.

    - #### setCellBorders

          public void setCellBorders(Measure width,
                            java.awt.Color color,
                            Border.Style style)

      Sets borders of table cells.
      Parameters:
        `width` - Width of border.
        `color` - Color of border.
        `style` - Style of border.

    - #### setSpaceAroundCells

          public void setSpaceAroundCells(Measure size)

      Deprecated. Use setHorizontalPadding instead.
      The the left and right padding of all contained table-cells.
      Parameters:
        `size` - Left and right padding size.

    - #### setHorizontalPadding

          public void setHorizontalPadding(Measure size)

      The the left and right padding of all contained table-cells.
      Parameters:
        `size` - Left and right padding size.

    - #### setVerticalPadding

          public void setVerticalPadding(Measure size)

      The the top and bottom padding of all contained table-cells.
      Parameters:
        `size` - Top and bottom padding size.

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.