Class FlexUtil.FlexItemCalculationInfo

  • Enclosing class:
    FlexUtil

    static class FlexUtil.FlexItemCalculationInfo
    extends java.lang.Object
    • Field Detail

      • flexBasis

        float flexBasis
      • flexShrink

        float flexShrink
      • flexGrow

        float flexGrow
      • minContent

        float minContent
      • maxContent

        float maxContent
      • mainSize

        float mainSize
      • crossSize

        float crossSize
      • xShift

        float xShift
      • yShift

        float yShift
      • scaledFlexShrinkFactor

        float scaledFlexShrinkFactor
      • isFrozen

        boolean isFrozen
      • isMinViolated

        boolean isMinViolated
      • isMaxViolated

        boolean isMaxViolated
      • flexBaseSize

        float flexBaseSize
      • hypotheticalMainSize

        float hypotheticalMainSize
      • hypotheticalCrossSize

        float hypotheticalCrossSize
      • flexBasisContent

        boolean flexBasisContent
      • isColumnDirection

        boolean isColumnDirection
    • Constructor Detail

      • FlexItemCalculationInfo

        public FlexItemCalculationInfo​(AbstractRenderer renderer,
                                       float flexBasis,
                                       float flexGrow,
                                       float flexShrink,
                                       float areaMainSize,
                                       boolean flexBasisContent,
                                       boolean isColumnDirection,
                                       float crossSize)
    • Method Detail

      • toRectangle

        public Rectangle toRectangle()
      • getOuterMainSize

        float getOuterMainSize​(float size)
      • getInnerMainSize

        float getInnerMainSize​(float size)
      • getOuterCrossSize

        float getOuterCrossSize​(float size)
      • getInnerCrossSize

        float getInnerCrossSize​(float size)
      • calculateMinContentAuto

        private float calculateMinContentAuto​(float flexContainerMainSize,
                                              float crossSize)
      • calculateTransferredSizeSuggestion

        private java.lang.Float calculateTransferredSizeSuggestion​(float flexContainerMainSize)
        If the item has an intrinsic aspect ratio and its computed cross size property is definite, then the transferred size suggestion is that size (clamped by its min and max cross size properties if they are definite), converted through the aspect ratio. It is otherwise undefined.
        Returns:
        transferred size suggestion if it can be calculated, null otherwise
      • calculateSpecifiedSizeSuggestion

        private java.lang.Float calculateSpecifiedSizeSuggestion​(float flexContainerMainSize)
        If the item’s computed main size property is definite, then the specified size suggestion is that size (clamped by its max main size property if it’s definite). It is otherwise undefined.
        Parameters:
        flexContainerMainSize - the width of the flex container
        Returns:
        specified size suggestion if it's definite, null otherwise
      • calculateContentSizeSuggestion

        private float calculateContentSizeSuggestion​(float flexContainerMainSize,
                                                     float crossSize)
        The content size suggestion is the min-content size in the main axis, clamped, if it has an aspect ratio, by any definite min and max cross size properties converted through the aspect ratio, and then further clamped by the max main size property if that is definite.
        Parameters:
        flexContainerMainSize - the width of the flex container
        Returns:
        content size suggestion
      • clampValueByCrossSizesConvertedThroughAspectRatio

        private float clampValueByCrossSizesConvertedThroughAspectRatio​(float value,
                                                                        float flexContainerMainSize)