Class TableAndCaptionLayoutManager

All Implemented Interfaces:
PercentBaseContext, Constants, BlockLevelLayoutManager, LayoutManager

public class TableAndCaptionLayoutManager extends BlockStackingLayoutManager
LayoutManager for a table-and-caption FO. A table and caption consists of a table and a caption. The caption contains blocks that are positioned next to the table on the caption side. The caption blocks have an implicit keep with the table. TODO Implement getNextKnuthElements()
  • Constructor Details

    • TableAndCaptionLayoutManager

      public TableAndCaptionLayoutManager(TableAndCaption node)
      Create a new table and caption layout manager.
      Parameters:
      node - table-and-caption FO
  • Method Details

    • getTableAndCaptionFO

      public TableAndCaption getTableAndCaptionFO()
      Returns the table-and-caption formatting object.
      Returns:
      the table-and-caption formatting object
    • addAreas

      public void addAreas(PositionIterator parentIter, LayoutContext layoutContext)
      Add the areas.
      Specified by:
      addAreas in interface LayoutManager
      Overrides:
      addAreas in class AbstractLayoutManager
      Parameters:
      parentIter - the position iterator
      layoutContext - the layout context for adding areas
    • getParentArea

      public Area getParentArea(Area childArea)
      Return an Area which can contain the passed childArea. The childArea may not yet have any content, but it has essential traits set. In general, if the LayoutManager already has an Area it simply returns it. Otherwise, it makes a new Area of the appropriate class. It gets a parent area for its area by calling its parent LM. Finally, based on the dimensions of the parent area, it initializes its own area. This includes setting the content IPD and the maximum BPD.
      Specified by:
      getParentArea in interface LayoutManager
      Overrides:
      getParentArea in class AbstractLayoutManager
      Parameters:
      childArea - the child area to locate the parent
      Returns:
      the area for this table and caption
    • addChildArea

      public void addChildArea(Area childArea)
      Add the child to the current area.
      Specified by:
      addChildArea in interface LayoutManager
      Overrides:
      addChildArea in class BlockStackingLayoutManager
      Parameters:
      childArea - the area to add
    • getKeepWithNext

      public Keep getKeepWithNext()
      Returns the keep-with-next strength for this element.
      Specified by:
      getKeepWithNext in interface BlockLevelLayoutManager
      Overrides:
      getKeepWithNext in class BlockStackingLayoutManager
      Returns:
      the keep-with-next strength
    • getKeepWithPrevious

      public Keep getKeepWithPrevious()
      Returns the keep-with-previous strength for this element.
      Specified by:
      getKeepWithPrevious in interface BlockLevelLayoutManager
      Overrides:
      getKeepWithPrevious in class BlockStackingLayoutManager
      Returns:
      the keep-with-previous strength