Class MultiSwitchLayoutManager

All Implemented Interfaces:
PercentBaseContext, Constants, BlockLevelLayoutManager, LayoutManager

public class MultiSwitchLayoutManager extends BlockStackingLayoutManager
  • Constructor Details

    • MultiSwitchLayoutManager

      public MultiSwitchLayoutManager(FObj node)
  • Method Details

    • getNextKnuthElements

      public List<ListElement> getNextKnuthElements(LayoutContext context, int alignment)
      Description copied from class: BlockStackingLayoutManager
      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
    • getParentArea

      public Area getParentArea(Area childArea)
      Description copied from class: AbstractLayoutManager
      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
    • addChildArea

      public void addChildArea(Area childArea)
      Description copied from class: BlockStackingLayoutManager
      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.
    • addAreas

      public void addAreas(PositionIterator posIter, LayoutContext context)
      Description copied from class: AbstractLayoutManager
      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:
      posIter - the position iterator
      context - the context