Class ListItemContentLayoutManager

    • Constructor Detail

      • ListItemContentLayoutManager

        public ListItemContentLayoutManager​(ListItemLabel node)
        Create a new Cell layout manager.
        Parameters:
        node - list-item-label node
      • ListItemContentLayoutManager

        public ListItemContentLayoutManager​(ListItemBody node)
        Create a new Cell layout manager.
        Parameters:
        node - list-item-body node
    • Method Detail

      • getPartFO

        protected AbstractListItemPart getPartFO()
        Convenience method.
        Returns:
        the ListBlock node
      • setXOffset

        public void setXOffset​(int off)
        Set the x offset of this list item. This offset is used to set the absolute position of the list item within the parent block area.
        Parameters:
        off - the x offset
      • addAreas

        public void addAreas​(PositionIterator parentIter,
                             LayoutContext layoutContext)
        Add the areas for the break points. The list item contains block stacking layout managers that add block areas.
        Specified by:
        addAreas in interface LayoutManager
        Overrides:
        addAreas in class AbstractLayoutManager
        Parameters:
        parentIter - the iterator of the break positions
        layoutContext - the layout context for adding the 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 get the parent for
        Returns:
        the parent area
      • getNextKnuthElements

        public java.util.List getNextKnuthElements​(LayoutContext context,
                                                   int alignment,
                                                   java.util.Stack lmStack,
                                                   Position restartPosition,
                                                   LayoutManager restartAtLM)
        Returns an updated list of Knuth elements corresponding to this layout manager, after a change of IPD has been detected.
        Specified by:
        getNextKnuthElements in interface LayoutManager
        Overrides:
        getNextKnuthElements in class BlockStackingLayoutManager
        Parameters:
        context - the layout context
        alignment - the alignment
        lmStack - the stack of LMs that are active at the IPD change
        restartPosition - the position corresponding to the element finishing the page before the IPD change
        restartAtLM - if not null, the layout manager from which to restart. That is, the IPD change occurs between two block elements and not inside a paragraph
        Returns:
        an updated list of elements, taking the new IPD into account