Class FitContentValue


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

    • 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 Details

    • getLength

      public LengthValue getLength()
      Get underlying LengthValue which represents max size on a grid for this value.
      Returns:
      underlying LengthValue value
    • 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