Class 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.
    • Method Detail

      • getCanvas

        public FSCanvas getCanvas()
      • getFixedRectangle

        public Rectangle getFixedRectangle()
      • getParagraphSplitter

        public ParagraphSplitter getParagraphSplitter()
        The paragraph splitter splits the document into paragraphs for the purpose of bi-directional text analysis.
      • setBidiReorderer

        public void setBidiReorderer​(BidiReorderer reorderer)
      • getBidiSplitterFactory

        public BidiSplitterFactory getBidiSplitterFactory()
        The bidi splitter is used to split text runs into LTR and RTL visual ordering.
      • setBidiSplitterFactory

        public void setBidiSplitterFactory​(BidiSplitterFactory factory)
        The bidi splitter is used to split text runs into LTR and RTL visual ordering.
      • getDefaultTextDirection

        public byte getDefaultTextDirection()
        Returns:
        the default text direction for a document.
      • setDefaultTextDirection

        public void setDefaultTextDirection​(byte direction)
        Parameters:
        direction - either BidiSplitter.LTR or BidiSplitter.RTL.
      • 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)
      • 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()
      • isPrint

        public boolean isPrint()
      • setIsPrintOverride

        public void setIsPrintOverride​(Boolean isPrint)
        Parameters:
        isPrint - true, false or null for no override.
      • getFirstLinesTracker

        public StyleTracker getFirstLinesTracker()
      • getFirstLettersTracker

        public StyleTracker getFirstLettersTracker()
      • getCurrentMarkerData

        public MarkerData getCurrentMarkerData()
      • setCurrentMarkerData

        public void setCurrentMarkerData​(MarkerData currentMarkerData)
      • setFontContext

        public void setFontContext​(FontContext fontContext)
      • getExtraSpaceBottom

        public int getExtraSpaceBottom()
      • setExtraSpaceBottom

        public void setExtraSpaceBottom​(int extraSpaceBottom)
      • getExtraSpaceTop

        public int getExtraSpaceTop()
      • setExtraSpaceTop

        public void setExtraSpaceTop​(int extraSpaceTop)
      • 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)
      • setBreakAtLineContext

        public void setBreakAtLineContext​(BreakAtLineContext breakAtLineContext)