Class TableLayoutManager

    • Constructor Detail

      • TableLayoutManager

        public TableLayoutManager​(Table node)
        Create a new table layout manager.
        Parameters:
        node - the table FO
    • Method Detail

      • getTable

        public Table getTable()
        Returns:
        the table FO
      • getColumns

        public ColumnSetup getColumns()
        Returns:
        the column setup for this table.
      • getHalfBorderSeparationBPD

        public int getHalfBorderSeparationBPD()
        Returns:
        half the value of border-separation.block-progression-dimension, or 0 if border-collapse="collapse".
      • getHalfBorderSeparationIPD

        public int getHalfBorderSeparationIPD()
        Returns:
        half the value of border-separation.inline-progression-dimension, or 0 if border-collapse="collapse".
      • getNextKnuthElements

        public java.util.List getNextKnuthElements​(LayoutContext context,
                                                   int alignment)
        Get a sequence of KnuthElements representing the content of the node assigned to the LM.
        Specified by:
        getNextKnuthElements in interface LayoutManager
        Overrides:
        getNextKnuthElements in class BlockStackingLayoutManager
        Parameters:
        context - the LayoutContext used to store layout information
        alignment - the desired text alignment
        Returns:
        the list of KnuthElements
      • addAreas

        public void addAreas​(PositionIterator parentIter,
                             LayoutContext layoutContext)
        The table area is a reference area that contains areas for columns, bodies, rows and the contents are in cells.
        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
        Returns:
        the parent area of the child
      • getBaseLength

        public int getBaseLength​(int lengthBase,
                                 FObj fobj)
        Returns the base length for the given length base. Length base should be one of the constants defined in LengthBase.
        Specified by:
        getBaseLength in interface PercentBaseContext
        Overrides:
        getBaseLength in class AbstractBaseLayoutManager
        Parameters:
        lengthBase - Indicates which type of the base length value is to be returned
        fobj - The FO object against which the percentage should be evaluated
        Returns:
        The base length value of the given kind
      • saveTableHeaderTableCellLayoutManagers

        protected void saveTableHeaderTableCellLayoutManagers​(TableCellLayoutManager tclm)
        Saves a TableCellLayoutManager for later use.
        Parameters:
        tclm - a TableCellLayoutManager that has a RetrieveTableMarker
      • repeatAddAreasForSavedTableHeaderTableCellLayoutManagers

        protected void repeatAddAreasForSavedTableHeaderTableCellLayoutManagers()
        Calls addAreas() for each of the saved TableCellLayoutManagers.
      • resolveRetrieveTableMarker

        public RetrieveTableMarker resolveRetrieveTableMarker​(RetrieveTableMarker rtm)
        Resolves a RetrieveTableMarker by finding a qualifying Marker to which it is bound to.
        Parameters:
        rtm - the RetrieveTableMarker to be resolved
        Returns:
        a bound RetrieveTableMarker instance or null if no qualifying Marker found
      • registerMarkers

        public void registerMarkers​(java.util.Map<java.lang.String,​Marker> marks,
                                    boolean starting,
                                    boolean isfirst,
                                    boolean islast)
        Register the markers for this table.
        Parameters:
        marks - the map of markers to add
        starting - if the area being added is starting or ending
        isfirst - if the area being added has is-first trait
        islast - if the area being added has is-last trait
      • clearTableFragmentMarkers

        protected void clearTableFragmentMarkers()
        Clears the list of markers in the current table fragment. Should be called just before starting a new header (that belongs to the next table fragment).
      • flagAsHavingRetrieveTableMarker

        public void flagAsHavingRetrieveTableMarker()
      • setRepeateHeader

        public void setRepeateHeader​(boolean repeateHeader)