Class AbstractPageNumberCitationLayoutManager

All Implemented Interfaces:
PercentBaseContext, Constants, InlineLevelLayoutManager, LayoutManager
Direct Known Subclasses:
PageNumberCitationLastLayoutManager, PageNumberCitationLayoutManager

public abstract class AbstractPageNumberCitationLayoutManager extends LeafNodeLayoutManager
LayoutManager for the fo:page-number-citation(-last) formatting object
  • Field Details

    • citation

      protected AbstractPageNumberCitation citation
      The page number citation object
    • font

      protected Font font
      Font for the page-number-citation
  • Constructor Details

    • AbstractPageNumberCitationLayoutManager

      public AbstractPageNumberCitationLayoutManager(AbstractPageNumberCitation node)
      Constructor
      Parameters:
      node - the formatting object that creates this area TODO better retrieval of font info
  • Method Details

    • initialize

      public void initialize()
      initialize the layout manager. Allows each layout manager to calculate often used values.
      Specified by:
      initialize in interface LayoutManager
      Overrides:
      initialize in class AbstractLayoutManager
    • makeAlignmentContext

      protected AlignmentContext makeAlignmentContext(LayoutContext context)
      Creates a new alignment context or returns the current alignment context. This is used for vertical alignment. Subclasses should override this if necessary.
      Overrides:
      makeAlignmentContext in class LeafNodeLayoutManager
      Parameters:
      context - the layout context used
      Returns:
      the appropriate alignment context
    • getAllocationIPD

      protected MinOptMax getAllocationIPD(int refIPD)
      Description copied from class: LeafNodeLayoutManager
      Get the allocation ipd of the inline area. This method may be overridden to handle percentage values.
      Overrides:
      getAllocationIPD in class LeafNodeLayoutManager
      Parameters:
      refIPD - the ipd of the parent reference area
      Returns:
      the min/opt/max ipd of the inline area
    • getCitedPage

      protected abstract PageViewport getCitedPage()
    • getEffectiveArea

      protected InlineArea getEffectiveArea(LayoutContext layoutContext)
      Overrides:
      getEffectiveArea in class LeafNodeLayoutManager
      Returns:
      the effective area to be added to the area tree. Normally, this is simply "curArea" but in the case of page-number(-citation) curArea is cloned, updated and returned.
    • getReferenceType

      protected abstract boolean getReferenceType()
      Returns:
      UnresolvedPageNumber.FIRST or UnresolvedPageNumber.LAST
    • getBidiLevel

      protected int getBidiLevel()
      Returns:
      bidi level governing abstract page number citation