Class FitContentValue
java.lang.Object
com.itextpdf.layout.properties.grid.TemplateValue
com.itextpdf.layout.properties.grid.GridValue
com.itextpdf.layout.properties.grid.FunctionValue
com.itextpdf.layout.properties.grid.FitContentValue
Represents fit content function template value.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.itextpdf.layout.properties.grid.TemplateValue
TemplateValue.ValueType
-
Field Summary
Fields inherited from class com.itextpdf.layout.properties.grid.TemplateValue
type
-
Constructor Summary
ConstructorDescriptionFitContentValue
(LengthValue length) Create fit content function value based on providedLengthValue
instance.FitContentValue
(UnitValue length) Create fit content function value based on providedUnitValue
instance. -
Method Summary
Modifier and TypeMethodDescriptionGet underlyingLengthValue
which represents max size on a grid for this value.float
getMaxSizeForSpace
(float space) Gets the maximum size which the value can take on passed space.Methods inherited from class com.itextpdf.layout.properties.grid.TemplateValue
getType
-
Constructor Details
-
FitContentValue
Create fit content function value based on providedLengthValue
instance.- Parameters:
-
length
- max size value
-
FitContentValue
Create fit content function value based on providedUnitValue
instance.- Parameters:
-
length
- max size value
-
-
Method Details
-
getLength
Get underlyingLengthValue
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
-