Class Length


  • public class Length
    extends Object
    A length value with MeasurementUnit

    Allows use and interchange of units such as inches, mm, pt, percentages, pixels and points when editing a PDF.

    • Constructor Detail

      • Length

        public Length​(double value)
        Instantiates a new Length. Default MeasurementUnit is MeasurementUnit.PERCENTAGE
        Parameters:
        value - the value
      • Length

        public Length​(double value,
                      MeasurementUnit unit)
        Instantiates a new Length. A length value with MeasurementUnit.
        Parameters:
        value - the value
        unit - the unit
      • Length

        public Length()
        Gets default length : 0%
    • Method Detail

      • getValue

        public final double getValue()
        Gets value.
        Returns:
        the value
      • setValue

        public final void setValue​(double value)
        Sets value.
        Parameters:
        value - the value