Class BlockBox

    • Constructor Detail

      • BlockBox

        public BlockBox()
    • Method Detail

      • getExtraBoxDescription

        protected String getExtraBoxDescription()
      • appendPositioningInfo

        protected void appendPositioningInfo​(StringBuilder result)
      • isListItem

        public boolean isListItem()
      • isInline

        public boolean isInline()
      • getLineBox

        public LineBox getLineBox()
      • getMarkerData

        public MarkerData getMarkerData()
      • setMarkerData

        public void setMarkerData​(MarkerData markerData)
      • createMarkerData

        public void createMarkerData​(LayoutContext c)
      • getListCounter

        public int getListCounter()
      • setListCounter

        public void setListCounter​(int listCounter)
      • setPersistentBFC

        public void setPersistentBFC​(PersistentBFC persistentBFC)
      • getStaticEquivalent

        public Box getStaticEquivalent()
      • setStaticEquivalent

        public void setStaticEquivalent​(Box staticEquivalent)
      • shouldBeReplaced

        public boolean shouldBeReplaced()
      • isReplaced

        public boolean isReplaced()
      • calcInitialFloatedCanvasLocation

        public void calcInitialFloatedCanvasLocation​(LayoutContext c)
      • isNeedPageClear

        public boolean isNeedPageClear()
      • setNeedPageClear

        public void setNeedPageClear​(boolean needPageClear)
      • positionAbsolute

        public void positionAbsolute​(CssContext cssCtx,
                                     int direction)
      • isPageBreakNeededBecauseOfMinHeight

        public boolean isPageBreakNeededBecauseOfMinHeight​(LayoutContext context)
        Using the css: -fs-page-break-min-height: 5cm; on a block element you can force a pagebreak before this block, if not enough space (e.g. 5cm in this case) is remaining on the current page for the block.
        Returns:
        true if a pagebreak is needed before this block because there is not enough space left on the current page.
      • positionAbsoluteOnPage

        public void positionAbsoluteOnPage​(LayoutContext c)
      • setReplacedElement

        public void setReplacedElement​(ReplacedElement replacedElement)
      • reset

        public void reset​(LayoutContext c)
        Description copied from class: Box
        Responsible for resetting the state of the box before a repeat call to layout(LayoutContext) or other layout methods.

        Any layout operation that is not idempotent MUST be reset in this method. Layout may be called several times on the one box.
        Overrides:
        reset in class Box
      • calcDimensions

        public void calcDimensions​(LayoutContext c)
      • calcDimensions

        protected void calcDimensions​(LayoutContext c,
                                      int cssWidth)
      • layout

        public void layout​(LayoutContext c,
                           int contentStart)
      • checkPopBfc

        protected void checkPopBfc​(LayoutContext c)
        Checks if this box established a block formatting context and if so removes the last bfc from the stack. See also checkPushBfc(LayoutContext)
      • checkPushBfc

        protected void checkPushBfc​(LayoutContext c)
        Checks if this box establishes a block formatting context and if so creates one and pushes it to the stack of bfcs. See also checkPopBfc(LayoutContext)
      • isAllowHeightToShrink

        protected boolean isAllowHeightToShrink()
      • getPageClearance

        protected int getPageClearance()
      • ensureChildren

        public void ensureChildren​(LayoutContext c)
      • layoutChildren

        protected void layoutChildren​(LayoutContext c,
                                      int contentStart)
      • layoutInlineChildren

        protected void layoutInlineChildren​(LayoutContext c,
                                            int contentStart,
                                            int breakAtLine,
                                            boolean tryAgain)
      • setInlineContent

        public void setInlineContent​(List<Styleable> inlineContent)
        Inline content is created by the box builder. It is important to note that the inline content here is stored in the pre-layout state. Ie. It has not been flowed out into LineBox and InlineLayoutBox objects but is stored as InlineBox and block boxes that are laid out inline such as inline-block and inline-table.

        During layout inline-content is laid out into lines and so on but the inline content is left untouched so as to be able to run layout multiple times to satisfy constraints.

        This method should be called with setChildrenContentType(ContentType) set to BlockBox.ContentType.INLINE as block boxes can not contain mixed content.
      • isSkipWhenCollapsingMargins

        protected boolean isSkipWhenCollapsingMargins()
      • isMayCollapseMarginsWithChildren

        protected boolean isMayCollapseMarginsWithChildren()
      • collapseMargins

        protected void collapseMargins​(LayoutContext c)
      • isTopMarginCalculated

        public boolean isTopMarginCalculated()
      • setTopMarginCalculated

        public void setTopMarginCalculated​(boolean topMarginCalculated)
      • isBottomMarginCalculated

        public boolean isBottomMarginCalculated()
      • setBottomMarginCalculated

        public void setBottomMarginCalculated​(boolean bottomMarginCalculated)
      • getCSSWidth

        protected int getCSSWidth​(CssContext c)
      • getCSSWidth

        protected int getCSSWidth​(CssContext c,
                                  boolean shrinkingToFit)
      • getCSSFitToWidth

        protected int getCSSFitToWidth​(CssContext c)
      • getCSSHeight

        protected int getCSSHeight​(CssContext c)
      • isAutoHeight

        public boolean isAutoHeight()
      • getAvailableWidth

        protected int getAvailableWidth​(LayoutContext c)
      • isFixedWidthAdvisoryOnly

        protected boolean isFixedWidthAdvisoryOnly()
      • calcMinMaxWidth

        public void calcMinMaxWidth​(LayoutContext c)
      • getMaxWidth

        public int getMaxWidth()
      • setMaxWidth

        protected void setMaxWidth​(int maxWidth)
      • getMinWidth

        public int getMinWidth()
      • setMinWidth

        protected void setMinWidth​(int minWidth)
      • getFirstLetterStyle

        public CascadedStyle getFirstLetterStyle()
      • setFirstLetterStyle

        public void setFirstLetterStyle​(CascadedStyle firstLetterStyle)
      • setFirstLineStyle

        public void setFirstLineStyle​(CascadedStyle firstLineStyle)
      • isMinMaxCalculated

        protected boolean isMinMaxCalculated()
      • setMinMaxCalculated

        protected void setMinMaxCalculated​(boolean minMaxCalculated)
      • setDimensionsCalculated

        protected void setDimensionsCalculated​(boolean dimensionsCalculated)
      • setNeedShrinkToFitCalculatation

        protected void setNeedShrinkToFitCalculatation​(boolean needShrinkToFitCalculatation)
      • calcInitialBreakAtLine

        protected int calcInitialBreakAtLine​(LayoutContext c)
      • isCurrentBreakAtLineContext

        public boolean isCurrentBreakAtLineContext​(LayoutContext c)
      • calcInlineBaseline

        public int calcInlineBaseline​(CssContext c)
      • findOffset

        public int findOffset​(Box box)
      • findLastNthLineBox

        public LineBox findLastNthLineBox​(int count)
      • isNeedsKeepWithInline

        public boolean isNeedsKeepWithInline​(LayoutContext c)
      • isFloated

        public boolean isFloated()
      • setFloatedBoxData

        public void setFloatedBoxData​(FloatedBoxData floatedBoxData)
      • getChildrenHeight

        public int getChildrenHeight()
      • setChildrenHeight

        protected void setChildrenHeight​(int childrenHeight)
      • isFromCaptionedTable

        public boolean isFromCaptionedTable()
      • setFromCaptionedTable

        public void setFromCaptionedTable​(boolean fromTable)
      • isInlineBlock

        protected boolean isInlineBlock()
        Overrides:
        isInlineBlock in class Box
      • isInMainFlow

        public boolean isInMainFlow()
      • isContainsInlineContent

        public boolean isContainsInlineContent​(LayoutContext c)
      • checkPageContext

        public boolean checkPageContext​(LayoutContext c)
      • isNeedsClipOnPaint

        public boolean isNeedsClipOnPaint​(CssContext c)