Class TableColumn

All Implemented Interfaces:
Cloneable, Constants

public class TableColumn extends TableFObj
Class modelling the fo:table-column object.
  • Constructor Details

    • TableColumn

      public TableColumn(FONode parent)
      Create a TableColumn instance with the given FONode as parent.
      Parameters:
      parent - FONode that is the parent of this object
    • TableColumn

      public TableColumn(FONode parent, boolean implicit)
      Create a TableColumn instance with the given FONode as parent
      Parameters:
      parent - FONode that is the parent of this object
      implicit - true if this table-column has automatically been created (does not correspond to an explicit fo:table-column in the input document)
  • Method Details

    • bind

      public void bind(PropertyList pList) throws FOPException
      Bind property values from the property list to the FO node. Must be overridden in all FObj subclasses that have properties applying to it.
      Overrides:
      bind in class TableFObj
      Parameters:
      pList - the PropertyList where the properties can be found.
      Throws:
      FOPException - if there is a problem binding the values
    • startOfNode

      public void startOfNode() throws FOPException
      Called after processNode() is called. Subclasses can do additional processing.
      Overrides:
      startOfNode in class FObj
      Throws:
      FOPException - FOP Exception
    • endOfNode

      public void endOfNode() throws FOPException
      Primarily used for making final content model validation checks and/or informing the FOEventHandler that the end of this FO has been reached. The default implementation simply calls FONode.finalizeNode(), without sending any event to the FOEventHandler.

      Note: the recommended way to override this method in subclasses is

      super.endOfNode(); // invoke finalizeNode()

      getFOEventHandler().endXXX(); // send endOfNode() notification

      Overrides:
      endOfNode in class FObj
      Throws:
      FOPException - FOP Exception
    • validateChildNode

      protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException
      Checks to make sure, during SAX processing of input document, that the incoming node is valid for this (parent) node (e.g., checking to see that fo:table is not an immediate child of fo:root) called from FOTreeBuilder.startElement(String, String, String, Attributes) before constructing the child FObj.
      XSL Content Model: empty
      Overrides:
      validateChildNode in class FONode
      Parameters:
      loc - location in the FO source file
      nsURI - namespace of incoming node
      localName - name of the incoming node (without namespace prefix)
      Throws:
      ValidationException - if incoming node not valid for parent
    • getCommonBorderPaddingBackground

      public CommonBorderPaddingBackground getCommonBorderPaddingBackground()
      Get the CommonBorderPaddingBackground instance attached to this TableColumn.
      Specified by:
      getCommonBorderPaddingBackground in class TableFObj
      Returns:
      the CommonBorderPaddingBackground instance
    • getColumnWidth

      public Length getColumnWidth()
      Get a Length instance corresponding to the column-width property.
      Returns:
      the "column-width" property.
    • setColumnWidth

      public void setColumnWidth(Length columnWidth)
      Sets the column width.
      Parameters:
      columnWidth - the column width
    • getColumnNumber

      public int getColumnNumber()
      Get the value of the column-number property
      Returns:
      the "column-number" property.
    • setColumnNumber

      protected void setColumnNumber(int columnNumber)
      Used for setting the column-number for an implicit column
      Parameters:
      columnNumber - the number to set
    • getNumberColumnsRepeated

      public int getNumberColumnsRepeated()
      Returns:
      value for number-columns-repeated.
    • getNumberColumnsSpanned

      public int getNumberColumnsSpanned()
      Returns:
      value for number-columns-spanned.
    • getLocalName

      public String getLocalName()
      Returns the local name (i.e. without namespace prefix) of the node
      Specified by:
      getLocalName in class FONode
      Returns:
      the local name of this node
    • getNameId

      public int getNameId()
      Returns the Constants class integer value of this node
      Overrides:
      getNameId in class FONode
      Returns:
      Constants.FO_TABLE_COLUMN
    • isImplicitColumn

      public boolean isImplicitColumn()
      Indicates whether this table-column has been created as default column for this table in case no table-columns have been defined. Note that this only used to provide better user feedback (see ColumnSetup).
      Returns:
      true if this table-column has been created as default column
    • toString

      public String toString()
      Overrides:
      toString in class FObj
    • getProperty

      public Property getProperty(int propId) throws PropertyException
      Retrieve a property value through its Id; used by from-table-column() function
      Parameters:
      propId - the id for the property to retrieve
      Returns:
      the requested Property
      Throws:
      PropertyException - if there is a problem evaluating the property
    • releasePropertyList

      protected void releasePropertyList()
      Clear the reference to the PropertyList (retained for from-table-column())
    • isHeader

      public boolean isHeader()
      Returns true if this column is made of header cells.
      Returns:
      true if cells in this column are like TH cells in HTML