Class FitContentValue


  • public class FitContentValue
    extends FunctionValue
    Represents fit content function template value.
    • Constructor Detail

      • FitContentValue

        public FitContentValue​(LengthValue length)
        Create fit content function value based on provided LengthValue instance.
        Parameters:
        length - max size value
      • FitContentValue

        public FitContentValue​(UnitValue length)
        Create fit content function value based on provided UnitValue instance.
        Parameters:
        length - max size value
    • Method Detail

      • getMaxSizeForSpace

        public float getMaxSizeForSpace​(float space)
        Gets the maximum size which the value can take on passed space.
        Parameters:
        space - the space for which fit-content size will be calculated
        Returns:
        the maximum size of the value on passed space