Class StaticContentLayoutManager

    • Constructor Detail

      • StaticContentLayoutManager

        public StaticContentLayoutManager​(PageSequenceLayoutManager pslm,
                                          StaticContent node,
                                          SideRegion reg)
        Creates a new StaticContentLayoutManager.
        Parameters:
        pslm - PageSequenceLayoutManager this layout manager belongs to
        node - static-content FO
        reg - side region to layout into
      • StaticContentLayoutManager

        public StaticContentLayoutManager​(PageSequenceLayoutManager pslm,
                                          StaticContent node,
                                          Block block)
        Creates a new StaticContentLayoutManager.
        Parameters:
        pslm - PageSequenceLayoutManager this layout manager belongs to
        node - static-content FO
        block - the block to layout into
    • Method Detail

      • 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)
        Tell the layout manager to add all the child areas implied by Position objects which will be returned by the Iterator.
        Specified by:
        addAreas in interface LayoutManager
        Overrides:
        addAreas in class AbstractLayoutManager
        Parameters:
        parentIter - the position iterator
        layoutContext - the context
      • addChildArea

        public void addChildArea​(Area childArea)
        Add child area to a the correct container, depending on its area class. A Flow can fill at most one area container of any class at any one time. The actual work is done by BlockStackingLM. Add the childArea to the current area. Called by child LayoutManager when it has filled one of its areas. The LM should already have an Area in which to put the child. See if the area will fit in the current area. If so, add it. Otherwise initiate breaking.
        Specified by:
        addChildArea in interface LayoutManager
        Overrides:
        addChildArea in class BlockStackingLayoutManager
        Parameters:
        childArea - the area to add: will be some block-stacked Area.
      • 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 for which the parent area is wanted
        Returns:
        the parent area for the given child
      • doLayout

        public void doLayout()
        Does the layout for a side region. Called by PageSequenceLayoutManager.
      • getStaticContentFO

        protected StaticContent getStaticContentFO()
        Convenience method that returns the Static Content node.
        Returns:
        the static content node
      • setContentAreaIPD

        protected void setContentAreaIPD​(int contentAreaIPD)
        Sets the IPD of the content area
        Overrides:
        setContentAreaIPD in class BlockStackingLayoutManager
        Parameters:
        contentAreaIPD - the IPD of the content area