Class LayoutContext

java.lang.Object
org.xhtmlrenderer.layout.LayoutContext
All Implemented Interfaces:
CssContext

public class LayoutContext extends Object implements CssContext
This class tracks state which changes over the course of a layout run. Generally speaking, if possible, state information should be stored in the box tree and not here. It also provides pass-though calls to many methods in SharedContext.
  • Field Details

  • Constructor Details

  • Method Details

    • getTextRenderer

      public TextRenderer getTextRenderer()
    • getCss

      public StyleReference getCss()
      Specified by:
      getCss in interface CssContext
    • getCanvas

      public FSCanvas getCanvas()
    • getFixedRectangle

      public Rectangle getFixedRectangle()
    • getNamespaceHandler

      public NamespaceHandler getNamespaceHandler()
    • reInit

      public void reInit(boolean keepLayers)
    • captureLayoutState

      public LayoutState captureLayoutState()
    • restoreLayoutState

      public void restoreLayoutState(LayoutState layoutState)
    • copyStateForRelayout

      public LayoutState copyStateForRelayout()
    • restoreStateForRelayout

      public void restoreStateForRelayout(LayoutState layoutState)
    • getBlockFormattingContext

      public BlockFormattingContext getBlockFormattingContext()
    • pushBFC

      public void pushBFC(BlockFormattingContext bfc)
    • popBFC

      public void popBFC()
    • pushLayer

      public void pushLayer(Box master)
    • pushLayer

      public void pushLayer(Layer layer)
    • popLayer

      public void popLayer()
    • getLayer

      public Layer getLayer()
    • getRootLayer

      public Layer getRootLayer()
    • translate

      public void translate(int x, int y)
    • addBoxId

      public void addBoxId(String id, Box box)
    • removeBoxId

      public void removeBoxId(String id)
    • isInteractive

      public boolean isInteractive()
    • getMmPerDot

      public float getMmPerDot()
      Specified by:
      getMmPerDot in interface CssContext
    • getDotsPerPixel

      public int getDotsPerPixel()
      Specified by:
      getDotsPerPixel in interface CssContext
    • getFontSize2D

      public float getFontSize2D(FontSpecification font)
      Specified by:
      getFontSize2D in interface CssContext
    • getXHeight

      public float getXHeight(FontSpecification parentFont)
      Specified by:
      getXHeight in interface CssContext
    • getFont

      public FSFont getFont(FontSpecification font)
      Specified by:
      getFont in interface CssContext
    • getUac

      public UserAgentCallback getUac()
    • isPrint

      public boolean isPrint()
    • getFirstLinesTracker

      public StyleTracker getFirstLinesTracker()
    • getFirstLettersTracker

      public StyleTracker getFirstLettersTracker()
    • getCurrentMarkerData

      public MarkerData getCurrentMarkerData()
    • setCurrentMarkerData

      public void setCurrentMarkerData(MarkerData currentMarkerData)
    • getReplacedElementFactory

      public ReplacedElementFactory getReplacedElementFactory()
    • getFontContext

      public FontContext getFontContext()
    • setFontContext

      public void setFontContext(FontContext fontContext)
    • getContentFunctionFactory

      public ContentFunctionFactory getContentFunctionFactory()
    • getSharedContext

      public SharedContext getSharedContext()
    • getExtraSpaceBottom

      public int getExtraSpaceBottom()
    • setExtraSpaceBottom

      public void setExtraSpaceBottom(int extraSpaceBottom)
    • getExtraSpaceTop

      public int getExtraSpaceTop()
    • setExtraSpaceTop

      public void setExtraSpaceTop(int extraSpaceTop)
    • resolveCounters

      public void resolveCounters(CalculatedStyle style, Integer startIndex)
    • resolveCounters

      public void resolveCounters(CalculatedStyle style)
    • getCounterContext

      public LayoutContext.CounterContext getCounterContext(CalculatedStyle style)
    • getFSFontMetrics

      public FSFontMetrics getFSFontMetrics(FSFont font)
      Specified by:
      getFSFontMetrics in interface CssContext
    • getPageName

      public String getPageName()
    • setPageName

      public void setPageName(String currentPageName)
    • getNoPageBreak

      public int getNoPageBreak()
    • setNoPageBreak

      public void setNoPageBreak(int noPageBreak)
    • isPageBreaksAllowed

      public boolean isPageBreaksAllowed()
    • getPendingPageName

      public String getPendingPageName()
    • setPendingPageName

      public void setPendingPageName(String pendingPageName)
    • getRootDocumentLayer

      public Layer getRootDocumentLayer()
    • setRootDocumentLayer

      public void setRootDocumentLayer(Layer rootDocumentLayer)
    • getPage

      public PageBox getPage()
    • setPage

      public void setPage(PageBox page)
    • isMayCheckKeepTogether

      public boolean isMayCheckKeepTogether()
    • setMayCheckKeepTogether

      public void setMayCheckKeepTogether(boolean mayKeepTogether)
    • getBreakAtLineContext

      public BreakAtLineContext getBreakAtLineContext()
    • setBreakAtLineContext

      public void setBreakAtLineContext(BreakAtLineContext breakAtLineContext)